2 - 3 sec's of Delay while switching from One Scene to Another

Hi Guys,

Im facing a problem when ever im moving from one Scene to Another Scene there is a delay of approx 2-3 sec’s before the switch is complete. Its seems like Unity is unloading the resources while the scenes are switching its adding up to the delay.

Just for testing purpose i added 2 images in to scenes and on button pressed i switched from scenes but even this is taking same amount of time.

Any suggestion which will help me solve this issue.

Thanks In Advance :slight_smile:

-ABGamers

Hey guys even im facing the same problem and looking for the solution.
i wonder if anyone has also faced this problem have manage to solved it

Abhishek

Hi

Yes as you move from one scene to a new scene the initial scene gets unloaded then the new scene is loaded into memory, … how long this takes depends many things (images being loaded, objects getting instantiated etc). Early on I was instantiating up to 200 game objects and it took on my iPod touch 30 seconds and on my iPhone 10 seconds to load. Obviously I did a lot of rework to fix that which brought it down to just a couple of seconds. When both scenes are large it’s a good practice to load an “empty scene” in between (I.E. a transition scene) to flush the memory of the former scene entirely before loading the next scene.

Oh I’ve heard in many places that you can get better loading times for your scenes if your images sizes are the power of 2 (i.e. 64x64, 128x128, 256x 256, 512x512, etc) so you might want to resize your images if you haven’t done so already and try again and see if that helps.

This could be relevant to your cause as well: http://unity3d.com/support/documentation/ScriptReference/Application.LoadLevelAdditiveAsync.html

Cheers

but doing so will keep the old level data also alive right?
i dont want the old level data to be present when my new level is loaded

No, async loads the assets for the next level in the background then changes scenes. Everything from the old scene is still destroyed, the wait time doesn’t feel as long though because the game will not freeze while loading a new scene.

I don’t know if it works in Unity 3, but I don’t think Async loading worked properly in 1.7 so you might want to check on that.

Cool thanks Will surly try it out 2day

Thanks Buddy :slight_smile:

Hi I tries doing Application.LoadLevelAsync loong back but its only supported in Unity pro version only.
is there any other solution to solve this problem??