> 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/integrations/mirror.md).

# Mirror

This integration connects the building system with [Mirror Networking](https://assetstore.unity.com/packages/tools/network/mirror-129321).\
Route building commands through the server and sync to all clients.

***

### Example Scene

The demo scene is ready to play and can be found in the integration folder.\
It includes a multiplayer setup with network-ready [Building Parts](/easy-build-system/reference/building-part.md) and pre-configured player prefabs.

***

### How It Works

The integration adds two network adapter components that route building commands through [Mirror](https://assetstore.unity.com/packages/tools/network/mirror-129321). Place, destroy, adjust, and upgrade commands use `[Command]` and sync via `[ClientRpc]`.\
Save and load operations are handled by the server only.

**MirrorBuildingControllerAdapter:**

Add to your player prefab alongside the [Building Controller](/easy-build-system/reference/building-controller.md).\
Requires a `NetworkIdentity`.\
Routes all building commands through the server.

**MirrorBuildingSaveAdapter:**

Add to a persistent scene object.\
Only the server saves and loads.\
Sets save mode to Manual and disables auto-save.

***

### Requirements

* [Mirror](https://assetstore.unity.com/packages/tools/network/mirror-129321) (v96.0.1+) by Vis2k

{% embed url="<https://assetstore.unity.com/packages/tools/network/mirror-129321>" %}

***

### Installation

{% stepper %}
{% step %}

### Install Mirror Integration

Make sure **Easy Build System** and [Mirror](https://assetstore.unity.com/packages/tools/network/mirror-129321) are both imported in your project.

Open the Hub at\
`Tools > Mind Code Interactive > Easy Build System > Hub > Integrations`

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

Search for [Mirror Networking](https://assetstore.unity.com/packages/tools/network/mirror-129321) and click **Install Integration**.\
Wait for the recompile to finish.
{% endstep %}

{% step %}

### Demo Scene

Open the demo scene and try it. It's located in:\
`Mind Code Interactive/Easy Build System/Packages/Integrations/Mirror`

You can also build a client and run multiple instances to test multiplayer building.
{% endstep %}
{% endstepper %}

***

### Adding Your Own Parts

Create your [Building Part](/easy-build-system/reference/building-part.md) as usual (see the [Building Part Guide](/easy-build-system/learning/beginner-guides/building-part-guide.md)).\
Add a `NetworkIdentity` component and register the prefab in [Mirror's](https://assetstore.unity.com/packages/tools/network/mirror-129321) spawnable list.


---

# 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/integrations/mirror.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.
