- Home /
The question is answered, right answer was accepted
Load Level Additive Async Lag spike
So im trying to load a scene additive but there will be a 1sec lag time when it happens. Isn't the Async supposed to do it without lag?
loading = true;
AsyncOperation async = Application.LoadLevelAdditiveAsync("Testing");
yield return async;
loading = false;
Debug.Log("Loading complete");
yield return new WaitForSeconds(5);
Destroy (detroythis);
Are you getting the lag spike only in the editor?
"Note that background loading performance in the Unity Editor is much lower than in the web player or standalone build. In the Editor you might also get more loading hiccups than in the player."
Is your code within your scene async as well ? lag might come from initialization in the scene.
Landern no the lag is still there in build, thanks for the note though.
Jokin no, my initialization code is not async but it does not load any script, the only scripts in play are the ones i have already loaded from the first scene. The scene i am trying to load is a forest and increases VRA$$anonymous$$ by about 50mb. Is there a way to know how many millisecs it takes for which action ? (eg 30ms to load trees)
Sadly it's normal, one of the unity5 features is "load level async will work as advertised".
Follow this Question
Related Questions
Load level / prefabs without causing hiccups 1 Answer
Prevent LoadLevelAdditiveAsync from halting the app? 3 Answers
LoadLevelAdditive delay 2 Answers
Application.LoadLevel not working 1 Answer