Reloading a level quickly..LoadLevel too slow

Hi,
I have an issue where on the iPhone reloading a level takes about 3 seconds. which is an issue as i need to be able to instantly reload a level for good game flow.

I thought about maybe remember each objects initial location and each scripts settings and then when reloading just resetting this, but with large amounts of levels this could be a hog to manage. Anyone has any ideas or maybe existing scripts that do something like this?

thanks

on russian unity forums one guy proposed the workaround for that (actually unloading level takes time because it needs to collect all the stuff you have in there)
Here is rough translation:
We moved everything in a scene into a prefab.
The script destroys everything that is needed and then instantiate a prefab
On test machine it went down from 15 mins to 5 secs.
And later updated that it is even better if you do load prefab from Resources.Load (you can do this async and initial load will be faster)
the source is here (you can use google translate ;-))
http://unity3d.ru/distribution/viewtopic.php?f=65&t=3377

What Alexey said is pretty much how I did it in my previous project.

All my level objects were contained within an over arching parent object at the start of the level (and made into a Prefab) - when awoken the first thing they did was to un-parent themselves and destroy the parent.

When I wanted to re-load, I destroyed everything and re-instanted the prefab.

i c … thanks guys

Can anyone explain those tips from above in easier term,
Does this sounds correct:

  1. Parent all object in the scene into one GameObject for each level
  2. Now we have a single object/prefabs: Level_01, Level_02 etc…
  3. When switching level, instead of using Application.LoadLevel, destroy Level_01 object and Instantiate Level_02 Object.
  4. This way we never actually use Application.LoadLevel.

Does that steps sound correct ?

I need to understand this since my loading take 10 -15 seconds per level :frowning: