Hi there,
I’m working on a game where the front-end lets the player choose a level, which is then background loaded with LoadLevelAsync. While it’s loading there’s some options that the player can set for the level that they’re about to play (difficulty level, that sort of thing). This has the nice advantage that the loading time is hidden a little.
The problem I have is that as soon as the level loads it immediately becomes active. Physics, AI, audio etc. all start happening while the player is still choosing some of the options.
What would be ideal is a way to async load the level, but not actually add it to the scene until I say so. Essentially splitting LoadLevelAsync into two function - a LoadLevelAsync and an AddLevelToScene.
I can think of a few long-winded and error prone ways of accomplishing this, but they’d mean modifying every component type in the game to support (for example I could add a OnLevelStart message to all objects, and have them check that that’s been received before updating). I’m hoping there’s something a little more elegant though…
Has anyone done anything similar?
Cheers,
Rob.