# PrepareCamera

> Use this method to prepare per-Camera VFX commands for this frame.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.VFX](/engine/6000.7/script-reference/unityengine/vfx.md)
* **Assembly:** UnityEngine.VFXModule

## PrepareCamera(Camera)

Use this method to prepare per-Camera VFX commands for this frame.

```csharp
public static void PrepareCamera(Camera cam)
```

### Parameters

**** (\[Camera]\(/engine/6000.7/script-reference/unityengine/camera)): The Camera to prepare for processing VFX commands.

### Remarks

This function updates Materials that the VisualEffect uses internally, but does not execute any rendering commands. To execute rendering commands, call [VFXManager.ProcessCamera](/engine/6000.7/script-reference/unityengine/vfx/vfxmanager/processcamera.md).

Scriptable Render Pipelines (SRP) are responsible for calling this function. The High Definition and Universal Render Pipelines implement this call.

If you create your own SRP, you should typically call this function before culling.

## PrepareCamera(Camera, VFXCameraXRSettings)

Use this method to prepare per-Camera VFX commands for this frame.

```csharp
public static void PrepareCamera(Camera cam, VFXCameraXRSettings camXRSettings)
```

### Parameters

**** (\[Camera]\(/engine/6000.7/script-reference/unityengine/camera)): The Camera to prepare for processing VFX commands.**** (\[VFXCameraXRSettings]\(/engine/6000.7/script-reference/unityengine/vfx/vfxcameraxrsettings)): The XR settings that the Visual Effect Graph uses to prepare the Camera.

### Remarks

This function updates Materials that the VisualEffect uses internally, but does not execute any rendering commands. To execute rendering commands, call [VFXManager.ProcessCamera](/engine/6000.7/script-reference/unityengine/vfx/vfxmanager/processcamera.md).

Scriptable Render Pipelines (SRP) are responsible for calling this function. The High Definition and Universal Render Pipelines implement this call.

If you create your own SRP, you should typically call this function before culling.
