Class ViewContext | Core RP Library | 8.0.1
docs.unity3d.com
    Show / Hide Table of Contents

    Class ViewContext

    Data container containing content of a view

    Inheritance
    Object
    ViewContext
    Namespace: UnityEditor.Rendering.LookDev
    Syntax
    [Serializable]
    public class ViewContext

    Properties

    camera

    The position and rotation of the camera

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

    debug

    The currently viewed debugState

    Declaration
    public DebugContext debug { get; }
    Property Value
    Type Description
    DebugContext

    environment

    The currently used Environment

    Declaration
    public Environment environment { get; }
    Property Value
    Type Description
    Environment

    hasEnvironment

    Check if an Environment is registered for this view. The result will be accurate even if the Environment have not been reloaded yet.

    Declaration
    public bool hasEnvironment { get; }
    Property Value
    Type Description
    Boolean

    hasViewedObject

    Check if an Environment is registered for this view. The result will be accurate even if the object have not been reloaded yet.

    Declaration
    public bool hasViewedObject { get; }
    Property Value
    Type Description
    Boolean

    viewedInstanceInPreview

    The currently displayed instance of viewedObjectReference. It will be instantiated when pushing changes to renderer. See UnityEditor.Rendering.LookDev.LookDev.SaveContextChangeAndApply(UnityEditor.Rendering.LookDev.ViewIndex)

    Declaration
    public GameObject viewedInstanceInPreview { get; }
    Property Value
    Type Description
    GameObject

    viewedObjectReference

    Reference to the object given for instantiation.

    Declaration
    public GameObject viewedObjectReference { get; }
    Property Value
    Type Description
    GameObject

    Methods

    ResetCameraState()

    Reset the camera state to default values

    Declaration
    public void ResetCameraState()

    UpdateEnvironment(Object)

    Update the environment used.

    Declaration
    public void UpdateEnvironment(Object environmentOrCubemapAsset)
    Parameters
    Type Name Description
    UnityEngine.Object environmentOrCubemapAsset

    The new Environment to use. Or the to use to build a new one. Other types will raise an ArgumentException.

    UpdateViewedObject(GameObject)

    Update the object reference used for instantiation.

    Declaration
    public void UpdateViewedObject(GameObject viewedObject)
    Parameters
    Type Name Description
    GameObject viewedObject

    The new reference.

    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