Class BiomeTemplate
A reusable biome preset for the wizard's template gallery. A template is defined at the biome level, not the graph level: it references a biome prefab that captures the whole biome configuration (graph, blend mode, external input, child objects, ...), so it generalizes to any biome type, procedural now and non-procedural later. Selecting it spawns a disconnected, fully editable biome (see BiomeTemplateSpawner).
[CreateAssetMenu(menuName = "Vista/Biome Template", order = -9000)]
public class BiomeTemplate : ScriptableObject
- Inheritance
-
ObjectScriptableObjectBiomeTemplate
- Inherited Members
-
ScriptableObject.SetDirty()ScriptableObject.CreateInstance<T>()Object.GetInstanceID()Object.GetHashCode()Object.InstantiateAsync<T>(T)Object.InstantiateAsync<T>(T, Transform)Object.InstantiateAsync<T>(T, Vector3, Quaternion)Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)Object.InstantiateAsync<T>(T, InstantiateParameters)Object.InstantiateAsync<T>(T, Vector3, Quaternion, InstantiateParameters)Object.Instantiate(Object, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion, Transform)Object.Instantiate(Object)Object.Instantiate(Object, Scene)Object.Instantiate<T>(T, InstantiateParameters)Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)Object.Instantiate(Object, Transform)Object.Instantiate<T>(T)Object.Instantiate<T>(T, Vector3, Quaternion)Object.Instantiate<T>(T, Vector3, Quaternion, Transform)Object.Instantiate<T>(T, Transform)Object.Destroy(Object)Object.DestroyImmediate(Object)Object.DontDestroyOnLoad(Object)Object.DestroyObject(Object)Object.FindObjectsOfType<T>()Object.FindObjectsByType<T>(FindObjectsSortMode)Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)Object.FindObjectOfType<T>()Object.FindFirstObjectByType<T>()Object.FindAnyObjectByType<T>()Object.FindFirstObjectByType<T>(FindObjectsInactive)Object.FindAnyObjectByType<T>(FindObjectsInactive)Object.ToString()Object.nameObject.hideFlags
Remarks
The prefab must contain at least one component implementing IBiome, on its root or on any child, so it can be spawned as a biome; this is what IsValid(out string) checks. A template may carry several biomes under a plain root, for example a decoration template offering the same placement graph with different anchor shapes. Discovery filters on this so the gallery never shows a broken template. Fixing up owned references at spawn is a separate, opt in concern, handled by any component that implements IBiomeTemplateSpawnCallbackReceiver.
Properties
- biomePrefab
The biome prefab this template spawns.
- info
Gallery-facing description (title, summary, usage guide, screenshot).
- sortingNumber
Controls the order in which templates appear in the gallery. Lower values appear first.
Methods
- IsValid(out string)
A template is valid when its prefab resolves and at least one component implementing IBiome exists anywhere in the prefab hierarchy, so it can be spawned as a biome. Invalid templates must never be spawned or shown (see discovery).
errorholds the reason when false.