# HasInvokeOnRenderObjectCallbacks()

> Check if any objects in the scene have OnRenderObject callbacks registered.

## Definition

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

```csharp
public bool HasInvokeOnRenderObjectCallbacks()
```

### Returns

| Type                                                          | Description                                               |
| ------------------------------------------------------------- | --------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if there are OnRenderObject callbacks false if none. |

### Remarks

You can use this function to check if [ScriptableRenderContext.InvokeOnRenderObjectCallback](/engine/6000.0/script-reference/unityengine/rendering/scriptablerendercontext/invokeonrenderobjectcallback.md) will actually call any callbacks. This can be usefull to avoid calling InvokeOnRenderObjectCallback. It als means no arbitrary code will run in the callbacks that could change graphics state. This can help your renderpipeline to avoid doing unececarry graphics state changes before/after the callbacks.
