Baking and plant parts
A baked prefab is a frozen plant: whatever you want to vary, you vary on a live plant and bake.
Bake to prefab
Select a live plant and press Bake to prefab in its inspector. With several plants selected, each is baked. The plant is kept under Assets/Floralin/Baked/<Form>/, outside every pack, as:
- three LOD meshes and a prefab with an LOD Group (with the plant's own switch points when it has a group);
- the colliders of its Collision setting;
- with the Custom palette, a material of its own with those colours.
The prefab is named after the form, the specimen and the palette (Red_hot_poker_17_Custom). It has no Floralin component: use it like any model. Baking does not change the live plant in the scene; replace it with the prefab if you want the frozen one there.
Bake when you need thousands of different plants, a slow form, Detailed colliders, or a plant that must never change.
Plant parts
Select a plant in the scene, a prefab or a live plant, and open Plant parts under the inspector's header.
- Break apart turns the plant into a hierarchy of its stems, leaves and flowers. The original is kept inside it, disabled.
- Move, rotate, scale, duplicate or delete parts with Unity's normal tools. What grows on a stem follows it.
- Bake merges the parts into a new plant with its three LODs, colliders and a prefab under
Assets/Floralin/Edits/<Pack>/, and puts it in place of the hierarchy. Cancel brings the original back instead.
- Group shapes by stem segment (on by default): the leaves and flowers growing from one stem segment become one object, so a flower head stays one piece. Turn it off before Break apart to get every shape as its own object.
- A baked edit can be broken apart again, and so can a plant made with Bake to prefab.
- A live plant's edit is saved as a frozen plant, in its palette or custom colours.
The tool works in the editor only. It reads the <Model>.parts.json beside each model's meshes, a text file nothing references, so neither the file nor the tool is in your build; a hierarchy you left unbaked is left out of builds too.