Class PackIce
A cold sea's pack ice: a mosaic of floes laid at the concentration the climate gives, merged into chunks whose colliders the server keeps and players walk on, riding the tide. Open leads run through it so a boat can always cross. Cut with the scene (IcePlacer); nothing about it is random at runtime.
public sealed class PackIce : MonoBehaviour, ITickPosed
- Inheritance
-
ObjectComponentBehaviourMonoBehaviourPackIce
- Implements
- 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
Why a surface and not pieces (2026-10-15). Sea ice was placed as separate floating prefabs, capped at 35% cover and 600 pieces of at most 18 m: on a sea the climate froze solid, about one percent of it was ever white, and the globe drew a closed cap over a scene of open water. The pack is the ice at its real concentration; the loose pieces remain for the thin ice at its edge and the bergs.
It rides the tide, as a moored boat does (FloatingBoats): each chunk's root — its collider — at the still sea level of the tick (WaterQuery), the same on the server and every client, re-placed only when the level has moved. The sea has no swell any peer shares, so the colliders do not heave; the water under the pack is calmed instead (the water's ice mask reads Floes), which is what pack ice does to a sea.
Fields
Area
Where the pack lies, world x/z: the rectangle its floes cover.
public Rect Area
Field Value
- Rect
Chunks
The chunk roots: each holds its chunk's collider, its mesh laid about the still water line, and its drawn ice under a client-only child.
public Transform[] Chunks
Field Value
- Transform[]
Floes
The floes, as cut.
public PackIce.Floe[] Floes
Field Value
- Floe[]
SeaLevelY
The still sea level the pack was cut against, world y: where it lies when the scene has no tide to read.
public float SeaLevelY
Field Value
Methods
Float(uint)
Every chunk to the sea's still level at a tick. A pure function of the tick: the same pose on the server and every client. Moved only when the level has: a static collider re-placed for nothing costs the physics a re-insert.
public void Float(uint tick)
Parameters
tickuint
LevelAt(uint)
The sea's still level under the pack at a tick, world y.
public float LevelAt(uint tick)
Parameters
tickuint
Returns
PoseForTick(uint, double)
Puts this object where (and as solid as) it is at server tick syncTick. True when a transform or
collider changed, so the caller syncs transforms once for all.
public bool PoseForTick(uint syncTick, double tickDelta)
Parameters
Returns
Remarks
Before every live and replayed tick, at the server tick it runs at (TickPoser), so a character is simulated against the ice where it lay on that tick, on the server and on every tick its owner replays.
TryGetForScene(Scene, out PackIce)
The pack in a scene, if it has one.
public static bool TryGetForScene(Scene scene, out PackIce pack)
Parameters
sceneScenepackPackIce
Returns
Events
Changed
Raised when a scene's pack comes or goes, for what draws from it.
public static event Action<Scene> Changed
Event Type
- Action<Scene>