# MarkModified()

> Notify Renderer components of mesh geometry change.

## Definition

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

```csharp
public void MarkModified()
```

### Remarks

By default, whenever Mesh data changes that could affect the geometry of the mesh, all [Renderer](/engine/6000.0/script-reference/unityengine/renderer.md) components that use this mesh get notified. For example, [MeshRenderer](/engine/6000.0/script-reference/unityengine/meshrenderer.md) components recalculate their bounding boxes, and [ParticleSystem.ShapeModule](/engine/6000.0/script-reference/unityengine/particlesystem/shapemodule.md) rebuild internal data used for mesh surface emission.

However a [MeshUpdateFlags.DontNotifyMeshUsers](/engine/6000.0/script-reference/unityengine/rendering/meshupdateflags/dontnotifymeshusers.md) flag can be used in [Mesh.SetVertexBufferData](/engine/6000.0/script-reference/unityengine/mesh/setvertexbufferdata.md), [Mesh.SetIndexBufferData](/engine/6000.0/script-reference/unityengine/mesh/setindexbufferdata.md) or [Mesh.SetSubMesh](/engine/6000.0/script-reference/unityengine/mesh/setsubmesh.md) in order to skip this notification. This can be beneficial when you know that many mesh modifications will happen before the renderer components will need to actually update. A manual call to MarkModified can be used later to notify the dependent renderer components of a mesh geometry change.

MarkModified function only needs to be called if you actually use the DontNotifyMeshUsers flag. In all other cases the mesh change notifications happen automatically.

Additional Resources: [Mesh.SetVertexBufferData](/engine/6000.0/script-reference/unityengine/mesh/setvertexbufferdata.md), [Mesh.SetIndexBufferData](/engine/6000.0/script-reference/unityengine/mesh/setindexbufferdata.md), [Mesh.SetSubMesh](/engine/6000.0/script-reference/unityengine/mesh/setsubmesh.md).
