Class TerrainTileLayers
Which of the scene's terrain layers a tile's alphamap channels hold, when the tile carries only the layers it paints
(TerrainTileLayerMap): channel c is scene layer SceneLayers[c], the slice of the
scene's texture arrays and the id its index map names.
[DisallowMultipleComponent]
public sealed class TerrainTileLayers : MonoBehaviour
- Inheritance
-
ObjectComponentBehaviourMonoBehaviourTerrainTileLayers
- Inherited Members
-
MonoBehaviour.IsInvoking()MonoBehaviour.CancelInvoke()MonoBehaviour.StopCoroutine(Coroutine)MonoBehaviour.StopAllCoroutines()MonoBehaviour.destroyCancellationTokenMonoBehaviour.useGUILayoutMonoBehaviour.didStartMonoBehaviour.didAwakeMonoBehaviour.runInEditModeBehaviour.enabledBehaviour.isActiveAndEnabledComponent.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.CompareTag(TagHandle)Component.transformComponent.transformHandleComponent.gameObjectComponent.tagObject.GetEntityId()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.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.FindObjectsByType<T>()Object.FindObjectsByType<T>(FindObjectsInactive)Object.ToString()Object.nameObject.hideFlags
Remarks
On the tile's own object, beside its UnityEngine.Terrain, so it follows the tile whatever terrain data the tile is given (a client or server build swaps in a copy). Written by the cut (TerrainTileLayerSync.Compact), refreshed whenever the scene's layers are brought in line (TerrainArraySetup.SyncProvenance) and by a client build. A tile without one, or whose map no longer fits its alphamaps, reads channel as scene layer: every scene cut before 2026-10-27.
In the editor the binder's provenance decides (EditorResolve): it names every layer the arrays hold, so a layer the terrain tools appended to a tile by hand is read right before anything is saved. A player has no provenance (it is EditorOnly) and reads the map stored here — and only on a tile whose alphamaps a client build kept; every other tile draws its stored index map, which already names scene layers.
Fields
EditorResolve
Set by the editor (TerrainTileLayerSync): a tile's map from its binder's provenance, or null where there is none to ask (then the stored map is read). Null outside the editor.
public static Func<Terrain, int[]> EditorResolve
Field Value
SceneLayers
[Tooltip("The scene layer (texture-array slice) each alphamap channel of this tile holds, in channel order. Written by the cut; empty reads channel as scene layer.")]
public int[] SceneLayers
Field Value
- int[]
Methods
Of(Terrain)
A tile's scene layer per alphamap channel, or null when channel and scene layer are the same number (a tile carrying the whole palette, or one without alphamaps).
public static int[] Of(Terrain terrain)
Parameters
terrainTerrain
Returns
- int[]