s&box/field-guide
tag

#silent-failure

41 items (41 fixes)

fixes
26.07
"@ref on a bare private field silently never assigns"

@ref on a private field compiles with only a CS0649 warning — the ref stays null at runtime. Bind to a property instead.

26.07
"Agent workflow: file-ownership and plan-review-delegate"

Disjoint file ownership, serialize hot files, report-don't-fix foreign errors, resume after interrupts — the concurrency rules that keep agent waves shippable.

26.07
"Assembly.cs global usings as project bootstrap"

global using Sandbox + your razor namespace in Assembly.cs — without it, panels and game types don't resolve across the assembly.

26.07
"Authoring s&box .sound events by hand"

MP3 + JSON .sound beside it — no wav/ffmpeg; Distance is in inches; copy schema from addons/menu box_open.sound.

26.07
"Cross-fade animations WITHOUT an AnimGraph"

Set Sequence.Blending = true once — per-clip fade_in/fade_out times in the vmdl shape the blend; no AnimGraph required.

26.07
"dotnet build verifies compile but NOT the whitelist"

Headless dotnet build is green while the in-editor compiler emits SB1000 — Environment/IO/Process/reflection are banned in game code.

26.07
"Double jump doesn't work with Jump() — set Velocity.z directly"

Jump() helpers clamp against rising velocity, eating the second impulse. Set Velocity.z directly for a reliable double jump.

26.07
"Edit-mode Destroy() is deferred — scene queries return stale objects"

GameObject.Destroy() in edit mode is deferred; a query fired right after returns the previous build's objects.

26.07
"Everything broke at once — check for a stale assembly first"

Failed package compile leaves the editor running the last-good hotload — multi-symptom 'regressions' are often stale code.

26.07
"First successful Play: what to verify after the skeleton"

Folders → sbproj → Assembly.cs → 4-object scene → green dotnet build → tagged logs on Play — then optional art tools.

26.07
"Getting set up: new project skeleton"

.sbproj + Assets/Code/ProjectSettings/tools layout, 4-object scene + Bootstrap, dotnet build before anything else.

26.07
"Headless dotnet build misses Razor compile errors"

dotnet build reports 0 errors on .razor files the in-editor compiler rejects — the headless build doesn't surface the Razor errors the live editor's Roslyn compiler flags.

26.07
"How we built a playable s&box game in a day with AI agents"

Top model plans and reviews; cheaper agents execute on disjoint files; telemetry-driven feel tuning — whitelist and stale-assembly traps included.

26.07
"Input.config and AnalogMove for a new game"

WASD as Forward/Backward/Left/Right feeds AnalogMove; new Input.config actions need an editor restart — dotnet build is not enough.

26.07
"Kinematic movement that doesn't get stuck"

Always handle tr.StartedSolid — ignore that frame so an overlapped body can walk free; slide-trace the wish onto the hit plane.

26.07
"Minimal scene: Sun, Skybox, Camera, Bootstrap"

Scene holds four GameObjects; Bootstrap OnStart builds the world in code — hotloads better, no scene/code drift.

26.07
"My custom sound event won't play"

Play full path WITH .sound or bare filename only — partial paths like impact/boing never resolve; compiled assets can still be invisible mid-session.

26.07
"My interface scan returns nothing at runtime"

OfType<IInteractable> on GetAllComponents<Component> returns nothing — enumerate concrete types and union them.

26.07
"New .razor.scss files are not applied until the editor restarts"

A newly created .razor.scss file is not picked up by a running editor session — the panel component works but is unstyled until the next restart.

26.07
"Owner-simulated networking"

[Sync] owner→proxies, IsProxy early-out; FromHost for shared truth — don't NetworkSpawn scene-wide singletons.

26.07
"Pick org and ident early for sbox.game"

Ident is org.package — two lowercase segments; keep Org local until real; never put TODO placeholders in Org or the editor won't boot.

26.07
"Ragdoll a scripted-rig NPC with pure engine physics"

PhysicsShapeList + PhysicsJointList in the vmdl + ModelPhysics toggle — no collapse clips, no SetBoneTransform.

26.07
"Rigging an AI-generated (rigless) character mesh"

Bone-heat auto-weights fail on AI meshes — use scripted geodesic (along-surface) weights, then FBX + animated vmdl.

26.07
"s&box component lifecycle in practice"

OnAwake runs synchronously inside Components.Create — set singletons there; derive from [Property] in OnStart after spawn helpers assign.

26.07
"s&box project folder layout"

Assets / Code / Editor / ProjectSettings / tools — the template every project follows.

26.07
"s&box won't load my OBJ/GLB"

Scenes never load raw OBJ/GLB — always wrap with a .vmdl and remap materials under both bare and .vmat names.

26.07
"Save/load without drift"

DTOs + one spawn path + deterministic static world — guard restored defaults; keep enums append-only.

26.07
"Scene.GetAllComponents skips disabled components"

A component with Enabled = false is invisible to GetAllComponents — search returns null even though the component exists.

26.07
"Sound.Play() is fully static — no component wiring needed"

Sound playback is a static call, not a component. Use Sound.Play() for 2D and Sound.Play(pos) for 3D, and handle missing events gracefully.

26.07
"Stalled Steam update half-deletes the s&box install"

If sbox-launcher.exe stays open during a Steam update, files vanish mid-install — validate via steam://validate/590830.

26.07
"The bone-name `.` → `_` compiler trap"

Model compiler rewrites upper_arm.L → upper_arm_L; physics KV3 that still says .L makes limb bodies unknown while the torso works.

26.07
"The Razor @namespace trap"

Razor classes get a RootNamespace/folder-derived namespace — declare @namespace and global using or C# can't find your panels.

26.07
"The singleton pattern that removes reference-wiring"

static Instance set in OnAwake, cleared in OnDestroy — everything reads Foo.Instance with null-guards, no inspector wiring.

26.07
"There's no Looping field on SoundEvent"

SoundEvent has no Looping property — loop via compiled vsnd import options, or re-trigger from code when SoundHandle finishes.

26.07
"Title / Ident / StartupScene fields that bite new projects"

StartupScene is what Play loads; Org must be a valid lowercase ident — placeholders break editor bootstrap, not just publishing.

26.07
"Too many font-size declarations corrupt UI text rendering"

Many selectors declaring font-size in one SCSS file can make text render as solid filled rectangles — carry hierarchy via font-weight/color instead.

26.07
"Trace-based kinematic controllers don't fire triggers"

A hand-integrated trace mover has no collider component — ITriggerListener and OnTriggerEnter never fire. Use distance-polling instead.

26.07
"Using AI-generated 3D models in a real s&box game"

AI mesh generators (Tripo, Meshy, Rodin) deliver textured OBJ+vmdl — but modeldoc32 headers, ~1m normalize, corrupt textures, bare texture paths, and missing colliders will ERROR the asset until patched.

26.07
"What hotload does (and doesn't) for a new project"

C# hotloads on alt-tab in ms; scene changes and new Input.config actions need Play/editor restart; failed compile keeps the last-good assembly.

26.07
"Why SetBoneTransform / SetIk silently do nothing"

SetIk is AnimGraph-gated; SetBoneTransform is unsound on clip-keyed bones — use proxy props, whole-visual motion, or commit to AnimGraph.

26.07
"Wiring Sandbox.Services"

Stats.Increment/SetValue, Leaderboards.GetFromStat, Achievements.Unlock — cheap platform polish; total achievement score capped at 1000.