Class Context
Class containing all data used by the LookDev Window to render
Namespace: UnityEditor.Rendering.LookDev
Syntax
[Serializable]
public class Context : ScriptableObject, IDisposable
Properties
cameraSynced
State if both views camera movement are synced or not
Declaration
public bool cameraSynced { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
environmentLibrary
The currently used Environment
Declaration
public EnvironmentLibrary environmentLibrary { get; }
Property Value
Type | Description |
---|---|
EnvironmentLibrary |
layout
The currently used layout
Declaration
public LayoutContext layout { get; }
Property Value
Type | Description |
---|---|
LayoutContext |
viewContexts
Helper function to get ViewIterator on ViewContexts
Declaration
public Context.ViewIterator viewContexts { get; }
Property Value
Type | Description |
---|---|
Context.ViewIterator |
Methods
GetViewContent(ViewIndex)
Get datas relative to a view
Declaration
public ViewContext GetViewContent(ViewIndex index)
Parameters
Type | Name | Description |
---|---|---|
ViewIndex | index | The view index to look at |
Returns
Type | Description |
---|---|
ViewContext | Datas for the selected view |
SetFocusedCamera(ViewIndex)
Change focused view. Focused view is the base view to copy data when syncing views' cameras
Declaration
public void SetFocusedCamera(ViewIndex index)
Parameters
Type | Name | Description |
---|---|---|
ViewIndex | index | The index of the view |
SynchronizeCameraStates(ViewIndex)
Synchronize cameras from both view using data from the baseCameraState
Declaration
public void SynchronizeCameraStates(ViewIndex baseCameraState)
Parameters
Type | Name | Description |
---|---|---|
ViewIndex | baseCameraState | The ViewIndex to be used as reference |
UpdateEnvironmentLibrary(EnvironmentLibrary)
Update the environment library used.
Declaration
public void UpdateEnvironmentLibrary(EnvironmentLibrary library)
Parameters
Type | Name | Description |
---|---|---|
EnvironmentLibrary | library | The new EnvironmentLibrary |