I am trying to run some code after Removing the Widget from Common Activatable Widget Stack, I want my game to quit after the transition animation that removes the main menu UI finishes. Currently I have tried using a delay and on Destruct but I am wondering if there is a proper way to run some code after the transition animation is finished?
(You can also add an event track with custom events in the animation but this is there already.)
The proper way from UX point of view is to close the game without any animation. The user doesn’t care about your beautiful animations if they are in a hurry. It can only annoy people and at best will be glossed over.
The proper way from code point of view is how you made it - with a delay. The less your logic depends on cosmetic things like the UI or animations, the better.
Yes but Common UI’s Common Activatable Widget Stack doesn’t have an Animation exposed, nor I could find it in C++ but every time you push or remove a Widget from Stack it plays a Fading animation.
Yea, the common UI stack transitions are not widget animations and have no events to bind to.
You can GetTransitionDuration() though and use that as the delay’s duration.
I don’t see cleaner, simpler way of doing what you’ve set your mind to.