Animation when UI shows up and hide

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
fallingstarint
Posts: 22
Joined: Fri Oct 01, 2021 11:50 am

Animation when UI shows up and hide

Post 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
User avatar
Tony Li
Posts: 21722
Joined: Thu Jul 18, 2013 1:27 pm

Re: Animation when UI shows up and hide

Post 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.
fallingstarint
Posts: 22
Joined: Fri Oct 01, 2021 11:50 am

Re: Animation when UI shows up and hide

Post by fallingstarint »

Thank you Tony!
User avatar
Tony Li
Posts: 21722
Joined: Thu Jul 18, 2013 1:27 pm

Re: Animation when UI shows up and hide

Post by Tony Li »

Glad to help!
Post Reply