Is there a way to play the Unity Timeline at a certain frame/time/normalized progress via script? Example scenario: I have a castle which is fully animated by different animation, e.g. walking people, moving vehicles, torches etc. All the animations are put inside a Unity timeline. The user can pan with a camera around in the castle and has access to a custom timeline UI on the screen. This UI timeline plays/pauses the animations in the castle, and can even skip to certain frames in the UI timeline, to play the animations from different key times. I want this UI timeline to be linked to the Unity Timeline via script. E.g. timeline.PlayAt(0.2) valuerange 0-1 where 0 is the beginning, 1 is the end of all the animations. Is this possible? Thanks in advance for any advice, I have looked around on the net, and no simple solution, this is making me nuts.
I haven't used Timeline itself, but I have used the underlying Playables API and this sort of thing is definitely possible there. I believe the PlayableDirector class is involved somewhere and it looks like it has properties for this sort of thing.
Yes, the PlayableDirecdtor is the answer. Received an explanation from seant_unity. The progress can be set via script by changing the time property in PlayableDirector: playableDirector.Play(); playableDirector.time = playableDirector.duration * normalizedTime; Thanks for all the answers, really appreciate it!