> 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

Flora provides multiple ways to convert **GameObject-based prefabs** into GPU-instanced data and back again. This is especially useful when working with *LODGroups* or *MeshRenderers* in large scenes.

> **Note:** In order to be rendered by Flora, each object must be part of a **prefab or prefab variant**. Flora uses the prefab asset to determine shared render states and to identify instance types in the scene.

***

## Contextual Menus

Flora includes several **context menu utilities** for converting *GameObjects* into:

* Instance Renderers using **Convert To Instance Renderer(s)**
* Instance Containers using **Create Instance Container(s)** and **Combine Instance Container(s)**
* Terrain Trees using **Convert To Tree**

These options appear when right-clicking a selection of prefab instances in either the **Scene View** or the **Hierarchy**.

***

### Instance Renderer

Adds a [`FloraInstanceRenderer`](/scripts/instance-renderer.md) component to any prefab instance that contains an *LODGroup* or *MeshRenderer*. This enables the prefab to be rendered using Flora’s instancing system.

<figure><img src="/files/6NmwXTZNiEe42H3vNuLE" alt="Convert to Instance Renderer" width="563"><figcaption></figcaption></figure>

***

### Instance Container

**Create Instance Container(s)** converts a group of prefab instances into a lightweight, [serialized container](/scripts/instance-container.md) of transforms.\
Ideal for static details or foliage that **don’t require**:

* Scripts
* Colliders

> **Note:** The original GameObjects will be **destroyed** after conversion.

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

<figure><img src="/files/q851ytMMz8FgrY0c4Z63" alt="Create Instance Container" width="485"><figcaption></figcaption></figure>

***

### Trees

Flora also includes utilities for converting **GameObjects into tree instances**, as long as the object is within the **bounds of a terrain**.

<figure><img src="/files/n7NljUc3ckk81DYIu3Fb" alt="Convert to Tree" width="476"><figcaption></figcaption></figure>

Converted trees can be **reverted back to GameObjects** using Flora’s [Editor Context Tools](/getting-started/editor-context.md):

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. Choose the option **Convert to GameObjects**.

<figure><img src="/files/omGHyL71q2uSJIK1zMVZ" alt="Convert trees back to GameObjects" width="563"><figcaption></figcaption></figure>

To convert **all trees of a specific prototype**, use the **Edit Trees** button in the **Terrain Inspector**.

<figure><img src="/files/coKM2zdu3DZnVzdstaTx" alt="Edit Trees in Terrain Inspector" width="460"><figcaption></figcaption></figure>
