> For the complete documentation index, see [llms.txt](https://flora.magneticarcade.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://flora.magneticarcade.com/getting-started/conversion.md).

# Conversion

Convert GameObject-based prefabs to instanced data and back again, with full round-trip support.

Convert prefab instances into Flora renderers, containers, or Terrain trees.

> Each object must be a prefab or prefab variant.

## Contextual Menus

Right-click selected prefab instances in the Scene view or Hierarchy. In the Scene view, open the **LODGroup** or **MeshRenderer** submenu:

* **Convert To Instance Renderer(s)**
* **Create Instance Container(s)** or **Combine Instance Container(s)**
* **Convert To Tree**

### Instance Renderer

Adds [`FloraInstanceRenderer`](/scripts/instance-renderer.md) to a prefab instance with an LODGroup or MeshRenderer.

### Instance Container

**Create Instance Container(s)** replaces selected GameObjects with a [serialized container](/scripts/instance-container.md) of transforms. Use it when instances do not need scripts or colliders.

> Conversion destroys the original GameObjects.

Use **Combine Instance Container(s)** when multiple selected containers use the same prefab and should be merged into the active container.

Select the prefab objects, then choose **GameObject > Create Instance Container(s)**. This example combines three `Fern_A` objects into one container.

<figure><img src="https://2882982566-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fyo4B7EVXffipTxnJzee6%2Fuploads%2Fgit-blob-911d3079991ff3f593b276cacd6581d8fad47922%2Fconversion-before-6-4-5.webp?alt=media" alt="Three selected Fern_A prefab GameObjects before container conversion"><figcaption><p>Before: three prefab GameObjects have separate entries in the Hierarchy.</p></figcaption></figure>

<figure><img src="https://2882982566-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fyo4B7EVXffipTxnJzee6%2Fuploads%2Fgit-blob-a872dcb1d57786d9df19a666c87c4349a9f920e9%2Fconversion-after-6-4-5.webp?alt=media" alt="One Fern_A Container with Instance Count 3 after conversion"><figcaption><p>After: one container stores all three placements. The Inspector shows Instance Count 3, and the ferns retain their positions.</p></figcaption></figure>

### Trees

**Convert To Tree** converts objects inside a Terrain's bounds into tree instances.

To convert trees back to GameObjects:

1. Activate the context from the Scene View overlay.
2. Select instances in the **Scene View**.
3. Right-click to open the context menu.
4. Select **Convert to GameObjects**.

Use **Edit Trees** in the Terrain Inspector to convert every tree of one prototype.
