I want to load my scenes asynchronously, I have 3 levels, when the player reaches some point the loading appears and waits till the next scene is done loading, this works only once (going from level 1 to 2).
But it doesn’t work properly when switching from level 2 to level 3.
I assume the script is attached to a game object?
This game object is destroyed when the new level loads.
Add this script and I think this should solve the problem.
using UnityEngine;
using System.Collections;
public class DontDestroy : MonoBehaviour {
// Use this for initialization
void Awake () {
DontDestroyOnLoad(gameObject);
}
}
Could you copy the entire code in to the answer AryaMh. I am also have trouble getting scenes to load async, and if you have it so that it loads from scene one to 2 then I would like to give it a try. If you would share that I would greatly appreciate it!