Example #1
0
        protected override void Init(FObject obj)
        {
            base.Init(obj);

            if (_sequenceEditor == null)
            {
                _sequenceEditor = GTimelineEditor.CreateInstance <GTimelineEditor>();
                _sequenceEditor.Init((EditorWindow)null);                   // doesn't have a window
                _sequenceEditor.OpenSequence(_evt.Owner.GetComponent <GTimeline>());
            }
        }
        protected override void Init(FObject obj)
        {
            base.Init(obj);

            if (_sequenceEditor == null)
            {
                _sequenceEditor = GTimelineEditor.CreateInstance <GTimelineEditor>();
                _sequenceEditor.Init((Editor)null /*SequenceEditor*/);
                _sequenceEditor.OpenSequence(_track.Owner.GetComponent <GTimeline>());
            }
        }
        void Update()
        {
#if FLUX_PROFILE
            Profiler.BeginSample("flux Update");
#endif
            if (_sequenceEditor == null)
            {
                _sequenceEditor = GTimelineEditor.CreateInstance <GTimelineEditor>();
                _sequenceEditor.Init(this);
            }

            GTimelineEditor sequence = _sequenceEditor.GetSequence();

            if (EditorApplication.isCompiling)
            {
                _isEditorCompiling = true;
                _sequenceEditor.Stop();
            }
            else if (_isEditorCompiling)
            {
                _isEditorCompiling = false;
                _windowRect        = new Rect();          // clear window size so it rebuilds layout
                _sequenceEditor.Refresh();
            }

            if (Application.isPlaying && sequence != null)
            {
                Repaint();
            }

            _sequenceEditor.Update();

#if FLUX_PROFILE
            Profiler.EndSample();
#endif
        }