docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SceneReference

    A reference to a scene that works at both edit and runtime.

    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.Perception.Utilities
    Assembly: Unity.Perception.Runtime.dll
    Syntax
    [Serializable]
    [MovedFrom("UnityEngine.Perception.Internal")]
    public class SceneReference : ISerializationCallbackReceiver

    Fields

    sceneAsset

    An in-editor reference to a scene asset.

    Declaration
    public SceneAsset sceneAsset
    Field Value
    Type Description
    SceneAsset
    Remarks

    We convert this reference to a simple path to a scene (sceneAsset) for runtime use.

    Properties

    scene

    The path to the scene referenced by (sceneAsset).

    Declaration
    public Scene scene { get; }
    Property Value
    Type Description
    Scene

    scenePath

    The path to the scene specified by (sceneAsset).

    Declaration
    public string scenePath { get; }
    Property Value
    Type Description
    string

    Methods

    OnAfterDeserialize()

    After serialization function

    Declaration
    public void OnAfterDeserialize()

    OnBeforeSerialize()

    Before serialization, we populate the scenePath with information from the sceneAsset

    Declaration
    public void OnBeforeSerialize()

    Implements

    ISerializationCallbackReceiver
    In This Article
    Back to top
    Copyright © 2024 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)