Skip to content

Topic State Holders

The catalog of built-in state holders. Each one saves a single topic — one component's worth of state — on a target it picks itself.

Namespace: Jungle.State Base type: StateHolderBase

Overview

An ObjectStateHolder hosts a list of these. You do not save "this GameObject"; you pick the slices you care about, and each slice picks its own target through a smart-component value. A crate that needs its position and its physics saved gets a Rigidbody State holder and nothing else; a UI panel gets a Canvas Group State holder. Nothing saves more than you asked for.

Two shapes exist under the hood, and both behave the same way in the Inspector:

Base For Target field
StateHolderForComponent<TSmart, TComponent, TOperation> Holders that save one component's state The matching smart component value (SmartRigidbody, SmartLight, …)
StateHolderForGameObject<TTarget, TOperation> Holders that save GameObject-level state A SmartGameObject

Each holder carries its own list of operations, so you choose which aspects of the topic get saved rather than taking all of them.

Built-in holders

Picker name Type Saves
Rigidbody State RigidbodyStateHolder Velocity, kinematic flag, body options, or the full body state
Rigidbody 2D State Rigidbody2DStateHolder Velocity, body type, options, or the full 2D body state
Collider State ColliderStateHolder Collider aspects such as the enabled flag
GameObject State GameObjectStateHolder GameObject aspects such as active state and layer
Canvas Group State CanvasGroupStateHolder Alpha, interactable, raycast blocking
Image State ImageStateHolder UI Image aspects such as fill amount and colour
Light State LightStateHolder Colour, intensity, range, and other Light aspects
NavMesh Agent State NavMeshAgentStateHolder Destination, speed, and other agent aspects
Data Storage State DataStorageStateHolder The keyed values held by a Data Storage component
Collision Matrix State CollisionMatrixStateHolder The global physics collision matrix
Attachment Point State AttachmentPointStateHolder What an Octoputs attachment point is holding
Resource Tank State ResourceTankStateHolder An Otterflow tank's stored amount

Holders whose topic belongs to another plugin (Attachment Point, Resource Tank) only appear when that plugin is installed.

Referring to other objects

A holder that saves which object something points at stores a SavedRef rather than a raw reference, so the link survives the round trip through a save file.

See Also