# MeshGenerationOptions

> Options for generating meshes.

## Definition

* **Type:** Enum
* **Namespace:** [UnityEngine.XR](/engine/6000.5/script-reference/unityengine/xr.md)
* **Assembly:** UnityEngine.XRModule

```csharp
[Flags]
public enum MeshGenerationOptions
```

## Remarks

Use this enum with [XRMeshSubsystem.GenerateMeshAsync](/engine/6000.5/script-reference/unityengine/xr/xrmeshsubsystem/generatemeshasync.md) to tell Unity how to handle data from the mesh provider.

The mesh provider can supply a transform along with the mesh data. When this happens, the value of `MeshGenerationOptions` determines what Unity does with the supplied transform. If `ConsumeTransform` is set, Unity ignores the supplied transform. Otherwise, Unity applies the supplied transform to the vertices of the mesh, and rebakes the physics mesh. These transformation and rebaking operations can be CPU-intensive; if you do not need to perform these operations, you should set `ConsumeTransform`.

If the mesh provider does not supply a transform, the value of `MeshGenerationOptions` has no effect.

Additional Resources: [XRMeshSubsystem.GenerateMeshAsync](/engine/6000.5/script-reference/unityengine/xr/xrmeshsubsystem/generatemeshasync.md), [MeshGenerationResult](/engine/6000.5/script-reference/unityengine/xr/meshgenerationresult.md)

## Fields

| Value                                                                                                        | Description                                                   |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------- |
| [ConsumeTransform](/engine/6000.5/script-reference/unityengine/xr/meshgenerationoptions/consumetransform.md) | Indicates you plan to consume the resulting mesh's transform. |
| [None](/engine/6000.5/script-reference/unityengine/xr/meshgenerationoptions/none.md)                         | No options are specified.                                     |
