示例#1
0
        internal static void Edit(AnimationClipInfoProperties clipInfo, int index)
        {
            UnityEngine.Object[] array = Resources.FindObjectsOfTypeAll(typeof(AnimationEventPopup));
            AnimationEventPopup  animationEventPopup = (array.Length <= 0) ? null : ((AnimationEventPopup)array[0]);

            if (animationEventPopup == null)
            {
                animationEventPopup = EditorWindow.GetWindow <AnimationEventPopup>(true);
                AnimationEventPopup.InitWindow(animationEventPopup);
            }
            animationEventPopup.m_Root     = null;
            animationEventPopup.m_Clip     = null;
            animationEventPopup.m_ClipInfo = clipInfo;
            animationEventPopup.eventIndex = index;
            animationEventPopup.Repaint();
        }
示例#2
0
        internal static void Edit(GameObject root, AnimationClip clip, int index, EditorWindow owner)
        {
            UnityEngine.Object[] array = Resources.FindObjectsOfTypeAll(typeof(AnimationEventPopup));
            AnimationEventPopup  animationEventPopup = (array.Length <= 0) ? null : ((AnimationEventPopup)array[0]);

            if (animationEventPopup == null)
            {
                animationEventPopup = EditorWindow.GetWindow <AnimationEventPopup>(true);
                AnimationEventPopup.InitWindow(animationEventPopup);
            }
            animationEventPopup.m_Root     = root;
            animationEventPopup.m_Clip     = clip;
            animationEventPopup.eventIndex = index;
            animationEventPopup.m_Owner    = owner;
            animationEventPopup.Repaint();
        }
        internal static void Edit(AnimationClipInfoProperties clipInfo, int index)
        {
            UnityEngine.Object[] objectsOfTypeAll = Resources.FindObjectsOfTypeAll(typeof(AnimationEventPopup));
            AnimationEventPopup  popup            = objectsOfTypeAll.Length <= 0 ? (AnimationEventPopup)null : (AnimationEventPopup)objectsOfTypeAll[0];

            if ((UnityEngine.Object)popup == (UnityEngine.Object)null)
            {
                popup = EditorWindow.GetWindow <AnimationEventPopup>(true);
                AnimationEventPopup.InitWindow(popup);
            }
            popup.m_Root     = (GameObject)null;
            popup.m_Clip     = (AnimationClip)null;
            popup.m_ClipInfo = clipInfo;
            popup.eventIndex = index;
            popup.Repaint();
        }
示例#4
0
        internal static int Create(GameObject root, AnimationClip clip, float time, EditorWindow owner)
        {
            AnimationEvent animationEvent = new AnimationEvent();

            animationEvent.time = time;
            AnimationEvent[] animationEvents = AnimationUtility.GetAnimationEvents(clip);
            int num = AnimationEventPopup.InsertAnimationEvent(ref animationEvents, clip, animationEvent);
            AnimationEventPopup window = EditorWindow.GetWindow <AnimationEventPopup>(true);

            AnimationEventPopup.InitWindow(window);
            window.m_Root     = root;
            window.m_Clip     = clip;
            window.eventIndex = num;
            window.m_Owner    = owner;
            return(num);
        }
        internal static void Edit(GameObject root, AnimationClip clip, int index, EditorWindow owner)
        {
            UnityEngine.Object[] objectsOfTypeAll = Resources.FindObjectsOfTypeAll(typeof(AnimationEventPopup));
            AnimationEventPopup  popup            = objectsOfTypeAll.Length <= 0 ? (AnimationEventPopup)null : (AnimationEventPopup)objectsOfTypeAll[0];

            if ((UnityEngine.Object)popup == (UnityEngine.Object)null)
            {
                popup = EditorWindow.GetWindow <AnimationEventPopup>(true);
                AnimationEventPopup.InitWindow(popup);
            }
            popup.m_Root     = root;
            popup.m_Clip     = clip;
            popup.eventIndex = index;
            popup.m_Owner    = owner;
            popup.Repaint();
        }