Application.LoadLevelAsync not working as expected

I’m trying to use this code (based on docs):

function ChangeLevel(){
var async : AsyncOperation = Application.LoadLevelAsync (“NewLevel”);
yield async;
}

When the ChangeLevel function is called, it is supossed to load the new level in the background but instead of this, the current level freezes and the loading is done exactly the same as using Application.LoadLevel(“NewLevel”), what is wrong?

I have Unity Pro last update.

function ChangeLevel(){
 var async : AsyncOperation = Application.LoadLevelAsync ("NewLevel");
async.allowSceneActivation = false;
}

When you want to load, set async.allowSceneActivation = true;
Do you have same result?

Thanks but I get the same result because only when I set async.allowSceneActivation = true the level is loaded, but the loading time is the same and with the same freeze.

LoadLevelAsync will cause performance drop, so only other thing to try make freeze less noticeable is to set Application.backgroundLoadingPriority = ThreadPriority.Low; Unless I understand what you want wrong. If you are trying to make continuous scene then you will have to use Unity - Scripting API: Application.LoadLevelAdditiveAsync

Also note that if you’re testing this in the Editor, it doesn’t work smoothly but on iOS or Android devices, it works smoothly for us. I don’t know how smooth it is on other platforms and I didn’t play with allowSceneActivation or backgroundLoadingPriority.