what I'm trying to do is load my "loading scene" when my "level scene" is preparing.
But i can't do it. can anyone help me with this ?
// Update is called once per frame
public void play_game_button() {
StartCoroutine(lev());
}
IEnumerator lev (){
SceneManager.LoadScene("loading_scene");
AsyncOperation asx = SceneManager.LoadSceneAsync("level02",LoadSceneMode.Single);
yield return null;
Debug.Log(asx.progress);
if(asx.isDone){
// remove loading_scene
}
Debug.Log("Done");
}
there is another unprofessional way. I did not try it yet but if i did not get a answer for this i will try it. which is use canvas in the "level scene" as "Waiting scene". when level is full loaded this canvas will disappear.
↧