Method OnSpawnedFromBiomeTemplate
OnSpawnedFromBiomeTemplate(BiomeTemplate, BiomeTemplateSpawnContext)
Fixes up this biome's owned references after it was spawned from a BiomeTemplate. The
terrain graph is the one owned, per-biome authored asset, so it is cloned in memory and
reassigned here; shared library assets (materials, tree/detail templates) stay referenced. The clone
is registered in context for the editor caller to persist; at runtime it simply
lives in memory. No AssetDatabase use, so this runs in a build.
public void OnSpawnedFromBiomeTemplate(BiomeTemplate template, BiomeTemplateSpawnContext context)
Parameters
templateBiomeTemplatecontextBiomeTemplateSpawnContext
Remarks
The clone comes from GetOrCreateClone<TObject>(TObject, out bool), so biomes in the same spawn that share a source graph share one clone, preserving the reference topology the template author set up. That coordination is why the context is required: without it this biome could only clone in isolation, silently breaking the sharing a multi biome template was authored around. The clone is named after the source graph with any "Template" marker removed, so it reads as a regular working graph in the project window. Naming is a courtesy of whichever biome created the clone, not a contract other spawn callback receivers must follow.