class in UnityEngine.SceneManagement / extends ScriptableObject

A scriptable object that holds a reference to a specific scene and has functions that allow to load it.

To create a new one go to the project window and do right click → CreateScene Reference and add the scene you want to the Scene Asset field. This object will maintain a reference to the same scene even if you change the name of the scene or its index in the build settings.

It also contains functions that you can call to load that scene from UI buttons, Unity Events or your own code.


Inspector

Scene Asset .unity file this object is referencing.

Properties

SceneName string Name of the scene referenced by this object.
ScenePath string Path of the scene referenced by this object relative to the project folder.

Public Methods

Load Scene

Load the scene this object is referencing.

Transition To Scene

Load a scene playing a transition effect.

Get Scene

If it's loaded, return the Scene referenced by this object. If not, return an invalid Scene.