# AddMeshModifier(MeshModificationCallback, bool, int)

> Registers a modifier that runs after this element's mesh generation completes, before its vertex data is copied to the GPU.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.UIElements](/engine/6000.7/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

```csharp
public void AddMeshModifier(MeshModificationCallback callback, bool recursive = false, int priority = 0)
```

### Parameters

**** (\[MeshModificationCallback]\(/engine/6000.7/script-reference/unityengine/uielements/meshmodificationcallback)): Callback invoked on the main thread.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): If `true`, the callback fires for this element plus every dirty descendant. Panel-wide post-processing is achieved by registering recursively on the panel root element.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Dominant ordering axis for callback invocation. Lower values run first.
