Exemplo n.º 1
0
 void OnDestroy()
 {
     if (_sequenceEditor != null)
     {
         _sequenceEditor.Stop();
         DestroyImmediate(_sequenceEditor);
     }
 }
Exemplo n.º 2
0
        void Update()
        {
#if FLUX_PROFILE
            Profiler.BeginSample("flux Update");
#endif
            if (_sequenceEditor == null)
            {
                _sequenceEditor = FSequenceEditor.CreateInstance <FSequenceEditor>();
                _sequenceEditor.Init(this);
            }

            FSequence 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
        }