Table of Contents

Class SetBiomeHeightOnSpawn

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

Matches its LocalProceduralBiome's height to a fixed world-space height after it is spawned from a template, even when that differs from the Vista Manager's max terrain height. Only touches the Y scale and the height-blend option, so it composes with any XZ sizing component (for example SnapBiomeToTilesOnSpawn or SetBiomeAreaOnSpawn).

[RequireComponent(typeof(LocalProceduralBiome))]
[AddComponentMenu("Vista/Biome Template/Set Biome Height On Spawn")]
public class SetBiomeHeightOnSpawn : MonoBehaviour, IBiomeTemplateSpawnCallbackReceiver
Inheritance
Object
Component
Behaviour
MonoBehaviour
SetBiomeHeightOnSpawn
Implements
Inherited Members
MonoBehaviour.IsInvoking()
MonoBehaviour.CancelInvoke()
MonoBehaviour.StopCoroutine(Coroutine)
MonoBehaviour.StopAllCoroutines()
MonoBehaviour.destroyCancellationToken
MonoBehaviour.useGUILayout
MonoBehaviour.runInEditMode
Behaviour.enabled
Behaviour.isActiveAndEnabled
Component.GetComponent<T>()
Component.TryGetComponent<T>(out T)
Component.GetComponentInChildren<T>()
Component.GetComponentsInChildren<T>()
Component.GetComponentInParent<T>()
Component.GetComponentsInParent<T>()
Component.GetComponents<T>()
Component.GetComponentIndex()
Component.transform
Component.gameObject
Component.tag
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.name
Object.hideFlags

Remarks

A biome graph outputs its height against the Manager's terrainMaxHeight. To make the full output reach worldHeight in world space instead, the transform Y is scaled by worldHeight / terrainMaxHeight and BiomeBlendOptions.useTransformForHeightBlend is enabled, so height blending actually reads that Y scale (and Y position). For example, a 400 tall biome under a 600 max height gets a 0.66 Y scale. Implements IBiomeTemplateSpawnCallbackReceiver so it runs on spawn (using the Manager on the context), and offers a context-menu re-apply. Pure runtime, no editor dependency.

Properties

worldHeight

The world-space height the biome should cover, in meters.

Methods

ApplyHeight()

Re-apply the world height, resolving the Vista Manager from the hierarchy.

ApplyHeight(VistaManager)

Scale the biome's transform Y so its full height output lands at worldHeight in world space against manager's max terrain height, and turn on transform contribution so height blending reads that Y scale. Does nothing when there is no manager, no biome, or the manager's max height is zero.

OnSpawnedFromBiomeTemplate(BiomeTemplate, BiomeTemplateSpawnContext)

Matches the biome height to the spawning Manager's max terrain height as part of the spawn.