Class ViewContext
Data container containing content of a view
Inherited Members
Namespace: UnityEditor .Rendering.LookDev
Assembly: Unity.RenderPipelines.Core.Editor.dll
Syntax
[Serializable]
public class ViewContext
Properties
camera
The position and rotation of the camera
Declaration
public CameraState camera { get; }
Property Value
Type | Description |
---|---|
Camera |
debug
The currently viewed debugState
Declaration
public DebugContext debug { get; }
Property Value
Type | Description |
---|---|
Debug |
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 |
---|---|
bool |
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 |
---|---|
bool |
viewedInstanceInPreview
The currently displayed instance of viewed
Declaration
public GameObject viewedInstanceInPreview { get; }
Property Value
Type | Description |
---|---|
Game |
viewedObjectReference
Reference to the object given for instantiation.
Declaration
public GameObject viewedObjectReference { get; }
Property Value
Type | Description |
---|---|
Game |
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 |
---|---|---|
Object | environmentOrCubemapAsset | The new Environment to use. Or the Cubemap 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 |
---|---|---|
Game |
viewedObject | The new reference. |