# 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
* Instance Containers
* Terrain Trees

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

***

### Instance Renderer

Adds a [`FloraInstanceRenderer`](https://flora.magneticarcade.com/scripts/instance-renderer) 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="https://2882982566-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fyo4B7EVXffipTxnJzee6%2Fuploads%2Fgit-blob-0b531ef090d1010e988ed2808d81c0252578a93d%2Fconvert-to-instance-renderer.webp?alt=media" alt="Convert to Instance Renderer" width="563"><figcaption></figcaption></figure>

***

### Instance Container

Converts a group of prefab instances into a lightweight, [serialized container](https://flora.magneticarcade.com/scripts/instance-container) of transforms.\
Ideal for static details or foliage that **don’t require**:

* Scripts
* Colliders

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

<figure><img src="https://2882982566-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fyo4B7EVXffipTxnJzee6%2Fuploads%2Fgit-blob-79b62e2274b324a1abfb2831d6600e9b76d0f369%2Fconvert-to-instance-container.webp?alt=media" alt="Convert to 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="https://2882982566-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fyo4B7EVXffipTxnJzee6%2Fuploads%2Fgit-blob-bd1ac51c3a6133423abed0dff94904a5a764ba9f%2Fconvert-to-tree.webp?alt=media" alt="Convert to Tree" width="476"><figcaption></figcaption></figure>

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

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="https://2882982566-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fyo4B7EVXffipTxnJzee6%2Fuploads%2Fgit-blob-24bf5773f34222a2a17a52492c6fc58f7d1e864e%2Fconvert-to-game-objects.webp?alt=media" 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="https://2882982566-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fyo4B7EVXffipTxnJzee6%2Fuploads%2Fgit-blob-59df06b39ae8a0301e8237ab13c4e40ccedbd38e%2Fconvert-trees-inspector.webp?alt=media" alt="Edit Trees in Terrain Inspector" width="460"><figcaption></figcaption></figure>


---

# Agent Instructions: 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:

```
GET https://flora.magneticarcade.com/getting-started/conversion.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
