[SerializeField] private bool _pauseWhenClipEnds = default; //This won't work if the clip ends on the very last frame of the Timeline
[SerializeField] public DialogueLineChannelSO PlayDialogueEvent;
[SerializeField] public VoidEventChannelSO PauseTimelineEvent;
[HideInInspector] public DialogueLineChannelSO PlayDialogueEvent;
[HideInInspector] public VoidEventChannelSO PauseTimelineEvent;
private bool _dialoguePlayed;
{
[SerializeField] private DialogueBehaviour _template = default;
// Having ClipCaps set to None makes sure that the clips can't be blended, extrapolated, looped, etc.
public ClipCaps clipCaps
public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
ScriptPlayable<DialogueBehaviour> playable = ScriptPlayable<DialogueBehaviour>.Create(graph, _template);
_template.PlayDialogueEvent = PlayDialogueEvent;
_template.PauseTimelineEvent = PauseTimelineEvent;
return playable;
}
[TrackClipType(typeof(DialogueClip))]
public class DialogueTrack : PlayableTrack
public override Playable CreateTrackMixer(PlayableGraph graph, GameObject go, int inputCount)
dialogueControlClip.PauseTimelineEvent = PauseTimelineEvent;
dialogueControlClip.PlayDialogueEvent = PlayDialogueEvent;
return base.CreateTrackMixer(graph, go, inputCount);