Page 1 of 1

Animation when UI shows up and hide

Posted: Fri Feb 11, 2022 3:26 am
by fallingstarint
Hello Tony,
I am aworking on my game right now, integrating Dialogue System and Quest Machine (always mesmerized at the incredible job you have been making) and I wanted to know if you had a solution for me to animate my dialogue panels, alerts and quest machine's panels for when they show up / hide.

At the moment, they fade in (for most of them, the quest machine's active quest reminder at the top right of the screen just shows up) and since they are "hand drawn" panels, I'd like them to have an animation as if they were brushed in.

I have the animation of the panel being brushed, but then what to do and what format should this animation be? (it's a video/gif..)

Thank you for your help, here is a screenshot of what it looks like:
Image

Re: Animation when UI shows up and hide

Posted: Fri Feb 11, 2022 9:31 am
by Tony Li
Hi,

If you can turn your animations into Unity animation clips, you can assign them to the UI panels' Animators in place of the current fade in/out animations. For subtitle panels, also tick the 'Wait For Open' checkbox.

If you can't turn your animations into Unity animation clips, you can configure the UI panels' OnOpen() and OnClose() UnityEvents to play your video/gifs. The Dialogue System and Quest Machine don't come with video/gif players, so you'll have to use Unity's built-in video player or a separate gif-playing asset. You may want to assign animation clips to the Animators that do nothing except last for the same duration as the video/gifs. This will make the UI panels wait until the video/gif is done before showing subtitle text.

Re: Animation when UI shows up and hide

Posted: Fri Feb 11, 2022 2:19 pm
by fallingstarint
Thank you Tony!

Re: Animation when UI shows up and hide

Posted: Fri Feb 11, 2022 3:02 pm
by Tony Li
Glad to help!