Page 1 of 3
Hide is not triggered on UIPanel
Posted: Mon Nov 23, 2020 12:01 am
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 (37.43 KiB) Viewed 494 times
- 화면 캡처 2020-11-22 205734.png (105.58 KiB) Viewed 494 times
Any other suggestions?
Re: Hide is not triggered on UIPanel
Posted: Mon Nov 23, 2020 10:25 am
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.
Re: Hide is not triggered on UIPanel
Posted: Tue Nov 24, 2020 7:43 am
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 (41.51 KiB) Viewed 485 times
- 화면 캡처 2020-11-24 043952.png (133.84 KiB) Viewed 485 times
I wondeer if its related to
Override Dialogue UI thing?
Re: Hide is not triggered on UIPanel
Posted: Tue Nov 24, 2020 7:00 pm
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
Re: Hide is not triggered on UIPanel
Posted: Tue Nov 24, 2020 9:40 pm
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.
Re: Hide is not triggered on UIPanel
Posted: Tue Nov 24, 2020 10:26 pm
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 (120.93 KiB) Viewed 464 times
Re: Hide is not triggered on UIPanel
Posted: Tue Nov 24, 2020 10:58 pm
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.
Re: Hide is not triggered on UIPanel
Posted: Tue Nov 24, 2020 11:15 pm
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.
Re: Hide is not triggered on UIPanel
Posted: Wed Nov 25, 2020 9:07 am
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.
Re: Hide is not triggered on UIPanel
Posted: Wed Nov 25, 2020 9:56 am
by fkkcloud
Sounds good. Is there any email notification thingy - so I know that patch is available?