- Home /
SceneManager.Load is not worked in subfolders
I want to make a scene transision from Assets/Scenes/SomeScene.unity to Assets/Scenes/SubFolder/OtherScene.unity.
It was succeeded to make a transision Scenes/Scene1 to Scenes/Scene2 with SceneManager.LoadScene("SceneName"), but Scenes/Scene1 to Scenes/Subfolder/Scene2 is not work well.
I checked BuildSettings and both scenes are there.
What is a problem.
Thanks.
code: SceneManager.LoadScene("SubFolder/Scene2");
Unity 2019.4.14f1
Answer by Bunny83 · Nov 16, 2020 at 01:42 PM
Scene names do not contain any kind of path information. The actual scenes you can load have to be added in the build dialog. Scenes are not simply shipped with your game, you have to add them to the scenes list. Only scenes in that list can be loaded at runtime and are actually shipped with your game.
I removed parent folder information "Subfolder/" and it("Scene2") works. Thanks.