How does everyone handle UI transitions that require events inbetween?

Sorry I think I should have been clearer. This is more of a logic/timing issue than the actual transition itself. I want to play an animation, then when that animation is finished, do some functionality, then play another animation. But the kicker is it needs to be generic so it can be reused but also the functionality in that middle part needs to be different per use case.

Example 1 - scene transition:

Fade to black, load next scene, fade from black

Example 2 - changing screens:

Screen outro animation, load next screen, screen intro animation

Example 3 - go from pause menu to gameplay:

Pause menu outro plays, resume game, fade in hud

The problem is that middle part in each of those scenarios since I don’t want my UI to be doing any kind of direct control with the game.

Maybe I’m overthinking it and I should just do it on a case by case basis but it still feels like this would be a lot of custom use cases.

1 Like