Page 2 of 2
Re: Animate/hide panel after continue button pressed
Posted: Fri Jan 01, 2021 8:34 pm
by cptscrimshaw
Hmm... doesn't appear to be either. I'm only just changing the position and alpha of the portrait image over time in the animation. Has Exit Time wasn't checked. I'm not animating the text panels at all.
https://ibb.co/NtLx067
Re: Animate/hide panel after continue button pressed
Posted: Fri Jan 01, 2021 9:53 pm
by Tony Li
I think I see what's going on. Since the NPC Subtitle Panel is on top of the Player Subtitle Panel, it blocks the Player Subtitle Panel from view. The NPC Subtitle Panel doesn't disappear until its animation is done. This means it prevents the player's (Sairyn's) name from appearing until the NPC's (Bartholomew's) hide animation has finished.
I had designed my example assuming that you'd be using one subtitle panel. If you want to use two subtitle panels with this kind of setup, it will help to modify it to once again be a bit more like the Runic/WRPG template by keeping all of the text elements (character names and subtitle text) in a shared UI panel. However, it will be easiest if you use different text elements, such as a separate NPC Portrait Name and PC Portrait Name, even though they'll be in the same position. Here's an updated example:
DS_ScrimshawExample2_2021-01-01.unitypackage
I just modified the original example, so if you import it on top of the original example it will replace those files. Key points in this version:
- The NPC Subtitle Panel and PC Subtitle Panel are separate from the shared Content Panel. The Content Panel contains the portrait names and subtitle text. The subtitle panels only contain the portrait images.
- I used the subtitle panels' OnClose() UnityEvents to hide its portrait name and subtitle text immediately. This allows the other subtitle panel's versions to appear.
Re: Animate/hide panel after continue button pressed
Posted: Sat Jan 02, 2021 4:03 pm
by cptscrimshaw
Thanks Tony - works like a charm. I was using the OnOpen() UnityEvents before, but it wasn't working as intended for some reason.
Much appreciated!
Re: Animate/hide panel after continue button pressed
Posted: Sat Jan 02, 2021 4:07 pm
by Tony Li
Glad to help!