Just wanted to know, will Unity totally unload previous scene before loading the new scene? Or the previous scene will still remain in the background?
unity destroys everything except what you flag with DontDestroyOnLoad:
; )
How does this work with the theory that Unity loads level one immediately, and then all the other levels? Is this restricted to just the webplayer?
So this process must use RAM and VRAM and possibly Hard Disc. I wonder what the nitty gritty of memory allocation is here?
AC
What you are talking about has to do with preloading to memory, and/or doing some preproccess work on the source files so that when they are “officially” loaded, they load faster.
That’s why they suggest we put our light menu stuff in the first scene, then the heavier stuff after. It’s because the first scene is not pre-loaded, it’s loaded as it’s called.
-Jeremy
So if scene one has some buttons to load scene two, and once scene one is loaded, it is automatically loading in scene 2 even though we havent called loadlevel(2)?
Cheers
AC
Basically. It is loading it and storing it it memory so when you do call LoadLevel() it doesn’t have to pull all the data from the HD (which is slow).
Obviously how much gets preloaded depends on how much time the player spends in your main menu, and the size of the levels.
-Jeremy