# GetMesh

> Gets the value of a named Mesh property.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.VFX](/engine/6000.6/script-reference/unityengine/vfx.md)
* **Assembly:** UnityEngine.VFXModule

## GetMesh(int)

Gets the value of a named Mesh property.

```csharp
public Mesh GetMesh(int nameID)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The ID of the property. This is the same ID that [Shader.PropertyToID](/engine/6000.6/script-reference/unityengine/shader/propertytoid.md) returns.

### Returns

| Type                                                        | Description                                                                                                                                                            |
| ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Mesh](/engine/6000.6/script-reference/unityengine/mesh.md) | The value for the Mesh you specify. Returns `null` if [VisualEffect.HasMesh](/engine/6000.6/script-reference/unityengine/vfx/visualeffect/hasmesh.md) returns `false`. |

## GetMesh(string)

Gets the value of a named Mesh property.

```csharp
public Mesh GetMesh(string name)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The name of the property.

### Returns

| Type                                                        | Description                                                                                                                                                            |
| ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Mesh](/engine/6000.6/script-reference/unityengine/mesh.md) | The value for the Mesh you specify. Returns `null` if [VisualEffect.HasMesh](/engine/6000.6/script-reference/unityengine/vfx/visualeffect/hasmesh.md) returns `false`. |
