Rokojori Base

The generic library layer under Assets/Scripts/Rokojori - no project code may be referenced from here, only Unity core. Everything else (GameState, Dialog, Simulation) is built on top of this.

Unique<T>

Unique<T>.Get() is the singleton locator used everywhere (GameStateManager.instance, DialogManager.instance, SimulationManager.instance, SimulationRenderer.instance). It searches the root game objects of all open scenes for a component of type T on first access and caches the result statically - there is no manual registration step. This means exactly one instance is expected to exist in the open scenes; a second instance is never detected or warned about.

EventSlot<T>

A plain pub/sub slot - AddAction, RemoveAction, Once, DispatchEvent( value ). Listeners added or removed during a dispatch are queued and only applied after the current dispatch finishes (_canModify guards this) - safe to unsubscribe yourself from inside your own callback.

Used directly as the type of GameStateNumberVariable.onChanged / GameStateBoolVariable.onChanged.

EventProperty<T> / ReadonlyEventProperty<T>

An observable value built on EventSlot. Setting .value only dispatches if the new value differs from the old one (via EqualityComparer<T>.Default) - assigning the same value twice fires nothing. SetSilent() changes the backing value without dispatching. Not currently used by GameState/Dialog/Simulation - those roll their own change tracking (GameStateManager's dictionaries + each variable's own EventSlot) instead.

Locale / LocaleText / LocaleCode

Locale is the abstract base (a ScriptableObject with GetLocale( LocaleCode )); LocaleText is the only concrete implementation and currently just returns its en field regardless of the requested LocaleCode - there is no real per-language switching yet. LocaleManager.currentLocale exists but nothing reads it. DialogLine/PlayerChoice reference Locale assets for their text, so localization can be wired in later without touching Dialog code.

RJLog

Static wrapper over Debug.Log/LogWarning/LogError. Takes a leading object plus a params object[] and space-joins everything into one string - RJLog.Log( "value:", 5, someObject ).

ListExtensions

list.Has( item ) (index-based, works without IEquatable) and list.RemoveList( removals ) (removes every item in one list from another).

SceneExtensions

scene.Get<T>() and SceneExtensions.GetInOpenScenes<T>() search root game objects (and their children) for a component - this is what Unique<T> calls internally.

Null

An empty marker class with a private constructor - not referenced by anything yet.