Problem with Timeline
Posted: Tue May 02, 2023 5:17 am
Hi, so I'm trying to implement cutscenes for my game using Timeline. The issue I'm having is that everything seems to work fine when the cutscene gameobject (the one containing the PlayableDirector) is added to the scene manually before I hit play. However, the way I'm trying to use cutscenes is by instantiating a prefab when certain conditions are met and then assigning animators and objects that belong to each track via script. This seems to work fine for animators, but there's a problem with conversation tracks.
I'm using the sequence
to pause the Timeline during dialogues unitl the player clicks continue. But when using the instantiating a prefab method I get the following error
and the Timeline just continues playing. Is there a way to fix this?
Thanks in advance!
I'm using the sequence
Code: Select all
Timeline(speed, Tutorial1, 0);
required Timeline(speed, Tutorial1, 1)@Message(ClosedSubtitle);
Code: Select all
NullReferenceException: The PlayableGraph is null.
UnityEngine.Playables.PlayableGraph.GetRootPlayableInternal (System.Int32 index) (at <685c48cf8f0b48abb797275c046dda6a>:0)
UnityEngine.Playables.PlayableGraph.GetRootPlayable (System.Int32 index) (at <685c48cf8f0b48abb797275c046dda6a>:0)
PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandTimeline+<Proceed>d__9.MoveNext () (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Options/Timeline/Sequencer/SequencerCommandTimeline.cs:151)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <685c48cf8f0b48abb797275c046dda6a>:0)
Thanks in advance!