- Home /
Partial Async Loading
Hi!
I would really like to be able to perform a partial asynchronous load. By partial I mean that I would like to load the ressources in a first pass, then instantiate the ressources in a second pass. For example:
AsyncOperation op = Application.PartialLoadLevel("myScene");
and then continue to do what I want, until the point where I actually really want to "activate" the level swap with something like:
yield return op; Application.ApplyPartialLevel();
Which would unload the current level, and instantiate the preloaded level. Is there an elegant/clean way to do this, without hacking with LoadLevelAdditiveAsync ? If not, is there any chances this will be in the api at some point in the future?
Many thanks!
David
i didn't test this code so i will post only in comment.
have you tried writing this:
while(!op.isDone) yield;
source: http://unity3d.com/support/documentation/ScriptReference/AsyncOperation-isDone.html