> For the complete documentation index, see [llms.txt](https://mindcodeinteractive.gitbook.io/easy-build-system/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mindcodeinteractive.gitbook.io/easy-build-system/reference/building-manager/building-batching-system.md).

# Building Batching System

Combines meshes within [Building Groups](/easy-build-system/reference/building-group.md) to reduce draw calls and improve performance.

***

### How Batching Works

The Batching System combines all meshes in a [Building Group](/easy-build-system/reference/building-group.md) into one.\
Entering building mode unbatches nearby groups for part manipulation, exiting re-batches them.

Batching is automatic and distance-based.\
Nearby groups unbatch in building mode and re-batch on exit; distant groups stay batched.

Configure on the Building Manager inspector under **Batching Settings**.\
The Batching System requires the **Enable Batching** toggle to be active.\
Grouping must also be enabled since batching operates on groups.

***

### Scripting Examples

Batch and unbatch all groups manually:

```csharp
BuildingManager.Instance.BatchingSystem.BatchAllGroups();
BuildingManager.Instance.BatchingSystem.UnbatchAllGroups();
```

Batch or unbatch a specific group:

```csharp
group.BatchGroup();
group.UnbatchGroup();
```

Check if a group is batched:

```csharp
bool batched = group.IsBatched;
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://mindcodeinteractive.gitbook.io/easy-build-system/reference/building-manager/building-batching-system.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
