Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

[0.7.4] UnloadScene problem

Discussion in 'Addressables' started by whowh, Apr 24, 2019.

  1. whowh

    whowh

    Joined:
    Mar 7, 2019
    Posts:
    19
    Hi,

    I have a problem about UnloadScene.
    When I use UnloadScene(SceneInstance scene) the scene is still exist.
    Only I use the function UnloadScene(AsyncOperationHandle<SceneInstance> handle) the scene will be deleted.

    Is that a bug? Does someone has the same issue?

    Thanks.
     
    RecursiveFrog likes this.
  2. RecursiveFrog

    RecursiveFrog

    Joined:
    Mar 7, 2011
    Posts:
    125
    I also have this issue. Can confirm that when trying to call UnloadScene(SceneInstance) the following happens

    I first get a LogWarning

    Code (csharp):
    1. Addressables.UnloadScene() - Cannot find handle for scene UnityEngine.ResourceManagement.ResourceProviders.SceneInstance
    2. UnityEngine.AddressableAssets.Addressables:UnloadScene(SceneInstance, Boolean)
    3. <AsyncLoadScene>d__38:MoveNext() (at Assets/_Game/Scenes/SceneLoad/AddressableSceneLoader.cs:131)
    4. UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
    5.  
    Then get a LogError

    Code (csharp):
    1. Exception encountered in operation UnityEngine.ResourceManagement.ResourceManager+CompletedOperation`1[UnityEngine.ResourceManagement.ResourceProviders.SceneInstance], result='', status='Failed': Addressables.UnloadScene() - Cannot find handle for scene UnityEngine.ResourceManagement.ResourceProviders.SceneInstance
    2. UnityEngine.AddressableAssets.Addressables:UnloadScene(SceneInstance, Boolean)
    3. <AsyncLoadScene>d__38:MoveNext() (at Assets/_Game/Scenes/SceneLoad/AddressableSceneLoader.cs:131)
    4. UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
    5.  


    But using the UnloadScene(AsyncOperationHandle) version works, and unloads the scene.
     
  3. whowh

    whowh

    Joined:
    Mar 7, 2019
    Posts:
    19
    Hi

    I have another issue.

    After Build Player Content,I use Packed Play Mode to run project.

    My unity will crash when I call Addressables.UnloadScene.

    Does someone have the same issue?
     
  4. RecursiveFrog

    RecursiveFrog

    Joined:
    Mar 7, 2011
    Posts:
    125
    You should probably make a different thread for that issue then, since it’s a different bug...

    In preparation for that thread, it might be helpful if you try building the game to your target platform and seeing what error happens when you run that.
     
  5. dbarile

    dbarile

    Joined:
    Apr 14, 2015
    Posts:
    11

    Attached Files:

    Last edited: May 1, 2019
    skwsk8 likes this.
  6. skwsk8

    skwsk8

    Joined:
    Jul 6, 2014
    Posts:
    10
    getting the same issue
     
  7. bruno_1308

    bruno_1308

    Joined:
    May 16, 2018
    Posts:
    12
    Getting the same issue on 0.7.5
     
  8. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    149
    Adressables 0.7.5
    Unity 2018.1.1f1

    Same here. Any fix?

    Exception encountered in operation UnityEngine.ResourceManagement.ResourceManager+CompletedOperation`1[UnityEngine.ResourceManagement.ResourceProviders.SceneInstance], result='', status='Failed': Addressables.UnloadScene() - Cannot find handle for scene UnityEngine.ResourceManagement.ResourceProviders.SceneInstance
    UnityEngine.AddressableAssets.Addressables:UnloadScene(SceneInstance, Boolean)
    MyLoadAddressableOnEnable
     
  9. HuangWM

    HuangWM

    Joined:
    Nov 3, 2015
    Posts:
    16
  10. unity_bill

    unity_bill

    Unity Technologies

    Joined:
    Apr 11, 2017
    Posts:
    521
    Thanks for reporting this. we'll look into it.
     
    keeponshading likes this.
  11. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    149
    Issues still exists in
    Unity 2019.1.2
    Adressables 0.8.4

    any way to fix?
     
  12. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    149
  13. 4sascha

    4sascha

    Joined:
    Mar 9, 2017
    Posts:
    45