> For the complete documentation index, see [llms.txt](https://mindcodeinteractive.gitbook.io/easy-build-system-old/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-old/components/building-group.md).

# Building Group

This component is managed by the [Building Manager](/easy-build-system-old/components/building-manager.md) to group all the [Building Parts](/easy-build-system-old/components/building-part.md) based on their proximity. The **Building Batching** feature included in the [Building Manager](/easy-build-system-old/components/building-manager.md) also leverages this component to batch the [Building Parts](/easy-build-system-old/components/building-part.md) together, resulting in a performance improvement in scenes with a large number of parts.

{% hint style="info" %}
Explore fields description in the Inspector by hovering your cursor over them.\
You can find more information about this here: [Tooltip Attribute](https://docs.unity3d.com/ScriptReference/TooltipAttribute.html).
{% endhint %}

***

## API

You can access this class by including the following namespace:

```csharp
using EasyBuildSystem.Features.Runtime.Buildings.Group;
```

Here is a list of all the events and methods of this component that can be called:

{% tabs %}
{% tab title="Events" %}

#### Events

```csharp
/// <summary>
/// Event triggered when a Building Part is registered in this group.
/// </summary>
OnRegisterBuildingPartEvent.AddListener((BuildingPart part) => { });

/// <summary>
/// Event triggered when a Building Part is unregistered in this group.
/// </summary>
OnUnregisterBuildingPartEvent.AddListener((BuildingPart part) => { });

/// <summary>
/// Event triggered when the Building Group is batched.
/// </summary>
OnBatchedBuildingGroupEvent.AddListener(() => { });

/// <summary>
/// Event triggered when the Building Group is unbatched.
/// </summary>
OnUnbatchedBuildingGroupEvent.AddListener(() => { });
```

{% endtab %}

{% tab title="Methods" %}

#### Methods

```csharp
/// <summary>
/// Batches the building group, combining the renderers into a single batch.
/// </summary>
BatchBuildingGroup(BuildingPart part);

/// <summary>
/// Unbatches the building group, restoring the individual renderers.
/// </summary>
UnbatchBuildingGroup(BuildingPart part);
```

{% endtab %}
{% endtabs %}

All of the methods related to this component can be found in the file "BuildingGroup.cs".\
If you have any specific questions about the API, feel free to contact us.
