# CameraEditorUtils

> Utilities for cameras.

## Definition

* **Type:** Class
* **Namespace:** [UnityEditor](/engine/6000.0/script-reference/unityeditor.md)
* **Assembly:** UnityEditor

```csharp
public static class CameraEditorUtils
```

## Static Properties

| Property                                                                                                                              | Description                                                                                       |
| ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| [GameViewAspectRatio](/engine/6000.0/script-reference/unityeditor/cameraeditorutils/gameviewaspectratio.md)                           | The aspect ratio of the game view.                                                                |
| [virtualCameraPreviewInstantiator](/engine/6000.0/script-reference/unityeditor/cameraeditorutils/virtualcamerapreviewinstantiator.md) | Override this function to pass your own Camera provider to generate previews for virtual cameras. |

## Static Methods

| Method                                                                                                                      | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| --------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [DrawFrustumGizmo](/engine/6000.0/script-reference/unityeditor/cameraeditorutils/drawfrustumgizmo.md)                       | Draw the frustrum gizmo of a camera.                                                                                                                                                                                                                                                                                                                                                                                                                              |
| [GetFrustumAspectRatio](/engine/6000.0/script-reference/unityeditor/cameraeditorutils/getfrustumaspectratio.md)             | Calculate the frustrum aspect ratio of a camera.                                                                                                                                                                                                                                                                                                                                                                                                                  |
| [GetFrustumPlaneAt](/engine/6000.0/script-reference/unityeditor/cameraeditorutils/getfrustumplaneat.md)                     | Calculate the points of the frustrum plane facing the viewer at a specific distance.                                                                                                                                                                                                                                                                                                                                                                              |
| [HandleFrustum](/engine/6000.0/script-reference/unityeditor/cameraeditorutils/handlefrustum.md)                             | Draw the frustrum handles for a camera.                                                                                                                                                                                                                                                                                                                                                                                                                           |
| [IsViewportRectValidToRender](/engine/6000.0/script-reference/unityeditor/cameraeditorutils/isviewportrectvalidtorender.md) | Check whether a viewport is valid.                                                                                                                                                                                                                                                                                                                                                                                                                                |
| [PerspectiveClipToWorld](/engine/6000.0/script-reference/unityeditor/cameraeditorutils/perspectivecliptoworld.md)           | Calculate the world space position of a point in clip space.                                                                                                                                                                                                                                                                                                                                                                                                      |
| [TryGetFrustum](/engine/6000.0/script-reference/unityeditor/cameraeditorutils/trygetfrustum.md)                             | Calculate the frustrum corners.                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| [TryGetSensorGateFrustum](/engine/6000.0/script-reference/unityeditor/cameraeditorutils/trygetsensorgatefrustum.md)         | Calculate the frustrum corners from the sensor physical properties, without taking gate fitting into account. To get the actual frustum with gate fit adjustment, use [CameraEditorUtils.TryGetFrustum](/engine/6000.0/script-reference/unityeditor/cameraeditorutils/trygetfrustum.md). This method is equivalent to [CameraEditorUtils.TryGetFrustum](/engine/6000.0/script-reference/unityeditor/cameraeditorutils/trygetfrustum.md) for non-physical cameras. |
