Is there a way to check if there is any conversation and/or bark going on at the moment?
I have a UI that i'd like to hide during conversations.
I know I can listen to some things like OnConversationStart, but if multiple would happen at the same time, and/or a Bark, it might be hard to know what starts and what ends.
Thanks!
How can I detect is anyone is speaking or barking at the moment?
How can I detect is anyone is speaking or barking at the moment?
Working on SpaceChef - A wacky open world space western, featuring a chef with nothing to loose, after he loses everything.. ;) Follow our work on @BlueGooGames.
Re: How can I detect is anyone is speaking or barking at the moment?
If you're only concerned about conversations, you can check the Boolean property DialogueManager.isConversationActive.
Most devs use Dialogue System Events to hide/disable other things (such as gameplay UIs) during conversations. Configure OnConversationStart() to disable the gameplay UI's Canvas, and use OnConversationEnd() to re-enable it.
If you also need to know about barks, add a script to the Dialogue Manager with OnBarkStart() and OnBarkEnd() methods that keep track of the number of active barks:
Most devs use Dialogue System Events to hide/disable other things (such as gameplay UIs) during conversations. Configure OnConversationStart() to disable the gameplay UI's Canvas, and use OnConversationEnd() to re-enable it.
If you also need to know about barks, add a script to the Dialogue Manager with OnBarkStart() and OnBarkEnd() methods that keep track of the number of active barks:
Code: Select all
int numActiveBarks = 0;
public isBarkActive { get { return (numActiveBarks > 0); } }
void OnBarkStart(Transform barker) { numActiveBarks++; }
void OnBarkEnd(Transform barker) { numActiveBarks--; }