Forum rules - please read before posting.

Animating custom exit transitions for Unity UI prefab menus?

Sorry if this is obvious, but I've searched the forums and non-AC Unity tutorials and have had no luck getting this to work.

I am trying to have my game's menus have custom animated exit animations when menus are closed. I am able to get the custom entry animations to work.

I set my menu's transition type to "Custom Animation States", set the transition time to 0.5, and created an animator on the UI canvas with the states "On/Off/OnInstant/OffInstant". Where I'm getting stuck is that I'm not sure how to communicate to my individual menu elements that the "off" state is being initialized, and that it's time to play the exit transition for each UI element.

If there is already a guide on how to go through this and I'm just missing it, I apologize! I just feel stuck and have no idea how to move forward with this issue. Thanks in advance!

Comments

  • AC's menu transitions don't communicate with each UI element to play their own individual animations. All they do is trigger the On/Off/OnInstant/OffInstant animations at the appropriate times. If you need to animate individual UI elements, what you can do is add those components to the 'Off' animation itself (you should be able to do so if they are children of the canvas with the animator).

  • edited November 2023

    @Rairun Thank you so much for the quick response! I managed to animate some of the UI elements on the Canvas's animation controller as opposed to their own individual animation controllers successfully. However, I'm still having issues getting the exit animation to play--only the entrance animation plays still.

    I am wondering if something is wrong with the way I've set up my animation states? Please see below for reference.

    Thank you!

    EDIT: NEVERMIND I am extremely silly and accidentally keyframed like 2 seconds into the animation and that's why the exit wasn't playing. It's working perfectly! Thanks, you rock!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.