Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

Entire page reload after LoadSceneAsync

Discussion in 'Project Tiny' started by dallin_unity, Aug 19, 2021.

  1. dallin_unity

    dallin_unity

    Joined:
    Dec 18, 2019
    Posts:
    35
    Hi, I got a bug that I can't find anything on log, after I try this function to load new sub scene
    Code (CSharp):
    1. private void LoadScene<T>() where T : struct
    2.         {
    3.            
    4.             var sceneEntity = GetSingletonEntity<T>();
    5.             if (!sceneSystem.IsSceneLoaded(sceneEntity))
    6.             {
    7.                 var scene = EntityManager.GetComponentData<SceneReference>(sceneEntity);
    8.                 sceneSystem.LoadSceneAsync(scene.SceneGUID, new SceneSystem.LoadParameters { AutoLoad = true, Flags = SceneLoadFlags.LoadAdditive });
    9.             }
    10.         }
    Instead of loading the scene, it loads the entire page, only happen on mobile browser, I'm not sure about android phone but happens on my iphone, and this happens randomly, sometime it works and load the only scene, but sometime it load the entire page, weird
    And here is the log
    upload_2021-8-19_15-25-20.png

    Thanks you guys, I really don't know what I do wrong here
     

    Attached Files:

  2. djsell

    djsell

    Joined:
    Aug 29, 2013
    Posts:
    76
    There have been several posts about iOS browser reloading the page periodically. I believe other people were seeing this behavior when using particles. It may have also been related to a possible memory leak? It's been a while, so I forget. Maybe you can search the forums a bit with that info.
     
    dallin_unity likes this.
unityunity