You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Autogenerated ScriptableObjects that are stable references to the scenes configured in Unity Build Settings.
Features
Scene references are automatically generated/refreshed whenever the scenes in Build Settings change or any scene is renamed/moved, no code or manual setup required
Scene references are stable and based on their GUID: if a scene is renamed/moved, all existing references to the corresponding SceneReference are maintained
No extra files are created in your project: everything lives in the asset imported from an empty file that lives in the package's own folder
Utility methods SceneReference.Load, SceneReference.LoadAsync and SceneReference.UnloadAsync to load/unload scenes directly from references
Caveats
Only Scenes enabled in Build Settings are generated
Referencing scenes that are not in Build Settings is not supported at all
If you have multiple build configurations that involve changing which Scenes are enabled, previous references to disabled ones will be missing from the build and will be null at runtime
Use the Inspector to assign any of the SceneReferences automatically generated from your project's Build Settings
Use SceneReference.Load, SceneReference.LoadAsync and SceneReference.UnloadAsync to load/unload scenes.
Alternatively, use SceneReference.BuildIndex or SceneReference.Path as argument to SceneManager load/unload methods.