Class CameraExtensions
Contains extension methods for Camera class.
Inherited Members
Namespace: UnityEngine.Rendering.Universal
Syntax
public static class CameraExtensions
Methods
DestroyVolumeStack(Camera)
Destroys the volume stack for this camera.
Declaration
public static void DestroyVolumeStack(this Camera camera)
Parameters
Type | Name | Description |
---|---|---|
Camera | camera |
DestroyVolumeStack(Camera, UniversalAdditionalCameraData)
Destroys the volume stack for this camera.
Declaration
public static void DestroyVolumeStack(this Camera camera, UniversalAdditionalCameraData cameraData)
Parameters
Type | Name | Description |
---|---|---|
Camera | camera | |
UniversalAdditionalCameraData | cameraData |
GetUniversalAdditionalCameraData(Camera)
Universal Render Pipeline exposes additional rendering data in a separate component. This method returns the additional data component for the given camera or create one if it doesn't exists yet.
Declaration
public static UniversalAdditionalCameraData GetUniversalAdditionalCameraData(this Camera camera)
Parameters
Type | Name | Description |
---|---|---|
Camera | camera |
Returns
Type | Description |
---|---|
UniversalAdditionalCameraData | The |
GetVolumeFrameworkUpdateMode(Camera)
Returns the VolumeFrameworkUpdateMode set on the camera.
Declaration
public static VolumeFrameworkUpdateMode GetVolumeFrameworkUpdateMode(this Camera camera)
Parameters
Type | Name | Description |
---|---|---|
Camera | camera |
Returns
Type | Description |
---|---|
VolumeFrameworkUpdateMode |
SetVolumeFrameworkUpdateMode(Camera, VolumeFrameworkUpdateMode)
Sets the VolumeFrameworkUpdateMode for the camera.
Declaration
public static void SetVolumeFrameworkUpdateMode(this Camera camera, VolumeFrameworkUpdateMode mode)
Parameters
Type | Name | Description |
---|---|---|
Camera | camera | |
VolumeFrameworkUpdateMode | mode |
UpdateVolumeStack(Camera)
Updates the volume stack for this camera. This function will only update the stack when the camera has VolumeFrameworkUpdateMode set to ViaScripting or when it set to UsePipelineSettings and the update mode on the Render Pipeline Asset is set to ViaScripting.
Declaration
public static void UpdateVolumeStack(this Camera camera)
Parameters
Type | Name | Description |
---|---|---|
Camera | camera |
UpdateVolumeStack(Camera, UniversalAdditionalCameraData)
Updates the volume stack for this camera. This function will only update the stack when the camera has ViaScripting selected or if the camera is set to UsePipelineSettings and the Render Pipeline Asset is set to ViaScripting.
Declaration
public static void UpdateVolumeStack(this Camera camera, UniversalAdditionalCameraData cameraData)
Parameters
Type | Name | Description |
---|---|---|
Camera | camera | |
UniversalAdditionalCameraData | cameraData |