Hide is not triggered on UIPanel

Announcements, support questions, and discussion for the Dialogue System.
fkkcloud
Posts: 298
Joined: Mon Oct 05, 2020 6:00 am

Hide is not triggered on UIPanel

Post by fkkcloud »

I have Animator attached to UIPanel component which has 2 animation `Show` and `Hide`

`Shoe` works but `Hide` does not get called or rather it deactivates the object right after conversation ends.

I've tried to turn off `Deactivate On Hidden` but no luck.
화면 캡처 2020-11-22 205745.png
화면 캡처 2020-11-22 205745.png (37.43 KiB) Viewed 483 times
화면 캡처 2020-11-22 205734.png
화면 캡처 2020-11-22 205734.png (105.58 KiB) Viewed 483 times
Any other suggestions?
User avatar
Tony Li
Posts: 22050
Joined: Thu Jul 18, 2013 1:27 pm

Re: Hide is not triggered on UIPanel

Post by Tony Li »

If 'Deactivate On Hidden' is turned off, it shouldn't deactivate the panel. However, if this is a child of another panel -- for example, if it is a subtitle panel that is a child of a Dialogue Panel, then maybe the Dialogue Panel is deactivating it. Make sure the Dialogue Panel is also set to an animation that will take at least the same amount of time before deactivating everything.
fkkcloud
Posts: 298
Joined: Mon Oct 05, 2020 6:00 am

Re: Hide is not triggered on UIPanel

Post by fkkcloud »

This is what I have - I think this is the highest
- maybe it is doing something in the below?
화면 캡처 2020-11-24 043943.png
화면 캡처 2020-11-24 043943.png (41.51 KiB) Viewed 474 times
화면 캡처 2020-11-24 043952.png
화면 캡처 2020-11-24 043952.png (133.84 KiB) Viewed 474 times

I wondeer if its related to Override Dialogue UI thing?
fkkcloud
Posts: 298
Joined: Mon Oct 05, 2020 6:00 am

Re: Hide is not triggered on UIPanel

Post by fkkcloud »

Where is the function that calls "show" and "hide" animation?
I can maybe look into it and see what should I do. Also, let me know if you have any suggestions based on the above reply
User avatar
Tony Li
Posts: 22050
Joined: Thu Jul 18, 2013 1:27 pm

Re: Hide is not triggered on UIPanel

Post by Tony Li »

StandardUISubtitlePanel is a subclass of UIPanel. UIPanel has a Close() method. This Close() method plays its Hide animation. When the animation animation is done, it deactivates the GameObject. If the panel does not have a Hide animation, it deactivates the GameObject immediately.

The Dialogue System runs conversations using a Model-View-Controller architecture. The components are:
  • ConversationModel: Manages data.
  • ConversationController: Coordinates between ConversationModel and ConversationView.
  • ConversationView: Manages dialogue UI and sequences.
When a subtitle finishes (e.g., player clicks continue button), it tells the ConversationView. The ConversationView:

1. Calls StandardUISubtitle.HideSubtitle().
2. Tells the ConversationController. The ConversationController then shows the next part of the conversation. Or, if the conversation is done, it tells the ConversationView to Close(), and the ConversationView calls the StandardDialogueUI's Close() method, which should play the main Dialogue Panel's Hide animation.
fkkcloud
Posts: 298
Joined: Mon Oct 05, 2020 6:00 am

Re: Hide is not triggered on UIPanel

Post by fkkcloud »

I just checked and as the conversation ends.
The Override Dialogue UI gets destroy immediately without playing the Hide Animation..

Btw, I am using UI Panel component on the SMS_Dialogue_Panel which is not subtitle but the SMS whole screen. (not each subtitle) so I am using UI Panel and I've attached Animator to it.
It has Show/Hide Animation trigger.
화면 캡처 2020-11-24 192407.png
화면 캡처 2020-11-24 192407.png (120.93 KiB) Viewed 453 times
User avatar
Tony Li
Posts: 22050
Joined: Thu Jul 18, 2013 1:27 pm

Re: Hide is not triggered on UIPanel

Post by Tony Li »

Aha, thank you for identifying that. I'll try to develop a patch tomorrow.

In the meantime, can you add an instance of the SMS Dialogue UI to a Canvas in the scene? For example, you can add a Canvas child GameObject to the Override Dialogue UI's GameObject. Then add an instance of the SMS Dialogue UI to it. Finally, assign the instance to the Override Dialogue UI. Since it's in the scene, the Dialogue System will not need to destroy it after the conversation, so it should be able to play its Hide animation.
fkkcloud
Posts: 298
Joined: Mon Oct 05, 2020 6:00 am

Re: Hide is not triggered on UIPanel

Post by fkkcloud »

What will the patch include?

I'm not in a hurry situation so if the patch can do the job, I hope not to modify the current prefab as it is.
If the patch requires the change you've described, then I can definitely modify it.

Also, the subtitle Show/Hide animations works perfectly.
User avatar
Tony Li
Posts: 22050
Joined: Thu Jul 18, 2013 1:27 pm

Re: Hide is not triggered on UIPanel

Post by Tony Li »

The patch will allow the override dialogue UI to finish its Hide animation before being destroyed. I also plan to add an option to deactivate the UI instead of destroying it. This way it won't have to be re-instantiated if it needs to be used again.
fkkcloud
Posts: 298
Joined: Mon Oct 05, 2020 6:00 am

Re: Hide is not triggered on UIPanel

Post by fkkcloud »

Sounds good. Is there any email notification thingy - so I know that patch is available?
Post Reply