using UnityEngine; using UnityEditor; using UnityEngine.UIElements; using UnityEditor.UIElements; using System.Collections.Generic; [CustomEditor(typeof(StreamingleFacialReceiver))] public class StreamingleFacialReceiverEditor : Editor { private const string UxmlPath = "Assets/External/StreamingleFacial/Editor/UXML/StreamingleFacialReceiverEditor.uxml"; private const string UssPath = "Assets/External/StreamingleFacial/Editor/UXML/StreamingleFacialReceiverEditor.uss"; private const string CommonUssPath = "Assets/Scripts/Streamingle/StreamingleControl/Editor/UXML/StreamingleCommon.uss"; private StreamingleFacialReceiver receiver; private VisualElement portButtonsContainer; private Label activePortValue; private VisualElement statusContainer; private VisualElement filteringFields; public override VisualElement CreateInspectorGUI() { receiver = (StreamingleFacialReceiver)target; var root = new VisualElement(); // Load stylesheets var commonUss = AssetDatabase.LoadAssetAtPath(CommonUssPath); if (commonUss != null) root.styleSheets.Add(commonUss); var uss = AssetDatabase.LoadAssetAtPath(UssPath); if (uss != null) root.styleSheets.Add(uss); // Load UXML var uxml = AssetDatabase.LoadAssetAtPath(UxmlPath); if (uxml != null) uxml.CloneTree(root); // Cache references statusContainer = root.Q("statusContainer"); activePortValue = root.Q