title: Unity screen freezes in android sometime and sometime works perfectly and in Editor everything is working perfectly
body: <p>I'am switching between 2 scenes when camera detects some image (say if image 1 then to scene 1 and when image 2 then to scene 2) and while switching I am displaying a canvas with a loading text on it. But on android(not in Unity editor) sometime the scene does not load i can only see the canvas saying loading that's it. Sometimes it works perfectly canvas loads and when the scene gets loaded canvas gets disabled and the scene works fine. In Unity Editor everything is working perfectly.</p>
  
  <p>And I have checked the logs for error there's no error in the logs.</p>
  
  <p>Here's the code for loading scene.</p>
  
  <pre><code>    IEnumerator SceneAssets() {
  
      Debug.Log("In start");
      var LoadedAssetBundle = AssetBundle.LoadFromFile(path);
      Debug.Log(LoadedAssetBundle);
      Destroy(this.gameObject); // destroy the ARCamera object
      if (LoadedAssetBundle == null)
  
      {
          Debug.Log("Failed to load AssetBundle!");
          yield break;
      }   
  
      string[] scenes = LoadedAssetBundle.GetAllScenePaths();
      string scene = Path.GetFileNameWithoutExtension(scenes[0]); // gets the scene from asset
  
      SceneManager.LoadSceneAsync(scene);
  
      Debug.Log("audio loaded");
  
      CoverDetect.isDetected = true; // sets the cover detect to true so can detect more covers
  
      LoadedAssetBundle.Unload(true); // unloads the asset bundle of scene
  
      AssetBundle.UnloadAllAssetBundles(false); // unloads the audio asset bundle as well
  
      Debug.Log("AS" + CoverDetect.isDetected);
  
      yield return null;
  
  }
  </code></pre>
  
  <p>And in logs I am getting all the logs that are written after "SceneManager.LoadSceneAsync(scene);"  even when the scene loading freezes.</p>