Page 1 of 1

Call event when Main Panel deactivates

Posted: Thu Jul 28, 2022 7:38 pm
by perezbalen
Hi.
Is there a way to run code when the Main Panel Deactivates? Something like the OnConversationEnd(), but for when the Main Panel hides?
Thanks

Re: Call event when Main Panel deactivates

Posted: Thu Jul 28, 2022 8:30 pm
by Tony Li
Hi,

The dialogue UI's main panel (typically named Dialogue Panel) has a UIPanel component. This component has OnClose() and OnClosed() UnityEvents.

OnClose() runs when the main panel starts to close. OnClosed() runs when the main panel has finished closing.