tag

#testing

8 items (1 guide · 7 fixes)

guides
fixes
26.07.15a
"A -joinlocal dev-host client CAN read the host's Networking.SetData lobby metadata"

A second editor instance launched with -joinlocal is not a real Steam lobby member, yet Networking.GetData still resolves the host's Networking.SetData values -- they arrive over the ServerDataMsg the host sends on connect, not via lobby membership. The message can lag scene load by a few frames, so read GetData in a short poll loop.

26.08.05
"A -joinlocal peer joins whoever owns 127.0.0.1:55333, not whoever is in play mode"

A -joinlocal second instance connects to whichever process holds the loopback port 127.0.0.1:55333, so the precondition to check is socket ownership, not which editor is in play mode.

26.07.15
"A -joinlocal test peer presents an empty invite code, so a wire-verified code gate rejects it"

A -joinlocal second instance never runs the in-game Join UI: it connects straight to the editor's loopback dev-host socket, so it presents an empty invite code. Any host that verifies the code on the wire will correctly reject it, breaking the local two-peer test even though every other hop is healthy. It's a harness artifact, not a product bug.

26.08.05
"An automated input harness reads zero movement unless it runs first and injects on both steps"

A component that injects movement input for automated testing has to sit first in the scene hierarchy and write on both OnUpdate and OnFixedUpdate, or every movement phase reads zero while looking still works. Input.AnalogMove is computed once per frame from the movement actions before components run, so setting the Forward/Back/Left/Right actions afterward moves nothing that frame. Write Input.AnalogMove directly for held movement instead. Components run in scene order, so a harness under the controlled character runs after the stock mover and its writes land one frame late, then get wiped. Movement is consumed on the fixed step while looking is consumed on the per-frame update, so a harness that injects only from OnUpdate passes every look phase and reads exactly zero on every movement phase.

26.08.05
"Citizen body aim needs SetLookDirection, not the aim_body floats"

The Citizen animgraph drives body aim from SetLookDirection("aim_body", dir, weight), not from the aim_body_pitch / aim_body_yaw floats. Writing only the floats reads back perfectly and moves the pose zero degrees.

26.07.22
"Local two-peer multiplayer testing with -joinlocal"

sbox.exe -joinlocal +instanceid 1 gives you a real second peer against an editor host with no publish, no second Steam account, and no lobby discovery. It has no host selector: it joins whichever local editor is in PLAY MODE, so no other editor on the machine may be playing.

26.07.22
"Setting a [ConVar] to the value it already holds does nothing"

Re-setting a [ConVar] to the value it already holds is a silent no-op: the C# setter never runs, so a convar-triggered action does nothing, with zero console output. Statics survive Play stop/start, so a prior session leaves the value already set.

Want to know when new guides or fixes drop? Join the community to help build this out. Report gotchas, flag outdated fixes, or just lurk.

Join the Discord