I was wondering why Addressables.LoadSceneAsync returns an empty scene be it Single, Additive, allow or not allow activation.
There is a code path that goes to EditorSceneManager.LoadSceneAsyncInPlayMode in editor instead of SceneManager.LoadSceneAsync which works, and I tried this code manually and it also loads an empty scene. (It loads but has no game object) Are there any requirements I overlooked to make it work? (Both via AAS or normally)
I seems to get it now. The first parameter of this method wants the path. But this method has flaws that if I put invalid path such as just the scene’s name, it loads an empty scene of that name.
Now getting back to AAS which seems to turn the key to path for this method. I think this is now AAS bug as my scene name was definitely also the key in the greyed out section. But when I dragged the scene out to below, which still use the same “Title” name as when greyed out, it works. So any chance that Built In Data > EditorSceneList is not working in editor?
Not sure if same question, but I am also wondering about this.
Can Addressables load anything in the Built In Data?
And is there anything special about the “Default Local Group (Default)” group compared to any other group I create?
I heard it could load things from Resources (async) by using the same key as Resources.Load (which is essentially the path relative to Resources) so I assume it should be able to load things in Built In Data.
If you check the Addressable box on the asset inspector it will go to the default group.
Ok, you could try this with the Scene Loading of AAS sample from pinned thread.
After opening the project in 2019.1.2f, the button could work because there is a key “FirstScene” assigned to the scene Foundation in AAS panel, then the code also use the string “FirstScene”, so it could translate to the path to Foundation scene.
To demonstrate that the grayed out name doesn’t get the same treatment, remove that entry, rename the Foundation scene to FirstScene, and then add it to build settings. It should appear in the greyed out area with a name “FirstScene”
Then if you try pressing the button again, it would still load FirstScene but the content is empty. (The button remains just because there is no camera to clear the screen)
If we follow the steps laid out by @5argon then we could repro the bug. That is fixed as of 1.1.5. When we try with current addressables, doing the steps described, it works now.
So what are you doing to get a black screen on scene load? Please describe your steps/situation, or file a unity bug.
I fixed it by manually using the LoadAsyncInPlayMode and appending the Application.dataPath, during fast mode in the editor, to prevent any blocking of our currently development.