using UnityEditor; using UnityEngine; using UnityEngine.UIElements; using UMotionEditor.API; using System.Collections.Generic; public class UMotionCopyPaste : EditorWindow { [MenuItem("Window/My Editor Window")] public static void ShowExample() { UMotionCopyPaste wnd = GetWindow(); wnd.titleContent = new GUIContent("UMotionCopyPaste"); } public void CreateGUI() { // Each editor window contains a root VisualElement object VisualElement root = rootVisualElement; // VisualElements objects can contain other VisualElement following a tree hierarchy Label label = new Label("Hello World!!"); root.Add(label); // Create button Button button = new Button(); button.name = "button"; button.text = "Button"; button.clicked += Btn; root.Add(button); // Create toggle Toggle toggle = new Toggle(); toggle.name = "toggle"; toggle.label = "Toggle"; root.Add(toggle); } void Btn() { List selectedTransforms = new List(); PoseEditor.GetSelectedTransforms(selectedTransforms); Debug.Log("Selected Transforms: " + selectedTransforms.Count); } void MyButtonPressed() { Debug.Log("Button Pressed!"); } }