Table of Contents

Class BiomeSampler

Namespace
FishMMO.Shared.Biomes
Assembly
FishMMO.Shared.dll

Answers "what biome is here?" for anything in a scene — namers, spawners, later systems.

The biome comes from the scene's baked SceneBiomeMap, which is what generation fixed; a position the map does not cover falls back to choosing a biome from the terrain height and the current climate. The climate variant always comes from the current climate on WorldSceneSettings, so a frozen winter reads as such without the biome itself changing.

public static class BiomeSampler
Inheritance
BiomeSampler
Inherited Members

Methods

Read(Vector3, WorldSceneSettings)

Reads the biome at a world position under the given scene settings (null = no map, default climate).

public static BiomeReading Read(Vector3 worldPosition, WorldSceneSettings settings)

Parameters

worldPosition Vector3
settings WorldSceneSettings

Returns

BiomeReading

Read(Vector3, Scene)

Reads the biome at a world position in the given scene.

public static BiomeReading Read(Vector3 worldPosition, Scene scene)

Parameters

worldPosition Vector3
scene Scene

Returns

BiomeReading

TrySampleTerrainHeight(Vector3, out float)

Normalised height of the terrain under a position, from whichever active terrain contains it.

public static bool TrySampleTerrainHeight(Vector3 worldPosition, out float normalizedHeight)

Parameters

worldPosition Vector3
normalizedHeight float

Returns

bool