Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

LoadSceneAsync activateOnLoad Not Stopping Activation

Discussion in 'Addressables' started by jturner221, Jan 9, 2020.

  1. jturner221

    jturner221

    Joined:
    Aug 30, 2017
    Posts:
    17
    Unity Version: 2019.2.17f1
    Addressables Version: 1.2.4

    Code (CSharp):
    1.  
    2.  
    3.            addressablesLevelLoad = Addressables.LoadSceneAsync("level_01", LoadSceneMode.Single, false);
    4.            // OR
    5.             asyncLevelLoad = SceneManager.LoadSceneAsync("level_01", LoadSceneMode.Single);
    6.             asyncLevelLoad.allowSceneActivation = false
    7.  
    Either method of scene loading is loading the scene and activating it immediately.

    I have InstantiateAsync and assetRef.LoadAssetAsync<GameObject>() being called during this process. Are these calls someone forcing the scene to activate?
     
  2. magmagma

    magmagma

    Joined:
    Oct 27, 2017
    Posts:
    41
    I experienced the same problem.
    I wanted to load a scene and leave it deactivated until it was needed, but it wasn't working so I ended up just making the whole scene a prefab and loading that instead as addressable...

    I don't know if this is a problem with scenes in general or just addressable scenes though.
     
  3. JohnstableUnity

    JohnstableUnity

    Unity Technologies

    Joined:
    Nov 14, 2017
    Posts:
    4
  4. Nyankoooo

    Nyankoooo

    Joined:
    May 21, 2016
    Posts:
    144
    @JohnstableUnity Like mentioned in the issue you linked, this is not working in different Unity versions!
     
    magmagma likes this.
  5. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    5,994