Where did my scene load from?

Hi,

Is there an easy way to determine where a scene was loaded from?

I want my level select screen to fade in from black if the game has just loaded, but fade in from white if you are returning from playing a level. I’m sure it’s just because it’s a Friday and my brain is in party mode, but I can’t think how I would differentiate between the two scenarios.

Thanks

Game state manager that simply stores the previous scene type.

Or in your case, something even simpler: Have a boolean (in your game state manager) that starts off false and gets set to true the first time you visit the main menu. Subsequent visits will see it’s true and behave differently.

Or you could have fade-from-black and fade-from-white scenes that then load the menu. Simply have the from-black scene be your initial scene, and have the level-menu call from-white to get back to the main menu.

There are probably quite a few other ways, too.

Edit: Or check the time since the game was started. < 5 seconds, do black.

thanks I’ll go with storing a Boolean which doesn’t get destroyed.
L