コード例 #1
0
        internal void OnPreviewPlay()
        {
            if (state == null || state.masterSequence.asset == null || state.masterSequence.director == null)
            {
                return;
            }

            var director = state.masterSequence.director;

            if (director.timeUpdateMode == DirectorUpdateMode.Manual)
            {
                Repaint();
                return;
            }

            if (state.isJogging)
            {
                ApplyJog();
            }
            else if (state.playRangeEnabled)
            {
                EnsurePlayRangeIsRespected();
            }

            if (director.extrapolationMode == DirectorWrapMode.None && director.playableGraph.IsValid() && director.playableGraph.IsDone())
            {
                //reset time if we hit the end of the timeline
                state.masterSequence.time = 0.0;
                state.Pause();
            }

            Repaint();
            AudioMixerWindow.RepaintAudioMixerWindow();
        }
コード例 #2
0
        public void Evaluate()
        {
            if (masterSequence.director != null)
            {
                if (!EditorApplication.isPlaying && !previewMode)
                    GatherProperties(masterSequence.director);

                ForceTimeOnDirector(masterSequence.director);
                masterSequence.director.DeferredEvaluate();

                if (EditorApplication.isPlaying == false)
                {
                    PlayModeView.RepaintAll();
                    SceneView.RepaintAll();
                    AudioMixerWindow.RepaintAudioMixerWindow();
                }
            }
        }