Stuck on how to implement branching dialogue options using Timelines

Hi All, thanks for checking out this post.

I’ve been racking my brain all day trying to source information on how I might achieve a branching dialogue system inside a single cutscene using multiple timelines.

The concept is as follows:
A timeline cutscene begins playing as soon as the scene is loaded, containing tracks for animating the characters and for UI elements such as the dialogue box and different strings of text which change as the timeline progresses. The timeline reaches a certain point where the timeline pauses, and the player is prompted for an input via some UI buttons. Depending on which button the player presses, the timeline will switch to another timeline where the dialogue and animations will continue. Each dialogue choice will have their own unique individual corresponding timeline. Whether its the timeline asset that needs changing inside the playable director at runtime, or a switch between playable directors and their corresponding timelines, I’m not sure which is best. I’ve made a an attempt at both via scripting but neither one of my implementations were fruitful…My understanding of the Timeline/Playable syntax is limited as I’m still a novice which may be where I’m missing something.

I did however, find that it is indeed possible from the example below, where they managed to switch between playable directors at runtime which then play their corresponding timelines after waiting for a dialogue input:

Frustratingly, they do not reveal their scripted method on how this is achieved.
Would anyone mind sharing some information on the subject/help to provide a solution please?

What you can also try is instead of switching the timeline or director to just use one timeline with all option recorded and jump to the specific time via script.I use this in my game and it works but i have a rather simple case so i don’t know if it will work for you.

So your timeline will look like this:

A B C

A - beginning and first dialog with choice: B or C
Depending what user chooses you either jump to B or C on the timeline.
To play a timline at a specific position you can use this code:

playableDirector.time = [time];
playableDirector.Evaluate();

I do not know if it is very imporant to have one separate timeline for each dialog option. I think using one timeline is more stable and has less issues than switching. So when it it not important for you i would use one timeline.