# BatchDrawCommand

> Represents a draw command for a BatchRendererGroup.

## Definition

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

```csharp
public struct BatchDrawCommand
```

## Fields

| Value                                                                                                                | Description                                                                                                                                                                                                                                                  |
| -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [batchID](/engine/6000.0/script-reference/unityengine/rendering/batchdrawcommand/batchid.md)                         | The batch ID that this draw command uses. Determines the metadata values that are available to a shader.                                                                                                                                                     |
| [flags](/engine/6000.0/script-reference/unityengine/rendering/batchdrawcommand/flags.md)                             | Specifies rendering options for the draw command.                                                                                                                                                                                                            |
| [lightmapIndex](/engine/6000.0/script-reference/unityengine/rendering/batchdrawcommand/lightmapindex.md)             | The index of the baked lightmap used in this draw command. If [BatchDrawCommandFlags.UseLegacyLightmapsKeyword](/engine/6000.0/script-reference/unityengine/rendering/batchdrawcommandflags/uselegacylightmapskeyword.md) is not set, this value is ignored. |
| [materialID](/engine/6000.0/script-reference/unityengine/rendering/batchdrawcommand/materialid.md)                   | Identifies which [Material](/engine/6000.0/script-reference/unityengine/material.md) to use to render the instances in this draw command.                                                                                                                    |
| [meshID](/engine/6000.0/script-reference/unityengine/rendering/batchdrawcommand/meshid.md)                           | Identifies which [Mesh](/engine/6000.0/script-reference/unityengine/mesh.md) to use to render the instances in this draw command.                                                                                                                            |
| [sortingPosition](/engine/6000.0/script-reference/unityengine/rendering/batchdrawcommand/sortingposition.md)         | Together with [BatchDrawCommand.flags](/engine/6000.0/script-reference/unityengine/rendering/batchdrawcommand/flags.md), this specifies how to depth sort the instances in this draw command.                                                                |
| [splitVisibilityMask](/engine/6000.0/script-reference/unityengine/rendering/batchdrawcommand/splitvisibilitymask.md) | Indicates which splits that the draw command is visible in.                                                                                                                                                                                                  |
| [submeshIndex](/engine/6000.0/script-reference/unityengine/rendering/batchdrawcommand/submeshindex.md)               | Specifies which sub-mesh of the Mesh identified by [BatchDrawCommand.meshID](/engine/6000.0/script-reference/unityengine/rendering/batchdrawcommand/meshid.md) to use to render the instances in this draw command.                                          |
| [visibleCount](/engine/6000.0/script-reference/unityengine/rendering/batchdrawcommand/visiblecount.md)               | The number of instances to draw with this draw command. This must be a value greater than `1`.                                                                                                                                                               |
| [visibleOffset](/engine/6000.0/script-reference/unityengine/rendering/batchdrawcommand/visibleoffset.md)             | The index of the element in [BatchCullingOutputDrawCommands.visibleInstances](/engine/6000.0/script-reference/unityengine/rendering/batchcullingoutputdrawcommands/visibleinstances.md) that matches the first instance in this draw command.                |
