- Home /
 
               Question by 
               megamika2 · Jun 30, 2018 at 09:47 PM · 
                unity 2dscene-loadingscene-switchingscene-change  
              
 
              LoadSceneAsync makes unity behave differently after build.
I am using SceneManager.LoadSceneAsync to get info about scene loading and thus add loading to the game and it works in edit mode, but when i build this game to android scene after loading starts behaving differently.
     public void EnterLevelItself()
     {
         LoadingScreen.SetActive(true);
         AsyncOperation loadLevel = SceneManager.LoadSceneAsync(Stage.Number);
     }
 
     IEnumerator Loader()
     {
         AsyncOperation loadLevel = SceneManager.LoadSceneAsync(Stage.Number);
 
         while (!loadLevel.isDone)
         {
             float progress = Mathf.Clamp01(loadLevel.progress / 0.9f);
             FrontLoading.fillAmount = progress;
             yield return null;
         }
     }
It seems like it can't assighn an object because at the beginning of the level in the next scene death scren should be hidden at the beginning, but it doesn't.
               Comment
              
 
               
              Your answer
 
 
             Follow this Question
Related Questions
Multiple Scenes: Are previous scenes still active after you call a new scene? 1 Answer
Fadeout Issue 0 Answers
Display a GameOver scene then restart the game 1 Answer
UnloadSceneAsync() does not seem to work with additive scenes. 1 Answer
Old scene still appears for short time when switching scene 0 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                