void SyncPlayState(PlayableGraph graph, double playableTime) { bool expectedFinished = (playableTime >= m_AssetDuration) && director.extrapolationMode == DirectorWrapMode.None; if (graph.IsPlaying() && !expectedFinished) { if (director.state == PlayState.Playing) { return; } #if TIMELINE_FRAMEACCURATE if (graph.IsMatchFrameRateEnabled()) { director.Play(graph.GetFrameRate()); } else { director.Play(); } #else director.Play(); #endif } else { if (director.state == PlayState.Paused) { return; } director.Pause(); } }
void SyncStart(PlayableGraph graph, double time) { if (director.state == PlayState.Playing || !graph.IsPlaying() || (director.extrapolationMode == DirectorWrapMode.None && time > m_AssetDuration)) { return; } #if TIMELINE_FRAMEACCURATE if (graph.IsMatchFrameRateEnabled()) { director.Play(graph.GetFrameRate()); } else { director.Play(); } #else director.Play(); #endif }