48
« on: September 24, 2013, 01:56:01 pm »
I do it this way.
Create a 'loading scene'
This loading scene transitions to scene with name that you specify (game parameter, text), call it for exmaple "scene to load".
You do this:
Let's say you're going from from menu going to Level 1.
Make a button that once pressed sets 'scene to load' to "level 1" then transitions into 'loading scene'.
Loading scene has this code: "when created, unload X atlas, load Y atlas, do after 1 second: switch to 'scene to load' scene.
That's it.
EDIT: OH, I thought you want to have a 'loading screen' for memory management purpose, if it's only about that 2/3 sec delay, I wouldnt put any loading bar or anything in there. 2-3 sec is fine on obvious transitions with fade to black. More than 5 sec would need a loading bar, but less, not really.