Search Unity

[2018.3.7f1][0.6.7] Get empty loaded scenes in case of the built-in ones

Discussion in 'Addressables' started by yuweichang, Mar 28, 2019.

  1. yuweichang

    yuweichang

    Joined:
    Nov 22, 2018
    Posts:
    6
    Hello,

    After upgrading my AAS from 0.5.3 to 0.6.7, I found that in the Editor Play Mode I'll get empty loaded scenes in case of the built-in ones. That means there is no error, and the loaded scene shows up in the Hierarchy, but the rootCount is 0.

    I've checked the source codes and found that this might be caused by the following issues:
    1. Since my Unity version is 2018.3.7f1, the default scene provider uses EditorSceneManager.LoadSceneAsyncInPlayMode to load the scene in the Play Mode, according to SceneProvider.cs line# 53
      op = UnityEditor.SceneManagement.EditorSceneManager.LoadSceneAsyncInPlayMode(path, m_LoadParameters);
    2. I've checked the input "path" argument here, and found that it's a partial path under "Assets/" without the extension.
    3. EditorSceneManager.LoadSceneAsyncInPlayMode needs a path with "Assets/" and with the extension.

    I think I'll set a custom SceneProvider to work around this problem at this moment.
    But before replacing the SceneProvider, I would like to know if I made anything wrong to cause this trouble. Or is this just a bug and will be fixed in the future? Thanks a lot!