Hi, when a dialogue is showed in a cutscene i need to pause the cutscene until this finished, the problem is how can i know when the dialogue is finished to continue the cutscene?
i will like to put on OnConversationEnd method of AbstractDialogueUI something like let me know if a cutscene is playing and if this true call play method of that cutscene, the problem is how to access to that active cutscene??
Thanks for the help
[SOLVED] help with cinema Director
[SOLVED] help with cinema Director
Last edited by alfonso on Mon Jul 27, 2015 6:32 am, edited 1 time in total.
Re: help with cinema Director
Hi,
Add a small script to the Dialogue Manager GameObject that has the OnConversationStart and OnConversationEnd script methods, something like:
I'm out of the office right now, and I don't remember the exact property name to determine if a cutscene is playing. The code above should get you started.
Add a small script to the Dialogue Manager GameObject that has the OnConversationStart and OnConversationEnd script methods, something like:
Code: Select all
public class PauseCutscenesDuringConversations : MonoBehaviour {
private List<Cutscene> pausedCutscenes = new List<Cutscene>();
public void OnConversationStart(Transform actor) {
// Pause all active cutscenes:
pausedCutscenes.Clear();
foreach (var cutscene in FindObjectsOfType<>) {
if (cutscene.IsPlaying) { //<-- Need to double-check this property name.
cutscene.Pause();
pausedCutscenes.Add(cutscene);
}
}
}
public void OnConversationEnd(Transform actor) {
// Resume paused cutscenes:
pausedCutscenes.ForEach(cutscene => cutscene.Play());
}
}
Re: help with cinema Director
Thank Tony its works soo good
Re: [SOLVED] help with cinema Director
Glad I could help!