Table of Contents

Class TerrainArraySet

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

One scene's baked terrain art: the albedo, normal and mask texture arrays the array terrain shader samples, and each layer's tiling and remaps.

public sealed class TerrainArraySet : ScriptableObject
Inheritance
Object
ScriptableObject
TerrainArraySet
Inherited Members
ScriptableObject.SetDirty()
ScriptableObject.CreateInstance<T>()
Object.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.name
Object.hideFlags

Remarks

Build output, never source. TerrainArrayBaker writes one of these per world scene into BakedDirectory, which is gitignored, from art that may live under Assets/LOCAL and must never be referenced by anything committed. Every machine bakes its own: opening a scene whose set is missing or stale rebakes it, and a client build bakes every world scene before it builds.

Found by convention, never by reference. No scene points at a set: a committed scene holding the GUID of a file each machine regenerates would dangle on every other clone. The binder finds its scene's set by the scene's name — straight off disk in the editor, by AddressOf(string) in a player (the build puts the sets in a client-only addressable group).

Fields

AddressableGroupName

The addressable group a client build registers the sets in, and removes again afterwards. "Client" in the name keeps it out of server bundles, which exclude groups by that substring.

public const string AddressableGroupName = "ClientTerrainArrays"

Field Value

string

Albedo

[Tooltip("Layer i of the scene's terrains is slice i. sRGB; alpha holds smoothness.")]
public Texture2DArray Albedo

Field Value

Texture2DArray

BakedDirectory

Where sets are baked. Gitignored: this is build output.

public const string BakedDirectory = "Assets/Prefabs/Client/TerrainArrays"

Field Value

string

ContentHash

[Tooltip("A hash of everything the bake read. A different hash means the set is stale.")]
public string ContentHash

Field Value

string

IndexBakeShader

[Tooltip("The shader that bakes each tile's index map from its alphamaps (TerrainIndexMapBaker). Referenced here so a player build carries it with the arrays; written by the bake.")]
public Shader IndexBakeShader

Field Value

Shader

LayerClock

[Tooltip("How each layer follows the shared clock, from the biome slot it was painted from (TerrainTextureLayer.clock, 2026-10-26, phase GROUND-BANDS; Biomes.BiomeGroundClock.Pack): x kind, y from, z to, w falloff; zero for none. Written by the bake; not part of the content hash, refreshed in place when only it changed. Read into the layer table's clock row.")]
public Vector4[] LayerClock

Field Value

Vector4[]

LayerClockShare

[Tooltip("Beside LayerClock: x the share a clocked layer keeps outside its window, y the scene layer its share goes to then (its biome's main ground; -1 none: the other layers there take it). Written by the bake, in place.")]
public Vector4[] LayerClockShare

Field Value

Vector4[]

LayerCount

[Tooltip("How many layers the arrays hold.")]
public int LayerCount

Field Value

int

LayerGlow

[Tooltip("How each layer glows, from the biome slot it was painted from (TerrainTextureLayer.glow, 2026-10-25, phase I2r; Biomes.BiomeGroundGlow.Pack): zero for none. Written by the bake; not part of the content hash, refreshed in place when only it changed. Read into the layer table's glow row.")]
public Vector4[] LayerGlow

Field Value

Vector4[]

LayerMakeup

[Tooltip("What each layer's ground is made of, from the biome slot it was painted from (TerrainTextureLayer.GroundMakeup): x living, y lichen, z mineral, w 1 where the slot had one (0: read from the layer's name). Written by the bake; not part of the content hash, refreshed in place when only it changed.")]
public Vector4[] LayerMakeup

Field Value

Vector4[]

LayerMaskOffset

public Vector4[] LayerMaskOffset

Field Value

Vector4[]

LayerMaskScale

public Vector4[] LayerMaskScale

Field Value

Vector4[]

LayerNames

[Tooltip("Each layer's name as it was baked, for the inspector and the logs.")]
public string[] LayerNames

Field Value

string[]

LayerST

public Vector4[] LayerST

Field Value

Vector4[]

LayerSources

[Tooltip("Where each layer's art came from (committed, LOCAL sidecar, LOCAL by name), for the logs.")]
public string[] LayerSources

Field Value

string[]

LayerSurface

public Vector4[] LayerSurface

Field Value

Vector4[]

LayerTint

public Vector4[] LayerTint

Field Value

Vector4[]

Mask

[Tooltip("R metallic, G occlusion, B height, A smoothness. Null when no layer has a mask map.")]
public Texture2DArray Mask

Field Value

Texture2DArray

Normal

[Tooltip("Tangent-space normals as plain RGB. Null when no layer has a normal map.")]
public Texture2DArray Normal

Field Value

Texture2DArray

SceneName

[Tooltip("The scene this was baked for; its address is built from it.")]
public string SceneName

Field Value

string

Properties

IsUsable

True when the albedo exists and every per-layer array covers every layer.

public bool IsUsable { get; }

Property Value

bool

Methods

AddressOf(string)

The address a player loads a scene's set by.

public static string AddressOf(string sceneName)

Parameters

sceneName string

Returns

string

BakedAssetPath(string)

The set asset of one scene.

public static string BakedAssetPath(string sceneName)

Parameters

sceneName string

Returns

string

BakedFolder(string)

The folder one scene's arrays are baked into.

public static string BakedFolder(string sceneName)

Parameters

sceneName string

Returns

string

FileNameOf(string)

A scene name as a file name: the characters a file system refuses become underscores.

public static string FileNameOf(string sceneName)

Parameters

sceneName string

Returns

string

LayerFlora()

Per layer (TableLength(int) long) what it is made of as the planet's looks see it: x living, y lichen, z mineral, w 0. The terrain shader's _FishLayerFlora, the grass's colour read and the contact blend all take it from here, so the three agree on every layer.

public Vector4[] LayerFlora()

Returns

Vector4[]

Remarks

From the biome slot each layer was painted from (LayerMakeup, baked from the template's Biomes.TerrainTextureLayer.GroundMakeup; 2026-10-15). A layer with none — a set baked before then, or hand-made art whose slot has no makeup — is read from its name as it always was (Biomes.BiomeLooks.GroundShareOf). For a generated ground (Ground_*) the name gives exactly what authoring writes on its slot (pinned by BiomeTemplateLooksTests), so that fallback is silent; only hand-made layers read by name get the one warning for the set, since only theirs can be wrong.

Worked out on first use and kept until the names or the makeup change (a rebake writes new ones).