Page 1 of 1

How to send UnityAction when some conversation ends

Posted: Sat Nov 16, 2019 11:31 am
by sentendo
Hello,

I would like to implement in my "Game Event System" some notification to send to the observers (for instance: the game manager) whenever a conversation ends.

I cannot use the "Dialogue System Events", because I need to specify an ID (string, for instance) to have a different reaction to different conversations.

What's the best approach to implement this?

Re: How to send UnityAction when some conversation ends

Posted: Sat Nov 16, 2019 2:00 pm
by Tony Li
Hi,

If you use Dialogue System Events, your observers can check DialogueManager.lastConversationStarted to know what conversation ended.

Otherwise you can add an OnConversationEnd(Transform actor) method to a script on the Dialogue Manager and check DialogueManager.lastConversationStarted in that method.

Re: How to send UnityAction when some conversation ends

Posted: Sat Nov 16, 2019 5:39 pm
by ar4wy
Thanks so much for this! Works great!

Re: How to send UnityAction when some conversation ends

Posted: Sat Nov 16, 2019 11:09 pm
by Tony Li
Glad to help!

Re: How to send UnityAction when some conversation ends

Posted: Sun Nov 17, 2019 2:45 am
by sentendo
perfect, thank you very much!