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?
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.