docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SceneReference

    Scene wrapper to allow proper serialization of SceneAsset references. SceneAsset only exist in Editor so the path is stored as well any time the object is serialized. The Scene path is used at runtime, assuming the Scene has been added to the Build Settings.

    Inheritance
    object
    SceneReference
    Implements
    ISerializationCallbackReceiver
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Sequences
    Assembly: Unity.Sequences.dll
    Syntax
    [Serializable]
    public class SceneReference : ISerializationCallbackReceiver

    Properties

    path

    Path to the Scene asset, relative to the project folder.

    Declaration
    public string path { get; set; }
    Property Value
    Type Description
    string

    Operators

    implicit operator string(SceneReference)

    Declaration
    public static implicit operator string(SceneReference sceneReference)
    Parameters
    Type Name Description
    SceneReference sceneReference
    Returns
    Type Description
    string

    Implements

    ISerializationCallbackReceiver
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)