Page 1 of 1
Stop Timeline in ContinueConversationClip
Posted: Wed Dec 15, 2021 10:32 pm
by Tony Chou
I want the dialogue system to work like a movie narrator in unity Timeline.
1. When subtitle show , stop timeline until player press continue button.
2. Hide dialogue UI until next subtitle show.
How do I complete this feature?
Re: Stop Timeline in ContinueConversationClip
Posted: Thu Dec 16, 2021 9:35 am
by Tony Li
Hi,
There are two ways to do this:
Method 1:
- Don't link your conversation's dialogue entry nodes linearly. Link them all from the <START> node.
- Add a Conversation Track to your timeline, and use separate Start Conversation clips to show each node.
- Set the Dialogue Manager's Subtitle Settings > Continue Button mode to Always.
- Set the Dialogue Manager's Default Sequence to:
Code: Select all
Timeline(speed, timeline, 0);
required Timeline(speed, timeline, 1)@Message(Continued)
where 'timeline' is the name of your PlayableDirector GameObject.
Method 2:
- Link your dialogue entry nodes linearly.
- Add a Conversation Track, and use a single Start Conversation clip to start the conversation.
- Add a Continue Conversation Track, and use Continue Conversation clips where you want to show each next node.
- Set the Dialogue Manager's Default Sequence, or the conversation's Conversation Properties > Override Display Settings > Camera & Cutscene Settings > Default Sequence, to:
Code: Select all
Timeline(speed, timeline, 0);
required Timeline(speed, timeline, 1)@Message(ClosedSubtitle)
where 'timeline' is the name of your PlayableDirector GameObject.
- Set the Dialogue Manager's Subtitle Settings > Continue Button mode to Always.
- Configure the continue button to call this script's CloseSubtitle method instead of actually continuing the conversation:
CloseSubtitleButton.csCode: Select all
using UnityEngine;
using PixelCrushers.DialogueSystem;
public class CloseSubtitleButton : MonoBehaviour
{
public void CloseSubtitle()
{
GetComponentInParent<StandardUISubtitlePanel>().Close();
Sequencer.Message("ClosedSubtitle");
}
}
Here's an example of method 2:
DS_TimelineContinueClipExample_2021-12-16.unitypackage