# SetFailOperation(StencilOp)

> What to do with the contents of the buffer if the stencil test fails.

## Definition

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

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

### Parameters

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

### Remarks

Sets [StencilState.failOperationBack](/engine/6000.0/script-reference/unityengine/rendering/stencilstate/failoperationback.md) and [StencilState.failOperationFront](/engine/6000.0/script-reference/unityengine/rendering/stencilstate/failoperationfront.md).
