Class BiomeTemplateSpawnContext
Passed to OnSpawnedFromBiomeTemplate(BiomeTemplate, BiomeTemplateSpawnContext) during a template spawn. Carries the runtime inputs (the owning VistaManager), acts as the collect sink for objects the biome cloned and now owns, and is the clone authority that keeps one clone per source asset across all receivers in the spawn (see GetOrCreateClone<TObject>(TObject, out bool)).
public class BiomeTemplateSpawnContext
- Inheritance
-
BiomeTemplateSpawnContext
- Inherited Members
Remarks
The biome pushes its in-memory clones here (RegisterOwnedObject(Object)); the editor caller
pulls and persists them beside the scene; at runtime the caller ignores them and the clones live
in memory. This mirrors how a terrain tile reports owned objects via ITile.GetDataAssets() and
only the editor-side factory writes assets. Purely runtime, no editor dependency, and no persistence
details (target folder, undo) are exposed here, those live in the editor shell.
Constructors
Properties
- manager
The manager that will own the spawned biome, or null.
- ownedObjects
Objects the biome cloned and owns, in registration order, for the caller to persist.
Methods
- GetOrCreateClone<TObject>(TObject, out bool)
Returns the clone this spawn already made for
source, or instantiates one now and registers it as owned. Keyed by the source asset, so receivers that share an authored asset in the template end up sharing one clone, preserving the template's reference topology instead of exploding it into one clone per receiver.createdtells the caller whether this call created the clone, so one time setup (naming, for example) runs exactly once and never rewrites what an earlier receiver did.
- RegisterOwnedObject(Object)
Register an in-memory object the biome cloned and now owns. Null and duplicates are ignored. The caller persists these (editor) or discards them (runtime).