Class Stage | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class Stage

    Class handling object of the scene with isolation from other scene based on culling

    Inheritance
    System.Object
    Stage
    Namespace: UnityEditor.Rendering.LookDev
    Syntax
    public class Stage : IDisposable

    Constructors

    Stage(String)

    Construct a new stage to let your object live. A stage is a scene with visibility isolation.

    Declaration
    public Stage(string sceneName)
    Parameters
    Type Name Description
    System.String sceneName

    Name of the scene used.

    Properties

    camera

    Get access to the stage's camera

    Declaration
    public Camera camera { get; }
    Property Value
    Type Description
    Camera

    runtimeInterface

    Declaration
    public StageRuntimeInterface runtimeInterface { get; }
    Property Value
    Type Description
    StageRuntimeInterface

    scene

    Get access to the stage's scene

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

    sunLight

    Get access to the stage's light

    Declaration
    public Light sunLight { get; }
    Property Value
    Type Description
    Light

    Methods

    Clear(Boolean)

    Clear all scene object except camera.

    Declaration
    public void Clear(bool persistent = false)
    Parameters
    Type Name Description
    System.Boolean persistent

    [OPTIONAL] If true, clears also persistent objects. Default value: false.

    CreateGameObjectIntoStage(Boolean)

    Create a GameObject into the stage.

    Declaration
    public GameObject CreateGameObjectIntoStage(bool persistent = false)
    Parameters
    Type Name Description
    System.Boolean persistent

    [OPTIONAL] If true, the object is not recreated with the scene update. Default value: false.

    Returns
    Type Description
    GameObject

    The created GameObject

    Dispose()

    Clear and close the stage's scene.

    Declaration
    public void Dispose()

    Finalize()

    Declaration
    protected void Finalize()

    InstantiateIntoStage(GameObject, Boolean)

    Instantiate a scene GameObject or a prefab into the stage's scene. It is instantiated at origin.

    Declaration
    public GameObject InstantiateIntoStage(GameObject prefabOrSceneObject, bool persistent = false)
    Parameters
    Type Name Description
    GameObject prefabOrSceneObject

    The element to instantiate

    System.Boolean persistent

    [OPTIONAL] If true, the object is not recreated with the scene update. Default value: false.

    Returns
    Type Description
    GameObject

    The instance

    See Also
    MoveIntoStage(GameObject, Boolean)

    InstantiateIntoStage(GameObject, Vector3, Quaternion, Boolean)

    Instantiate a scene GameObject or a prefab into the stage's scene at a specific position and rotation.

    Declaration
    public GameObject InstantiateIntoStage(GameObject prefabOrSceneObject, Vector3 position, Quaternion rotation, bool persistent = false)
    Parameters
    Type Name Description
    GameObject prefabOrSceneObject

    The element to instantiate

    Vector3 position

    The new world position

    Quaternion rotation

    The new world rotation

    System.Boolean persistent

    [OPTIONAL] If true, the object is not recreated with the scene update. Default value: false.

    Returns
    Type Description
    GameObject

    The instance

    See Also
    MoveIntoStage(GameObject, Boolean)

    MoveIntoStage(GameObject, Boolean)

    Move a GameObject into the stage's scene at origin.

    Declaration
    public void MoveIntoStage(GameObject gameObject, bool persistent = false)
    Parameters
    Type Name Description
    GameObject gameObject

    The gameObject to move.

    System.Boolean persistent

    [OPTIONAL] If true, the object is not recreated with the scene update. Default value: false.

    See Also
    InstantiateIntoStage(GameObject, Boolean)

    MoveIntoStage(GameObject, Vector3, Quaternion, Boolean)

    Move a GameObject into the stage's scene at specific position and rotation.

    Declaration
    public void MoveIntoStage(GameObject gameObject, Vector3 position, Quaternion rotation, bool persistent = false)
    Parameters
    Type Name Description
    GameObject gameObject

    The gameObject to move.

    Vector3 position

    The new world position

    Quaternion rotation

    The new world rotation

    System.Boolean persistent

    [OPTIONAL] If true, the object is not recreated with the scene update. Default value: false.

    See Also
    InstantiateIntoStage(GameObject, Boolean)

    SetGameObjectVisible(Boolean)

    Changes stage scene's objects visibility.

    Declaration
    public void SetGameObjectVisible(bool visible)
    Parameters
    Type Name Description
    System.Boolean visible

    True: make them visible. False: hide them.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023