> 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:

* **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.

<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

**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.

<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="Create Instance Container" width="485"><figcaption></figcaption></figure>

### Trees

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

<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>

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**.

<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>

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

<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>
