# Container Samples

These scenes demonstrate `FloraInstanceContainer` and `FloraInstanceRenderer` workflows **without Unity `Terrain`**.

> These samples do **not** require a Unity `Terrain` component. They use `FloraInstanceContainer` to manage serialized collections of instances without individual GameObjects, and `FloraInstanceRenderer` to register prefab instances with the Flora system.

***

## Container Mesh Sample

This sample demonstrates a rotated wall mesh with **four** child `FloraInstanceContainer` objects. Each child container targets a different prefab, and all container instances maintain the wall's parent-space rotation/motion.

### Scene Path

`Samples~/Examples/Containers/Scenes/ContainerMeshSample.unity`

### What This Demonstrates

* Container-driven instancing on a rotated wall object without Unity `Terrain`.
* Four sub-containers, each with a different target prefab (`Heather`/`Fern` variants).
* Stable parent/child transform inheritance from the wall to all container content.

### Run and Verify

1. Open `ContainerMeshSample` and press Play.
2. Confirm four container groups render from container data across the rotated wall.
3. Confirm each container group uses its own prefab target.
4. Confirm all container instances rotate/move with the parent wall while keeping stable local offsets.

**Expected result:** all four container groups render on the rotated wall, keep their per-container prefab identity, and stay parent-locked to the wall transform without Unity `Terrain`.

### Common Failure Checks

* No instances visible: verify Flora scene rendering is enabled and the sample setup prefab is active.
* Incorrect instance placement/orientation: confirm the four containers remain parented under the rotated wall hierarchy.
* Wrong prefab assignment: verify each container's `Prefab` reference matches its intended variant.
* Unexpected terrain assumptions: this sample should run with no Unity `Terrain` component.

***

## Container Prefab Sample

This sample demonstrates hybrid prefab workflows using `FloraInstanceRenderer` and `FloraInstanceContainer`:

* Parent rock prefabs with `LODGroup` + `FloraInstanceRenderer` render as instanced prefab objects.
* Child `FloraInstanceContainer` objects hold non-`GameObject` plant instances that stay parent-relative.

> Canonical scene name is `ContainerPrefabSample` (sometimes referred to as "ContainerPrefabSamples" in conversation).

### Scene Path

`Samples~/Examples/Containers/Scenes/ContainerPrefabSample.unity`

### What This Demonstrates

* Rotating `LODGroup` rock prefabs rendered through `FloraInstanceRenderer`.
* Child `FloraInstanceContainer` plant content authored without per-plant `GameObject` render paths.
* Parent/child transform relationship preservation between instanced rock prefabs and child plant containers.
* Non-Terrain deployment of this hybrid `FloraInstanceRenderer` + `FloraInstanceContainer` workflow.

### Run and Verify

1. Open `ContainerPrefabSample` and press Play.
2. Confirm rotating rock prefabs render correctly as `LODGroup` instances through `FloraInstanceRenderer`.
3. Confirm child container plant instances move with their parent rocks and keep stable relative offsets.
4. Confirm all content renders correctly across the floor.


---

# 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/samples/container-samples.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.
