# SetZFailOperation(StencilOp)

> What to do with the contents of the buffer if the stencil test passes, but the depth test fails.

## Definition

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

```csharp
public void SetZFailOperation(StencilOp value)
```

### Parameters

**** (\[StencilOp]\(/engine/6000.0/script-reference/unityengine/rendering/stencilop)): The value to set.

### Remarks

Sets [StencilState.zFailOperationBack](/engine/6000.0/script-reference/unityengine/rendering/stencilstate/zfailoperationback.md) and [StencilState.zFailOperationFront](/engine/6000.0/script-reference/unityengine/rendering/stencilstate/zfailoperationfront.md).
