- Home /
Possible to load scenes from directory?
If I have scenes copied to my build directory, is it possible to load them by referring to their location?
Eg. Can I load scenes like this:
Application.LoadLevel("C:\Build\Scene1.unity");
Or would I need to create my own level manager?
Edit: Actually I guess I could use asset bundles? Is that a sufficient way of loading dynamic content?
just add the scenes in File -> BuildSettings then refer to them by name/index in the list
Answer by Graham-Dunnett · Jan 01, 2015 at 08:55 PM
No, Unity cannot load scenes from the file system. Asset Bundles is the way to go, assuming you have a Pro license.
Answer by Glucagon511 · Feb 28, 2016 at 10:50 AM
In my opinion, loading assets from a file system is not always the best option. In this case, you can use the SceneMananger.LoadScene(int Index);
or SceneManager.LoadScene(string sceneName);
.
You can view your scenes by going to Unity and press Ctrl + Shift + B or go to File -> Build Settings to bring up the Build menu and arrange them by dragging them up or down.
Answer by J0hn4n · Oct 20, 2017 at 11:43 PM
Or create a way to store lvl information like prefabs positions, rotations , etc ... and one manager will load that and put the things in place.