# ThrowOnSetRenderTarget

> Throw an exception when SetRenderTarget is recorded on a command buffer. This is mainly usefull when using native renderpasses to avoid inadvertently recording SetRenderTarget commands on the command buffer.

## Definition

* **Type:** Field
* **Namespace:** [UnityEngine.Rendering](/engine/6000.7/script-reference/unityengine/rendering.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public static bool ThrowOnSetRenderTarget
```
