Table of Contents

Method Spawn

Namespace
Pinwheel.Vista
Assembly
Pinwheel.Vista.Runtime.dll

Spawn(BiomeTemplate, BiomeTemplateSpawnContext)

Spawn template's biome prefab under the manager carried by context and return the spawned root GameObject. The prefab may hold a single biome on its root or several biomes under a plain root, so the root object is the one handle that always covers the whole spawn; callers locate the biomes through GetComponentInChildren. The caller owns the context: it creates it with the target manager and reads back the in-memory clones each receiver registered on it, to persist (editor) or ignore (runtime). The context is a class, so it is mutated in place, no ref needed. Throws if a required argument is null or the template is invalid (no prefab, or no IBiome anywhere in the prefab hierarchy); the caller is expected to pass a validated template (see IsValid(out string)), so those throws mark a broken precondition, not a normal outcome.

public static GameObject Spawn(BiomeTemplate template, BiomeTemplateSpawnContext context)

Parameters

template BiomeTemplate
context BiomeTemplateSpawnContext

Returns

GameObject