A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Separate names with a comma.
Discussion in 'Timeline' started by hiroaoki, Oct 18, 2017.
Can I jump to any frame while I play the timeline?
Yes. You can set the time on the PlayableDirector component: Director.time
Thanks, julienne !
Sorry to bump this, why there's no "frame" property exposed apart from time? if in the timelline editor window we see only frames displayed?
The engine has no real concept of 'frames', at least in the timeline sense. The frames in the timeline editor is simply for authoring purposes, but during playback, the timeline is most often evaluated between frames. Because timeline is updated after Update() in the player loop, the delta time can vary, just like any other script.
However, you can do a frame->time conversion yourself with
director.time = frame / ((TimelineAsset) director.playableAsset).editorSettings.fps;
private void setTime()
playableDirector = myPlayableDirectorGO.GetComponent<PlayableDirector>();
playableDirector.time = timeLinePosition / ((TimelineAsset)playableDirector.playableAsset).editorSettings.fps;