> 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-part.md).

# Building Part

Contains all data concerning the building, such as the model, preview, and conditions.

{% 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.Part;
```

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 the state of the Building Part is changed.
/// </summary>
OnChangedStateEvent.AddListener((StateType state) => { });
```

{% endtab %}

{% tab title="Methods" %}

#### Methods

```csharp
/// <summary>
/// Change the state of the Building Part.
/// </summary>
/// <param name="state">The new state to assign to the Building Part.</param>
ChangeState(StateType state);
```

{% endtab %}
{% endtabs %}

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