예제 #1
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);
        }