public static void OpenWindow(AnimationEventController data)
        {
            Instance = GetWindow <AnimationEventControllerEditorWindow>();
            Instance.titleContent = new GUIContent("AnimationEventController");

            Instance.Initialize(data);

            Instance.Show();
        }
        private void ButtonOpenEditor()
        {
            if (GUILayout.Button("Open Editor"))
            {
                if (origin.animationEvents == null)
                {
                    origin.animationEvents = new List <AnimationEventController.AdvancedAnimationEvent>();
                }

                if (origin.animator.runtimeAnimatorController.animationClips.Length > 0)
                {
                    AnimationEventControllerEditorWindow.OpenWindow(origin);
                }
            }
        }
        private void InitializeView()
        {
            if (Instance == null)
            {
                Instance = GetWindow <AnimationEventControllerEditorWindow>();
                Instance.titleContent = new GUIContent("AnimationEventController");
                Instance.Show();
            }

            if (propertiesView == null)
            {
                propertiesView = new AECPropertiesView();
            }

            if (workView == null)
            {
                workView = new AECWorkView();
            }

            propertiesView.Initialize(animationEventController);
            workView.Initialize(animationEventController);
        }