Table of Contents

Class WorldSceneSettings

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

MonoBehaviour holding per-scene server-facing configuration and the link to the scene's WorldMapDefinition. Day/night cycle authoring has moved to WorldDayNightCycle on its own component so a scene can mix and match (a dungeon may want only the settings, a surface zone may want both).

public class WorldSceneSettings : MonoBehaviour
Inheritance
Object
Component
Behaviour
MonoBehaviour
WorldSceneSettings
Inherited Members
MonoBehaviour.IsInvoking()
MonoBehaviour.CancelInvoke()
MonoBehaviour.StopCoroutine(Coroutine)
MonoBehaviour.StopAllCoroutines()
MonoBehaviour.destroyCancellationToken
MonoBehaviour.useGUILayout
MonoBehaviour.didStart
MonoBehaviour.didAwake
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.CompareTag(TagHandle)
Component.transform
Component.transformHandle
Component.gameObject
Component.tag
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

Fields

BiomeMap

Which biome lies where, baked when the world was generated. Biomes are mixed through a scene; the map is how anything asks what is under a position.

[Tooltip("Baked biome grid for this scene, imported from the world generator's biome map.")]
public SceneBiomeMap BiomeMap

Field Value

SceneBiomeMap

Climate

The climate model this scene runs under: lapse rates, humidity curve, tier boundaries and the base global offsets. Shared between scenes that share a climate; null falls back to the built-in defaults.

[Header("Climate")]
[Tooltip("Climate model for this scene. Shared between scenes with the same climate.")]
public ClimateSettings Climate

Field Value

ClimateSettings

MapDefinition

Optional hand-made map definition, for a set of scenes that share one map (a dungeon and its instanced twin). Normally empty: a client build bakes a definition per scene into BakedDirectory, points the world scene details cache at it, and removes it after the build. A definition assigned here is filled in by that same bake instead.

[Tooltip("Optional. Leave empty and the client build bakes this scene's map; assign one only to share a map between scenes.")]
public WorldMapDefinition MapDefinition

Field Value

WorldMapDefinition

MaxClients

The maximum number of clients allowed in this scene.

[Tooltip("The maximum number of clients allowed in this scene. Clamped to 200.")]
[Range(1, 200)]
public int MaxClients

Field Value

int

Remarks

The UnityEngine.RangeAttribute constrains the inspector; it does not constrain a value edited into the scene YAML by hand or arriving from an older asset, so every consumer clamps to MaximumClientsPerScene on read as well.

MaximumClientsPerScene

The hard ceiling on clients in any one scene, anywhere in the project.

public const int MaximumClientsPerScene = 200

Field Value

int

Remarks

The single source of truth for the cap. The world server (routing and instance spin-up) and the scene server (channel admission) both clamp to this, so a scene authored above it is reduced rather than honoured — a designer cannot raise a scene's population past what the bandwidth and observer budgets were sized for.

200 is a deliberate ceiling, not a guess: per-client cost is bounded by the observer visibility budget rather than by scene population, so scaling past this is done by adding scene instances (and scene servers), never by widening one scene. See SceneServerPlacementPolicy.

RuntimeHumidityOffset

Runtime shift on top of Climate's global humidity offset. Mutable, like RuntimeTemperatureOffset.

[Tooltip("Runtime humidity shift on top of the climate asset. Driven by weather at runtime.")]
[Range(-2, 2)]
public float RuntimeHumidityOffset

Field Value

float

RuntimeTemperatureOffset

Runtime shift on top of Climate's global temperature offset. Mutable: a weather or season system writes it, and every climate reading in the scene moves with it.

[Tooltip("Runtime temperature shift on top of the climate asset. Driven by weather at runtime.")]
[Range(-2, 2)]
public float RuntimeTemperatureOffset

Field Value

float

SceneTransitionImage

The scene's loading image. Authored here; the map bake copies it into the scene's definition so the client finds the whole presentation in one place.

[Tooltip("The image shown while this scene loads. Copied into the baked map definition.")]
public Sprite SceneTransitionImage

Field Value

Sprite

Methods

ResolveVariant(BiomeTemplate, ClimateSample)

The climate variant a biome shows under a reading: the biome's own, else the climate asset's defaults.

public BiomeClimateVariant ResolveVariant(BiomeTemplate biome, ClimateSample sample)

Parameters

biome BiomeTemplate
sample ClimateSample

Returns

BiomeClimateVariant

SampleClimate(float, float)

The climate at a normalised height and latitude right now: the climate asset's reading plus this scene's runtime offsets.

public ClimateSample SampleClimate(float height01, float latitude01)

Parameters

height01 float
latitude01 float

Returns

ClimateSample

TryGetForScene(Scene, out WorldSceneSettings)

The settings component of a loaded scene, if it has one. Scenes load additively on a scene server, so this is keyed by scene.

public static bool TryGetForScene(Scene scene, out WorldSceneSettings settings)

Parameters

scene Scene
settings WorldSceneSettings

Returns

bool