> 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/learning/beginner-guides/building-part-guide.md).

# Building Part Guide

This guide walks you through creating and configuring a [Building Part](/easy-build-system/reference/building-part.md).

***

### Understand How Parts Work

A [Building Part](/easy-build-system/reference/building-part.md) is the core asset that represents anything a player can place at runtime.\
Walls, floors, furniture, decorations, and props are all [Building Parts](/easy-build-system/reference/building-part.md).

Each part is a prefab with a [Building Part](/easy-build-system/reference/building-part.md) component on its root.\
The component bundles the renderers, placement settings, conditions, and behaviors.

Parts are registered in the Building Part Registry when created.\
The registry lets your menus, hotkeys, and save files reference parts by name at runtime.

### Prepare Your Model

Any 3D model works: a Unity primitive, a ProBuilder mesh, or an imported FBX or OBJ.

Make sure the model has at least one Collider.\
Without it, the build system can't detect the model during placement.

The pivot is where the part anchors when it snaps.\
For a wall it's usually bottom-center. For a floor it's the center.

Fix the pivot in your 3D software before importing if it looks wrong in Unity.

### Create the Building Part

Select your model in the Scene or Hierarchy, then go to:

`Tools > MCI > Easy Build System > Components > Create Building Part...`

Or right-click the GameObject:

`MCI > Easy Build System > Components > Create Building Part...`

A save dialog appears. Choose where to save the prefab.

The tool handles all the setup for you:

* Parents your model under a root GameObject and adds the Building Part component.
* Enables Read/Write on the meshes and builds renderer variants from your model.
* Adds the required Common Condition and generates a preview material.
* Saves the prefab and registers it in the Building Part Registry.

When it's done, the prefab is pinged in the Project window and focused in the Scene view.\
You can edit it in place. The prefab is loaded, so changes apply directly.

Once you're happy, hit Apply on the prefab override bar to save your changes.

### Give It an Identity

The fields at the top of the inspector are what your players and your menus see.

**Name** and **Description** appear in tooltips and selection menus.\
Keep them short and descriptive. `Wooden Wall` reads better than `Wall_v2_final`.

**Category** is the most useful field here.\
It's a tag like "Walls" or "Floors" used by menu filters and area rules.\
Type a new category name and the system creates it for you.

Be consistent: "Walls" and "wall" are different categories and won't group together.

**Thumbnail** is the icon shown in your build menu UI. A 128×128 or 256×256 PNG works well.\
Without one, the menu uses a default icon.

<figure><img src="/files/oUeA8iH9tiMsMO3sXTd5" alt="" width="563"><figcaption></figcaption></figure>

### Review the Renderer System

The Renderer System gives you visual variety on a single part. Same prefab, different looks.

The creation tool already turned each renderer child into a variant.\
Variant 0 is the one that shows up by default at runtime.

Use variants for material tiers (wood, stone, metal). Or for damage states (intact, cracked, ruined). The Upgrade mode at runtime cycles through these variants.

If you add or remove children later, click **Build Variants From Renderers** to resync.

<figure><img src="/files/0WeBIY7z1JyOBNRUQ7Bl" alt="" width="563"><figcaption></figcaption></figure>

### Configure Placement Settings

The Placement System section tunes how the part feels during placement.\
There are a lot of fields, but you'll only touch a handful in practice.

Start with these:

* **Smooth Movement**: turn it on so the preview glides with the cursor.\
  A speed of 10 to 15 feels natural.
* **Rotation Step**: how much the part rotates per key press.\
  Use `(0, 45, 0)` for 8-way rotation, or `(0, 90, 0)` for 4-way.
* **Surface Alignment**: turn it on if the part should tilt to match the surface.\
  Good for decorations, signs, or vines. Leave it off for walls and furniture.
* **Force Grounding**: turn it on if the part must stick to the ground.\
  The cursor height is ignored. Good for trees, lamps, or crates.
* **Use Grid Snapping**: turn it on if your game uses a global build grid.\
  Cell Size is the XZ footprint: a 1×1 wall uses `(1, 1)`, a 2×1 fence uses `(2, 1)`.

Grid snapping requires the Grid System to be enabled on the [Building Manager](/easy-build-system/reference/building-manager.md).

Everything else (clamps, offsets, direction indicators, thresholds) is fine-tuning.\
Skip it until something doesn't feel right.

<figure><img src="/files/r3tCygx3G8ZNqZC8QZf7" alt="" width="563"><figcaption></figcaption></figure>

### Add Behaviors (Optional)

Behaviors are reactions to building events.\
They add visual and physical feedback to placement and destruction.

Your part works fine without any. Two built-in behaviors cover most cases:

* **Animation Behavior** plays a clip on placement, destruction, adjustment, or upgrade.\
  Use it for fade-ins, drop animations, or scale-up effects.
* **Debris Behavior** spawns physics debris when the part is destroyed or collapses.\
  Use it for wood splinters, stone chunks, or broken glass.

Add them with the **Add Behavior** button. Each one expands inline with its settings.

### Configure Conditions

Conditions are the rules that decide whether a build action is allowed.\
They run every frame on the preview. The first failure blocks the placement.

The **Common Condition** is added automatically. Its job is to declare which modes are allowed.

You almost always want all four enabled: placement, destruction, adjustment, upgrade.\
Turn one off if your part should support some actions but not others.

Two flags on the Common Condition matter:

* **Require Socket** forces the part to snap to a [Building Socket](/easy-build-system/reference/building-socket.md).\
  Use this for parts that only make sense as connections, like windows in walls.
* **Ignore Areas** lets the part bypass [Building Area](/easy-build-system/reference/building-area.md) restrictions.\
  Use this for admin tools or parts that should be placeable anywhere.

If you need more validation, click **Add Condition** and pick one:

* **Collision Condition** prevents overlapping with other geometry.\
  Use it on most parts. Exclude the `Socket` layer from its checks.\
  Otherwise sockets will register as collisions and block placement.
* **Collapse Condition** turns on structural integrity. Parts fall when their support is removed.\
  Use it for realistic destruction. Skip it on small props since the physics fall can feel jarring.
* **Terrain Condition** blocks placement on specific terrain textures.\
  Or near specific tree prototypes. Useful for "no building on rock" rules.

Each condition has a **Show Logs** toggle.\
Turn it on temporarily when a placement is blocked and you can't figure out why.\
The Console will tell you which condition rejected the action.

<figure><img src="/files/ZLd3Y0tZOBxOFnm9DfmG" alt="" width="563"><figcaption></figcaption></figure>

### Save & Apply

Hit **Apply** on the prefab override bar to commit your changes to the asset.

After that, you can delete the part from the scene.\
It lives in your project as a prefab, ready to be instantiated at runtime.

<figure><img src="/files/1XfFEb80K09ZrYcQ8ptK" alt="" width="548"><figcaption></figcaption></figure>

### Reference It

A part isn't usable until something references it. Two common ways:

* Add it to the **Custom Part References** list on the [Building Input](/easy-build-system/reference/building-controller/building-input.md) component.\
  This binds it to a hotkey, useful for prototyping or admin tools.
* Create a slot in your [Building Menu UI](/easy-build-system/reference/building-menus-ui.md) and set its selection to choose this part.\
  This is what your players will actually use.

Either way, once referenced, switching to Placement mode spawns the preview.

<figure><img src="/files/NVAcdeleHiWgCkY38CXq" alt="" width="563"><figcaption></figcaption></figure>


---

# 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/learning/beginner-guides/building-part-guide.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.
