Here's the problem. When I used loadlevelasync it appears to be preloading correctly. I've been doing a lot of testing and was logging the asyncoperation.progress value. The problem was it would get to around .9 and then it would then take longer to load the level than it took to preload. The preload seemed to take like 2 seconds to get from 0 to .9, but at that point my screen freezes and then it takes like 5 seconds for the next level to actually be loaded. I need it to be more fluid than that so I can have an animation playing. I have a 3D model moving around while it's preloading. Once it's done preloading the 3D model stops and then it takes 5 seconds for the next scene to actually load...making it pointless really.
private var async : AsyncOperation;
function Start() {
StartCoroutine(Load());
}
function Load() {
async = Application.LoadLevelAsync("Scan_Scene_Augmented");
async.allowSceneActivation = false;
yield async;
}
function OnGUI(){
if(GUI.Button(Rect(5,100,100,100),"YIP")) {
async.allowSceneActivation = true;
}
}
Trending Articles
More Pages to Explore .....