Reference · Unity runtime
The C# port of the walker runtime: same trained brains (the JSON policies in runtime/policies/), same constants, same certification battery. Cold-run proven 2026-07-21: a fresh agent with only this kit put Boss Room's own Imp character under walker control — install to verified motion in 9m33s — with the battery 12/12 inside the game project.
LivingWorld.cs, LwBridge.cs — runtime + the body hookup (drop LwBridge on a character,point player at the player, set expert and optionally personaFile).
Editor/LwExam.cs, Editor/LwCommands.cs — the battery + CLI verbs. **The Editor/ split isload-bearing**: these reference UnityEditor/Unity.Pipeline and must live in an Editor folder or player builds break.
personas/guard.json, personas/coward.json — two compiled persona profiles to start with.An NPC with no persona runs the neutral default (legal, generic reactions).
cp unity/LivingWorld.cs unity/LwBridge.cs <proj>/Assets/LivingWorld/
cp unity/Editor/*.cs <proj>/Assets/LivingWorld/Editor/
cp -r runtime/policies <proj>/Assets/StreamingAssets/policies
cp -r unity/personas <proj>/Assets/StreamingAssets/personas
cp vocabulary/town-1.json <proj>/Assets/StreamingAssets/vocabulary/ # the verb vocabulary
cp <level>.manifest.json <proj>/Assets/StreamingAssets/manifests/ # optional: the level's verb manifest
PREFLIGHT: verify the project's scenes actually contain geometry (git lfs checkouts with unfetched pointers open as EMPTY scenes and everything downstream silently tests nothing).
Everything here is driven from the terminal: Claude Code is the installer, the Unity CLI is the socket. The full loop an agent runs:
curl -fsSL https://public-cdn.cloud.unity3d.com/hub/prod/cli/install.sh | UNITY_CLI_CHANNEL=beta bash then export PATH="$HOME/.unity/bin:$PATH". unity editors lists installed editors.
unity pipeline install (adds com.unity.pipeline) and unity open (launches the editor — wait ~60–90s for first import; unity command --project-path <proj> recompile_status tells you when scripts are compiled).
unity command --project-path <proj> ...: lw-exam (thebattery), lw-discover (the discovery object), lw-demo-setup (a proof scene), editor_play / editor_stop, capture_game_view (screenshot evidence), and eval for anything else — it runs arbitrary C# in the live editor, e.g. unity command --project-path <proj> eval "return GameObject.Find(\"npc\").transform.position.ToString();".
over several seconds via eval, and confirm the distance to its target changes the way the behavior claims (follow closes to ~3.0 and holds; evade opens). A domain reload after recompile briefly drops the CLI connection — retry, don't conclude failure.
Unity -batchmode -quit -projectPath <proj> -executeMethod LivingWorld.LwExam.RunBattery (exit 0 = green) — use this in CI.
Headless (CI): Unity -batchmode -quit -projectPath <proj> -executeMethod LivingWorld.LwExam.RunBattery — exit 0 = green. Live editor: unity pipeline install, then:
unity command --project-path <proj> lw-exam
Always pass --project-path. With more than one editor open, a bare unity command can silently run against the WRONG project and report its results as yours — the output's policies path tells you which project actually ran.
lw-discover emits the discovery object (measured collider footprints + bridged NPCs with personas). An empty result carries a loud warning: open the scene that actually holds gameplay geometry — additive-scene games (Boss Room included) keep it in sub-scenes, not the root scene. Actor hierarchies are excluded automatically (child colliders on character prefabs are not scenery).
Characters FEEL, and the kit tells you what they feel; how it looks is your game's craft (your face rig, your animator, your particles — "render this however your game shows feeling"). Read it off the bridge every frame:
bridge.EmotionLabel // "neutral" | "happy" | "sad" | "afraid" | "angry" | "anxious" | "wary"
bridge.EmotionValence // -1..1 bridge.EmotionArousal // 0..1
Two sources set it, both closed-surface: recovery picks (the reaction IS the feeling — a cowering character reads afraid, a confronting one angry; free, offline, frame-rate) and the dialogue layer (a setEmotion message over the wire when a conversation shifts the mood). It decays to neutral on its own. The label set is fixed — certifiable, never generated.
Unity speaks the same wire as every web game. One LwWire in the scene (set player; bridges auto-discovered) connects to the broker and: streams the 1Hz state feed the coach grounds against, receives the coach's commands (mode tables, sequences, personas), and sends player dialogue via wire.SendDialogue("go wait by the crate then follow me") — hook that to your chat box. Bridges execute mode tables (default | weapon | near:X | far:X) and sequences (untils: reached/arrived | timeout:N | near:X | far:X | hold), with the character fallback underneath everything.
Run the brains (both ship in this kit's pipeline/):
LW_PORT=8768 python pipeline/ws_server.py # the broker
LW_WS=ws://localhost:8768 LW_DIALOGUE=/tmp/lw_dialogue.log \
python pipeline/command_compose.py --loop # the coach (⚡ routing + grounding)
Note the env split: the broker reads LW_PORT; the coach reads LW_WS (a full ws:// URL) and LW_DIALOGUE. Mismatched ports = the coach silently grounds against another game's world.
The 💬 conversation lane needs a dialogue backend. The coach's talk mode speaks a hosted dialogue service (set ENGRAM_URL to it) — that lane is metered, not local, and this kit does not include the backend. Without one, talk mode fails gracefully (logged, no action taken); ⚡ commands, plans, reactions, and emotions are unaffected — they never leave your machine. Proven live: "follow me" routed and held the exact 3.0 gap; "go wait by the crate then follow me" grounded the crate from Unity's own state feed and executed both steps.
LwExam is the authoritative certification for the Unity preview. The wider battery andcertify.py flow described in CAPABILITIES.md are the web kit's; the Unity equivalents land with the full release. lw-discover implements the discovery object's objects/npcs sections; the manifest/player fields are still pending. The ⚡ quick lane and sequence execution are IN (see above); ✦ plan generation is the hosted service and 💬 conversation is a separate layer — both compose onto the same wire when enabled.
line; this kit ships two. New ones come from us (usually within the hour) — the compiler is not in the kit.
.mcp.json, .claude/) — use ls -la. Reference-implementation paths mentioned in DISCOVERY_SPEC.md refer to our repos, not files in this kit.
Status: preview. Battery, bridge, personas and the Boss Room cold-run are proven; chat lanes and full-spec discovery are the remaining Unity milestones before "Unity supported" is claimed.