Controlling when timeline plays.

Hey guys,
So what I am trying to do is have a timeline cutscene play BEFORE my scene starts, then the gameplay happen. How would I go about that? I watched a tutorial on how to use timeline to make a cutscene, but when does it play? How can I control when it plays? I am using Unity 3d editor version 2019.4.12f1
Thanks in advance,
Aeneas.

It sounds like you are trying to play a timeline immediately when starting a scene and not letting the user play during that time.

First, you will need to ensure that the Play On Awake is set on your Playable Director.

To enable your gameplay state once the timeline has finished you have a few options.

  • Add an ActivationTrack that enables your gameplay objects at the end of the timeline (use the post-playback state to ensure they stay one once the timeline is complete)
  • Use a SignalTrack to enable the objects or change scenes at the end of the Timeline
  • Listen to the PlayableDirector.stopped event

Thanks for the advice @grahamsaulnier! Is there a way to play a cutscene on trigger? I tried to find a tutorial inline, but nove of them are very beginner-friendly, and I am still new to Unity.
(In other words, when my player enters a specific area, I want him to walk forward and interact with other Npc, then when the cutscene is over have my player go BACK to his start position).