Class CameraEditorUtils
Utility functions for cameras in the editor.
Namespace: UnityEditor.Rendering
Syntax
public static class CameraEditorUtils
Properties
GUITextureBlit2SRGBMaterial
The material used to display a texture into SRGB
Declaration
public static Material GUITextureBlit2SRGBMaterial { get; }
Property Value
Type | Description |
---|---|
Material |
Methods
DrawCameraSceneViewOverlay(Object, SceneView, CameraEditorUtils.GetPreviewCamera)
Draw the overlay of a Camera
Declaration
public static void DrawCameraSceneViewOverlay(Object target, SceneView sceneView, CameraEditorUtils.GetPreviewCamera previewCameraGetter)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Object | target | The Camera that we want a preview |
SceneView | sceneView | The scene view where to draw it |
CameraEditorUtils.GetPreviewCamera | previewCameraGetter | The way to get the preview camera corresponding to the target |
IsViewPortRectValidToRender(Rect)
Check if the view port rect have a positive size
Declaration
public static bool IsViewPortRectValidToRender(Rect normalizedViewPortRect)
Parameters
Type | Name | Description |
---|---|---|
Rect | normalizedViewPortRect | The rect to check |
Returns
Type | Description |
---|---|
Boolean | True: the rect have positive size |