Пример #1
0
        public static TimelineWindowTimeControl CreateTimeController(TimelineWindowTimeControl.ClipData clipData)
        {
            var animationWindow = EditorWindow.GetWindow <AnimationWindow>();
            var timeController  = ScriptableObject.CreateInstance <TimelineWindowTimeControl>();

            timeController.Init(animationWindow.state, clipData);
            return(timeController);
        }
        static TimelineWindowTimeControl.ClipData CreateTimeControlClipData(TrackAsset track)
        {
            var data = new TimelineWindowTimeControl.ClipData();

            data.track    = track;
            data.start    = track.start;
            data.duration = track.duration;
            return(data);
        }
 public void Init(TimelineWindow window, AnimationWindowState state, TimelineWindowTimeControl.ClipData clip)
 {
     this.m_ClipData        = clip;
     this.m_AnimWindowState = state;
 }
        public static TimelineWindowTimeControl CreateTimeController(TimelineWindow.TimelineState state, TimelineWindowTimeControl.ClipData clipData)
        {
            AnimationWindow           window = EditorWindow.GetWindow <AnimationWindow>();
            TimelineWindowTimeControl timelineWindowTimeControl = ScriptableObject.CreateInstance <TimelineWindowTimeControl>();

            timelineWindowTimeControl.Init(state.GetWindow(), window.get_state(), clipData);
            return(timelineWindowTimeControl);
        }