field-guide / search

165 results · flexsearch

[Sync] component created after NetworkSpawn silently never replicates

A component with [Sync] fields added in OnStart (after NetworkSpawn) never replicates — each peer creates its own local instance and the sync pair silently never matches.

writing-gameplay · ✓ 26.07.08e
@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.

building-ui · ✓ 26.07.08e
A complete Blender-headless → s&box pipeline

Two-stage flow: Blender headless emits Y-up OBJ, then pure Python writes vmats/vmdls and a C# model catalog.

getting-art-in · ✓ 26.07.08e
A frame-budget method for stylized s&box scenes

Census tris × instances before decimating; prefer BoxCollider over ModelCollider for decorative props.

making-it-perform · ✓ 26.07.08e
A pre-publish checklist for sbox.game

Org/ident rules, every store-page field is launch-blocking, AI thumbnails demoted — verify as a player after publish.

publishing-shipping · ✓ 26.07.08e
Absolute biome altitude thresholds break when height amplitude changes

Absolute-altitude biome thresholds tuned at one reference amplitude break when the slider moves -- the climate stack squashes or vanishes. Scale every altitude threshold by realized relief.

writing-gameplay · ✓ 26.07.15a
Absolutely-positioned flex column with auto height silently drops trailing children

Trailing children of a tall absolutely-positioned flex column silently vanish — no overflow, no compression — because Yoga's auto-height under-measures the content. Fix: give the column an explicit height.

building-ui · ✓ 26.07.08e
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.

ai-assisted-workflow · ✓ 26.07.08e
Angles struct fields are lowercase

Angles uses .pitch/.yaw/.roll (lowercase) and Vector3 uses .x/.y/.z — capitalized sightings in a codebase belong to unrelated component properties.

tooling-environment · ✓ 26.07.08e
Array.Clone() blocked by whitelist but dotnet build misses it

System.Array.Clone() compiles clean in dotnet build but fails SB1000 in the editor — the headless build does not enforce the whitelist.

writing-gameplay · ✓ 26.07.08e
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.

getting-set-up · ✓ 26.07.15a
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.

audio · ✓ 26.07.08e
Blender --background hangs indefinitely -- user prefs corruption, not the script

A Blender --background --python pipeline hangs at init forever. --factory-startup -noaudio bypasses the corrupted user prefs and runs instantly.

tooling-environment · ✓ 26.07.08e
Blender 5.2 removed Scene.node_tree compositor API

Blender 5.2 removed Scene.node_tree and CompositorNodeComposite — scripts using the old 4.x/5.0 compositor API silently produce wrong renders with no exception.

tooling-environment · ✓ 26.07.08e
Blender OBJ export face order is not deterministic

bpy.ops.wm.obj_export can reorder face lines across runs on the same mesh — diff the manifest, not the raw OBJ bytes.

getting-art-in · ✓ 26.07.08e
Blender OBJ import puts Y-up rotation in object matrix, not vertex coords

Headless Blender wm.obj_import with up_axis=Y stores the Y→Z rotation in the object matrix, not the vertex coords — per-vertex scripts reading raw .co get the wrong axis.

getting-art-in · ✓ 26.07.08e
border-style: solid is a parse error that kills the whole stylesheet

border-style: solid is a parse error in s&box scss. The invalid property aborts the whole stylesheet, collapsing the panel to zero size -- invisible, not just unbordered.

building-ui · ✓ 26.07.15a
Building a draggable slider with click-to-jump and drag-to-scrub

No native drag helper exists for PanelComponent sliders — use the engine's SliderControl pattern: MousePanelEvent.LocalPosition over track width, with pointer-events routing.

building-ui · ✓ 26.07.08e
Building an s&box HUD

One ScreenPanel host, static UIState for modals, self-closing panels, toast stack — BuildHash every flag the markup reads.

building-ui · ✓ 26.07.08e
Character facing derived from velocity flips 180 degrees on every pendulum reversal

Deriving a visual's facing from horizontal velocity causes 180-degree snaps on any momentum reversal — lock facing to an attach-time azimuth for pendulums and oscillators.

tooling-environment · ✓ 26.07.08e
Chase camera using raw fixed-tick position causes model sawtooth jitter

A chase camera that reads a raw fixed-tick position field per render frame makes the player model sawtooth side-to-side — read WorldPosition (context-sensitive interpolated getter) instead.

writing-gameplay · ✓ 26.07.15a
Chunked mesh generation is math-bound, not draw-call-bound

For a chunked runtime-mesh generator, REGEN (single-threaded generation CPU) is the binding resource — not fps or draw calls. Quartering the chunk count produces zero regen change; the lever is threading the passes.

making-it-perform · ✓ 26.07.08e
Citizen animgraph combat params are unwrapped and unnetworked

The stock citizen animgraph ships combat params that CitizenAnimationHelper does NOT wrap -- drive them with renderer.Set() directly, and replicate them yourself because the engine only networks locomotion.

rigging-animation · ✓ 26.07.15a
Citizen held-item pose map: HoldType, aim, and IK hand targets

HoldType shapes arm+fingers, aim only tilts via aim_body_pitch/yaw, and an IK hand target OWNS hand position — overriding the holdtype arm pose. Move the IK target to place a held item, use holdtype only for the fist.

rigging-animation · ✓ 26.07.15
Cloud assets fail silently under backend load after publish

Published game boots with error.vmdl placeholders; engine may rewrite prefab refs — no auto-retry; restart editor + republish.

publishing-shipping · ✓ 26.07.08e
Collider choice that actually costs you

BoxCollider is cheap and follows WorldScale; Capsule/ModelCollider don't scale with WorldScale and ModelCollider is costly on clutter.

making-it-perform · ✓ 26.07.08e
Components.Get misses a SkinnedModelRenderer on a child object

Components.Get<SkinnedModelRenderer>() only searches the same GameObject — a renderer on a child returns null, silently no-oping every Set() call.

writing-gameplay · ✓ 26.07.15a
CreateLobby is async — IsActive is still false on the same frame

Networking.CreateLobby is async — Networking.IsActive is still false on the same frame, so any branch on IsActive takes the wrong path. Gate on your own synchronous mode enum instead.

writing-gameplay · ✓ 26.07.08e
Cross-assembly hot-reload throws MissingMethodException despite green compile

Adding a public method to the game assembly and calling it from the editor-tools assembly in the same hot-reload pass throws MissingMethodException at runtime — both compile_status and dotnet build are green.

tooling-environment · ✓ 26.07.15a
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.

rigging-animation · ✓ 26.07.08e
Custom GameResource extension must be 8 characters or fewer

A custom GameResource with a file extension longer than 8 characters silently never registers as a compilable source type — every asset fails with "no source file." Keep extensions to 8 lowercase chars or fewer.

tooling-environment · ✓ 26.07.15a
Decimating AI meshes without wrecking them

Census tris × instances first — silhouette fails before UVs; inject usemtl after scripted OBJ export.

getting-art-in · ✓ 26.07.08e
Dedicated server dies at launch with 'You must install .NET to run this application'

A freshly SteamCMD-installed sbox-server.exe is not self-contained -- it needs the matching .NET runtime on the box, or it dies before any game logic.

writing-gameplay · ✓ 26.07.08e
Dedicated server with an unpublished package — clients can't join

A headless sbox-server running an unpublished local .sbproj boots and creates a lobby, but every joiner fails with 'Package local.<ident> wasn't found!' — publish the package first (Hidden visibility is sufficient).

writing-gameplay · ✓ 26.07.08e
Deep vertical terrain sink defeats lateral eject and mantle — escalate through hard-recover to a top-out

A stationary vertical sink at a chunk-corner seam defeats eject, mantle, and even hard-recover (the anchor itself can be buried under an overhang) — the terminal escape is a top-out to the chunk surface.

writing-gameplay · ✓ 26.07.08e
Dev-host streaming skips loose data files, breaking deterministic sync

Dev-host streaming sends assemblies and compiled assets but NOT loose data files read via FileSystem.Mounted — a joining client that loads a raw JSON manifest builds differently, silently.

writing-gameplay · ✓ 26.07.15a
Disabling per-instance shadows on ModelRenderer

ModelRenderer.CastShadows doesn't exist as a settable property — use renderer.SceneObject.Flags.CastShadows instead.

getting-art-in · ✓ 26.07.08e
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.

tooling-environment · ✓ 26.07.08e
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.

writing-gameplay · ✓ 26.07.08e
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.

writing-gameplay · ✓ 26.07.08e
Editing .razor safely (shell/emoji mojibake)

Razor HUD emoji and dashes die under Get-Content/Set-Content — edit with byte-safe UTF-8 APIs or a real editor.

tooling-environment · ✓ 26.07.08e
Editor auto-exposure makes screenshot comparisons report false positives

Two screenshots of byte-identical geometry differ by tens of percent because editor auto-exposure adapts over wall-clock frames — settle the viewport and exposure-normalize before comparing.

writing-gameplay · ✓ 26.07.08e
Editor play mode is hard-capped at 60 fps — cvars won't lift it

Editor-embedded play mode pins at exactly 60 fps regardless of cvars. The cap is the compositor's vsync on the editor window, not the engine frame sync.

making-it-perform · ✓ 26.07.08e
Editor stuck running stale assembly with green compile — only a restart clears it

compile_status is fully green and the editor accepts edits, but Play executes the OLD code — touch, syntax-error cycling, and play restart all fail. Only a full editor process restart clears it.

tooling-environment · ✓ 26.07.08e
Editor vsync hides physics cost — time the step directly

Frame fps pins at 60 in the editor regardless of physics load — implement IScenePhysicsEvents.PrePhysicsStep/PostPhysicsStep with a Stopwatch to get the true, vsync-free CPU cost of the solver step.

making-it-perform · ✓ 26.07.15a
Engine ships built-in McpTool source as readable C# — read it before writing your own

The engine ships its built-in [McpTool]s as full C# source, not compiled DLLs — check addons/tools/Code/Mcp/*.cs for canonical patterns before inventing your own.

tooling-environment · ✓ 26.07.08e
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.

tooling-environment · ✓ 26.07.08e
FacingYawOffset swaps which local axis is the flip axis vs the cartwheel axis

A front-flip rotation uses _baseRot.Forward (not .Right) when FacingYawOffset is ±90° — the offset swaps which local axis is perpendicular to travel.

tooling-environment · ✓ 26.07.08e
FileSystem is ambiguous in editor assemblies — CS0104 between Editor.FileSystem and Sandbox.FileSystem

An unqualified FileSystem compiles in a game assembly but CS0104s in an editor assembly — fully-qualify Sandbox.FileSystem in editor code.

tooling-environment · ✓ 26.07.08e
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.

getting-set-up · ✓ 26.07.08e
First-person hide: use the viewer tag, not RenderType

RenderType.Off only kills the shadow, not the draw — use Tags.Set("viewer", true) on the visual root plus camera RenderExcludeTags for correct first-person body hiding.

writing-gameplay · ✓ 26.07.08e
Fixing a source asset doesn't always trigger recompilation

ERROR models or white materials persist after fixing the source — delete the compiled artifact AND touch the source file to force recompilation.

tooling-environment · ✓ 26.07.08e
Flex-grow track with a percentage-width child causes a layout feedback loop

A flex-grow slider track holding a normal-flow fill child sized by width:N% balloons wider as the value increases — take the fill out of flow with position:absolute.

building-ui · ✓ 26.07.08e
Foot-sliding on locomotion — pace clips by their authored stride, not the controller's top speed

Foot-slide happens when PlaybackRate is tied to movement top speed instead of the clip's own authored stride distance.

rigging-animation · ✓ 26.07.08e
Forge delivery fails but the preview GLB is still downloadable — recover it

Forge delivery job errors out but the build stage's previewGlbUrl stays downloadable — recover the GLB through Blender into your standard delivery shape instead of re-spending.

getting-art-in · ✓ 26.07.08e
FrameStats and PerformanceStats are accessible from game code — no engine benchmark system needed

Sandbox.Diagnostics.FrameStats and PerformanceStats are whitelist-clean and reachable from game-assembly components — build a relative perf probe without any engine benchmark API.

making-it-perform · ✓ 26.07.08e
FromHost field on a runtime singleton does not replicate without NetworkSpawn

A [Sync(SyncFlags.FromHost)] field on a runtime-created singleton never replicates — the object needs NetworkSpawn, not just NetworkMode.Snapshot.

writing-gameplay · ✓ 26.07.08e
GameObject.Destroy keeps rendering in edit mode — deferred queue not processed between regenerations

A runtime-generated world root torn down with GameObject.Destroy() keeps rendering in edit mode because the deferred queue isn't flushed — use DestroyImmediate and sweep all matching roots.

writing-gameplay · ✓ 26.07.08e
Gamepad triggers have a public analog read — Input.GetAnalog works

Gamepad triggers DO have a public smooth 0..1 analog read via Input.GetAnalog(InputAnalog.LeftTrigger/RightTrigger). Named Input.config actions bound to triggers remain digital-only (on/off) — use the direct analog surface for proportional control.

writing-gameplay · ✓ 26.07.08e
Getting set up: new project skeleton

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

getting-set-up · ✓ 26.07.08e
Git worktree at different depth breaks sbox csproj relative references

A git worktree at a different directory depth than the main checkout breaks the generated csproj's relative references to the sbox install — dotnet build fails with missing-assembly errors.

tooling-environment · ✓ 26.07.15a
Glyph corruption (text renders as solid blocks) is also text-count dependent

The s&box glyph-corruption bug is also triggered by cumulative mono text-run count, not only font-size declarations — and it corrupts positionally (last-rendered text first).

building-ui · ✓ 26.07.08e
Greedy voxel mesher produces vertical stripes on cliff faces instead of horizontal strata

Per-cell dither or contour-wander in a greedy voxel mesher turns cliff skirts into vertical stripes — detect walls and key strata on raw height bands with dither neutralised.

writing-gameplay · ✓ 26.07.08e
Green compile_status coexists with a stale play-mode hotload reporting phantom errors

compile_status shows Success and dotnet build is green, but play mode reports errors for symbols and lines that no longer exist in source — the play-mode hotloader compiled a stale mid-edit snapshot.

tooling-environment · ✓ 26.07.08e
Ground snap pops on rolling slopes — rate-limit the downward snap

An idempotent ground-snap jitters on curved terrain because the slope curves away within each step — ease the downward snap at a bounded glue rate.

writing-gameplay · ✓ 26.07.08e
Grounded wish-speed servo silently destroys applied velocity

A grounded wish-speed servo (MoveTowards) silently clamps any externally applied velocity (mantle carry, knockback, launch) to the wish target within a few ticks of ground contact -- boundary measurements read green while the effect is imperceptible.

writing-gameplay · ✓ 26.07.15a
Hand-rolled visual smoother fights engine FixedUpdateInterpolation — 50 Hz model flicker

A per-frame visual-smoothing offset computed from raw fixed-tick state double-smooths against the engine's built-in FixedUpdateInterpolation, producing a 50 Hz sawtooth that reads as model flicker on stepped terrain — delete the manual smoother or compute against interpolated state.

writing-gameplay · ✓ 26.07.08e
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.

tooling-environment · ✓ 26.07.08e
Heavy work without frame hitches

GameTask.RunInThreadAsync for parse/math; main thread only for engine objects; Yield every N items for loading UI.

writing-gameplay · ✓ 26.07.08e
High-key chalky sky is capped by two defaults — texture AND tonemapping must both change

A near-white chalky sky stays mid-grey or blue — fixing the sky texture alone isn't enough because the default tonemapping curve crushes highlights.

getting-art-in · ✓ 26.07.08e
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.

ai-assisted-workflow · ✓ 26.07.08e
Idempotent world rebuild needs DestroyImmediate, not Destroy

Deferred Destroy() leaves the old code-built world overlapping the fresh one for a frame — use DestroyImmediate for teardown before rebuild, and pair it with a recipe hash for belt-and-suspenders join verification.

writing-gameplay · ✓ 26.07.15a
Importing Kenney / CC0 kits into s&box

CC0 kits import like any OBJ+vmdl; city kits share colormap.png, nature kits need per-color vmats, and facing is a per-model yaw guess.

getting-art-in · ✓ 26.07.08e
Input.config action on an editor-reserved key silently never fires in Play

An Input.config action bound to an editor/host-reserved key (F1-F3, F7, F8, Escape) silently never fires in Play. The capture map also differs between editor and published client -- bind game hotkeys to plain letters and verify in both.

writing-gameplay · ✓ 26.07.08e
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.

getting-set-up · ✓ 26.07.08e
Input.Pressed edges drop or double-fire inside OnFixedUpdate

Input.Pressed (edge-trigger) is frame-scoped -- reading it in OnFixedUpdate drops presses on frames with no tick, or fires them twice on frames with multiple ticks. Level reads (Input.Down) are fine in OnFixedUpdate. A systematic 100% input failure usually points elsewhere -- instrument each hop.

writing-gameplay · ✓ 26.07.15a
It worked in the editor but broke after publishing

Whitelist divergence, loose Resource Files, and silent cloud-asset failures after publish.

publishing-shipping · ✓ 26.07.08e
Joining client's singleton claim grabs the host's character

A static Instance claimed behind if (!IsProxy) in OnStart grabs the host's character on a joining client — the client camera follows the wrong player forever.

writing-gameplay · ✓ 26.07.15a
Joining client's static state wiped by networked scene handoff

A joining client's static join state (invite code, mode, attempt ID) gets wiped by the networked scene handoff — the bootstrap's OnEnabled resets statics before the join handshake uses them.

writing-gameplay · ✓ 26.07.08e
Keep PackageReferences clean from day one

Standalone export hangs if PackageReferences still need sbox.game to resolve — don't accumulate cloud package deps casually.

getting-set-up · ✓ 26.07.08e
Keep quaternion keys hemisphere-continuous

Converting euler poses per-key can land on q vs -q — the interpolation takes a violent 360-degree detour. Negate the quat if dot(prev, new) < 0.

rigging-animation · ✓ 26.07.08e
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.

writing-gameplay · ✓ 26.07.08e
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.

writing-gameplay · ✓ 26.07.15a
Loose resource files don't auto-publish

PNG/WAV/MP3/JSON must be listed in Project Settings → Resource Files without an assets/ prefix — #1 editor-vs-publish break.

publishing-shipping · ✓ 26.07.08e
Lowering sea level doesn't drain interior lakes — depression lakes are perched

Lowering the sea level in a priority-flood water pass doesn't drain interior lakes — they're perched at their own spill surface. Use a per-basin depth gate and a land floor for below-sea valleys instead.

writing-gameplay · ✓ 26.07.08e
Minimal scene: Sun, Skybox, Camera, Bootstrap

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

getting-set-up · ✓ 26.07.08e
Model.Load of a missing vmdl returns the error model, not null

Model.Load of a missing vmdl can return the orange ERROR mesh with the requested path as its Name — check IsError, not just null.

tooling-environment · ✓ 26.07.08e
ModelRenderer.Tint on flat-color vmats causes purple/black corruption

Per-instance Tint on a flat-color vmat (white PNG + g_vColorTint) rotates hue or crushes random instances to black — use scale/yaw jitter instead.

writing-gameplay · ✓ 26.07.08e
Mouse-look camera reads zero from Input.AnalogLook unless cursor is locked

Input.AnalogLook returns zero (camera never turns) unless the cursor is locked via Mouse.Visibility = MouseVisibility.Hidden -- the deprecated Mouse.Visible = false does NOT lock it.

writing-gameplay · ✓ 26.07.08e
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.

audio · ✓ 26.07.08e
My interface scan returns nothing at runtime

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

writing-gameplay · ✓ 26.07.08e
My model has no collision even though it loads fine

RenderMeshFile alone compiles clean with zero physics — ModelCollider needs PhysicsMeshFile/PhysicsHullFile in the vmdl.

getting-art-in · ✓ 26.07.08e
My model imported upside down / sideways / facing the wrong way

Blender +X becomes world −Y after OBJ import; yaw +90° faces +X — and Blender +Y rotation tips the +X edge down.

getting-art-in · ✓ 26.07.08e
My s&box UI won't update / is frozen

BuildHash() is the only re-render trigger — hash everything the markup reads, including collection contents and flags.

building-ui · ✓ 26.07.08e
My scaled-up tree's collider didn't scale

CapsuleCollider and ModelCollider ignore WorldScale; BoxCollider follows it — bake scale into import_scale instead.

getting-art-in · ✓ 26.07.08e
Naming a property 'Active' shadows Component.Active

Component.Active is a real inherited member — naming your own bool Active silently shadows the engine's enabled flag.

writing-gameplay · ✓ 26.07.08e
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.

writing-gameplay · ✓ 26.07.08e
Noclip in a trace-based kinematic controller is a state, not a collider toggle

Disabling a collider does nothing for a hand-integrated kinematic controller — noclip must be a movement state that skips traces, gravity, and ground-snap entirely.

writing-gameplay · ✓ 26.07.08e
NPC steer loop freezes forever against a wall

A trace-swept NPC with 'wall ahead, hold position this frame' freezes permanently when the desired direction is constant -- the identical trace hits the identical wall every frame.

writing-gameplay · ✓ 26.07.15a
Null check on a destroyed GameObject still NREs — use IsValid()

A cached Component/GameObject reference guarded with == null still throws NullReferenceException after the object is destroyed — only IsValid() catches destroyed objects.

writing-gameplay · ✓ 26.07.08e
OnDisabled nulls a singleton, blocking re-adoption forever

A singleton claimed in OnEnabled and nulled in OnDisabled traps any re-adopt poll that gates on Instance.IsValid() — the entity is never re-driven after a disable.

writing-gameplay · ✓ 26.07.15a
Orient a flat decal box to the hit normal

Rotation.FromYaw alone leaves a decal flat on the floor — build a rotation that aligns the thin axis to the surface normal, then offset along it.

writing-gameplay · ✓ 26.07.08e
Overhead UI element freezes at a remote player's spawn position

An overhead name tag or health bar anchored to a per-player gameplay field freezes over a remote player's spawn position while their model walks away — anchor off the networked transform instead.

writing-gameplay · ✓ 26.07.08e
Owner-simulated networking

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

writing-gameplay · ✓ 26.07.08e
PanelComponent uses OnTreeBuilt, not OnAfterTreeRender

OnAfterTreeRender(bool) is a Panel hook — on a PanelComponent it fails with CS0115; use parameterless OnTreeBuilt() or OnTreeFirstBuilt().

building-ui · ✓ 26.07.08e
Per-cell white noise hash gives salt-and-pepper terrain instead of organic shade patches

A per-cell white-noise hash for terrain shade choice reads as a 50/50 checkerboard — use a smooth low-frequency noise field instead, confining the hash to threshold-edge dithering.

writing-gameplay · ✓ 26.07.08e
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.

getting-set-up · ✓ 26.07.08e
Published-build client join reloads the assembly, wiping all statics

A published-build client join reloads the game assembly, wiping all statics — the reconstruct-not-reset fix from the scene-handoff case has nothing to reconstruct from unless join intent is persisted to disk.

writing-gameplay · ✓ 26.07.08e
Push-to-talk silently dead — Voice action missing from Input.config

The Sandbox.Voice component defaults PushToTalkInput to 'voice', but not every project ships a matching 'Voice' InputAction — PTT is a dead key with zero errors until you add it to Input.config.

audio · ✓ 26.07.15a
Ragdoll a scripted-rig NPC with pure engine physics

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

rigging-animation · ✓ 26.07.08e
Razor panel mounted before a sync call never paints — budget frames, not ticks

A loading screen mounted right before a synchronous multi-second call never paints — one consumed tick isn't enough; gate the block on a frame counter (~6 frames) so the Razor pipeline finishes mount → style → layout → paint.

building-ui · ✓ 26.07.08e
Razor RenderFragment flex rows with gap collapse on top of each other

Thin flex rows with a gap inside a Razor RenderFragment expression under-measure their height and pile on top of each other. The same markup renders fine in the component's main root.

building-ui · ✓ 26.07.08e
Rebuilding a multi-material model loses submesh materials

GetVertices/GetIndices flatten a multi-material compiled model into one buffer — rebuilding with Materials[0] paints everything that first material (often black). Split indices by per-submesh counts and build one Mesh per range.

writing-gameplay · ✓ 26.07.15a
Retargeting free Mixamo mocap onto a custom rig

Transfer rest-delta rotations parent-relative (not world) — avoid the forward-hunch bug and never transform_apply scale on Mixamo armatures.

rigging-animation · ✓ 26.07.08e
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.

rigging-animation · ✓ 26.07.08e
Rigidbody component API

Rigidbody API verified across multiple projects — Gravity, MassOverride, Velocity, ApplyForce, and the recipe for a dynamic pushable prop.

writing-gameplay · ✓ 26.07.08e
Roboto Mono is the engine's monospace font

s&box ships Roboto Mono (all weights) — JetBrains Mono and Consolas only resolve on dev machines with those system fonts.

building-ui · ✓ 26.07.08e
Rotation.FromYaw is counter-clockwise

Rotation.FromYaw(+angle) is a LEFT (CCW) turn — get the sign right or steering, AI, and autopilot spiral the wrong way.

writing-gameplay · ✓ 26.07.08e
Rpc.Broadcast on a non-networked GameObject runs locally only -- no warning

An [Rpc.Broadcast] called on a component whose GameObject is not networked executes locally and silently never crosses the wire -- no warning at any log level.

writing-gameplay · ✓ 26.07.08e
Runtime textures for UI panels must be assigned from C#

SCSS background-image only resolves asset paths — runtime Texture objects must be assigned via Panel.Style.BackgroundImage in OnTreeBuilt.

building-ui · ✓ 26.07.08e
Runtime world-building helpers

FlatBox/Prop/Deco/Wire helpers plus Obstacle records as plain data beat physics queries for build validity.

writing-gameplay · ✓ 26.07.08e
RZ1010 error from nested @{ } inside a Razor code block

Nesting @{ } inside an already-open Razor code block (like @if or @for) causes RZ1010 — you're already in C#, so drop the @.

building-ui · ✓ 26.07.08e
s&box component lifecycle in practice

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

writing-gameplay · ✓ 26.07.08e
s&box project folder layout

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

getting-set-up · ✓ 26.07.08e
s&box ships a headless dedicated server that can run an unpublished local project

App 1892930 via SteamCMD runs a headless server with +game pointing at a local .sbproj — clients stream code/assets, no sbox.game publish required.

tooling-environment · ✓ 26.07.08e
s&box units are inches

1 m = 39.37 engine units — design in SI, convert once at the engine boundary, and audit every consumer.

getting-art-in · ✓ 26.07.08e
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.

getting-art-in · ✓ 26.07.08e
Save/load without drift

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

writing-gameplay · ✓ 26.07.08e
Scaffolded project missing global using System in Assembly.cs

A freshly-scaffolded project's Assembly.cs can be missing global using System — transplanted code using Math/MathF fails with CS0103.

building-ui · ✓ 26.07.08e
Scene.GetAllComponents skips disabled components

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

writing-gameplay · ✓ 26.07.08e
Sequence-only rig: land hands on a moved prop by reseating the visual, not IK

When a clip already poses hands in a grip and the prop moves/rescales, offset the rendered visual child instead of using IK or SetBoneTransform -- sequence-only rigs have no AnimGraph.

rigging-animation · ✓ 26.07.08e
Single-tick ground-check flicker machine-guns the landing squash

A trace-based ground controller flickers Ground/Air on seams, re-firing landing VFX mid-run — require minimum air time before a JustLanded counts.

writing-gameplay · ✓ 26.07.08e
SliderControl near-min values render scientific notation in CSS style

The engine SliderControl renders its thumb position as a raw float in a CSS style attribute — near-min values with snap residue produce scientific notation (4.9E-06%), causing a style parse error.

building-ui · ✓ 26.07.15a
Smooth render mesh over quantized collision creates invisible curbs

When a continuous-float render surface sits over a quantized-step collision mesh, every quantize boundary becomes an invisible vertical wall the player hits but cannot see.

writing-gameplay · ✓ 26.07.15a
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.

audio · ✓ 26.07.08e
Spawning a joiner's character clobbers the host's camera target

On the host, spawning a joiner's character clobbers the host's own camera-target singleton because IsProxy is false at Components.Create time — re-resolve the claim at the first OnFixedUpdate.

writing-gameplay · ✓ 26.07.08e
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.

tooling-environment · ✓ 26.07.08e
Standalone Steam export

Preview as of 2026-07: Valve approval + Facepunch license; full .NET, lose platform services; clean PackageReferences or startup hangs.

publishing-shipping · ✓ 26.07.08e
Static registry persists across editor Play restarts — gate on live objects

A C# static list/registry survives editor Play stop/start and code hotloads, holding references to destroyed GameObjects — gate iteration on IsValid(), don't rely on clearing alone.

tooling-environment · ✓ 26.07.08e
Static registry populated by a static constructor doesn't pick up new entries on hotload

s&box carries old static state forward on hotload and never re-runs static constructors — a registry entry added in source is absent at runtime despite green compile.

tooling-environment · ✓ 26.07.08e
Structural Razor edit hotload exception silently deregisters project tools

A structural .razor change can throw a hotload exception that deregisters the project's entire toolset while compile_status still reports Success — restart the editor to recover.

tooling-environment · ✓ 26.07.08e
TextEntry is the house control, not HTML input

Use TextEntry with onsubmit and OnTextEdited — standard Blazor input bindings compile but are not how the engine UI works.

building-ui · ✓ 26.07.08e
TextEntry.OnTextEdited needs an explicit-type block lambda

An untyped or expression-bodied lambda on TextEntry.OnTextEdited fails with CS8917 or CS0029 — use an explicit param type plus a block body.

writing-gameplay · ✓ 26.07.15a
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.

rigging-animation · ✓ 26.07.08e
The FBX export recipe that actually works

Default −Z/Y axes, bake_space_transform, no leaf bones, X/Z bone axes, mesh FBX + per-clip armature FBX; scale via ScaleAndMirror 0.3937.

rigging-animation · ✓ 26.07.08e
The Razor @namespace trap

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

building-ui · ✓ 26.07.08e
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.

writing-gameplay · ✓ 26.07.08e
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.

audio · ✓ 26.07.08e
Three ways Razor text is in the DOM but invisible on screen

s&box Razor panels have three distinct 'text is there but not on screen' failure modes — long-line clipping, narrow-segment overflow, and inline expression resolution — each with a different structural fix.

building-ui · ✓ 26.07.08e
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.

getting-set-up · ✓ 26.07.08e
Too many font-size declarations — or too much text — corrupt UI glyph rendering

Text renders as solid filled rectangles when a panel crosses a glyph-rendering budget — too many font-size/letter-spacing declarations corrupt the whole panel; too many text runs corrupt the last-rendered run. Carry hierarchy via font-weight/color and treat text-run count as a budget.

building-ui · ✓ 26.07.15a
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.

writing-gameplay · ✓ 26.07.08e
Trajectory preview dots bunch at the apex — sample by arc length, not time

Even-time samples of a ballistic arc cluster at the slow apex and spread at the fast ends — sample by arc length for evenly spaced preview dots.

getting-art-in · ✓ 26.07.08e
Understanding the Play Fund

No paid storefront — revenue is clamped player-hours from a daily pool; retention is the monetization feature.

publishing-shipping · ✓ 26.07.08e
Unknown shader field? Check the engine's own templates before grepping projects

Shader field support is unknown and no .shader source exists — check the install's templates/ folder for authoritative syntax instead of grepping sibling projects.

getting-art-in · ✓ 26.07.08e
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.

getting-art-in · ✓ 26.07.08e
Vector3.Right is (0, -1, 0) — not +X

Source engine convention: Forward = +X, Left = +Y, Right = -Y. Using Vector3.Right for '+X' silently slides geometry the wrong way.

getting-art-in · ✓ 26.07.08e
Visible cursor blocks game mouse input — no raw bypass exists

With a visible cursor (MouseVisibility.Visible), mouse buttons that land on a pointer-events panel never reach Input.Down/Pressed — and Input.Keyboard.Down("mouse2") is not a bypass.

writing-gameplay · ✓ 26.07.15a
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.

getting-set-up · ✓ 26.07.08e
Whitespace next to a Razor tag or expression boundary collapses to nothing

Literal spaces adjacent to a tag or @-expression boundary vanish in Razor markup — use a single interpolated string or CSS margin instead.

writing-gameplay · ✓ 26.07.08e
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.

rigging-animation · ✓ 26.07.08e
Windows SSH-launched server process dies when the SSH session closes

A long-running process started over a Windows OpenSSH session is killed the moment the session closes -- use a Scheduled Task instead.

tooling-environment · ✓ 26.07.08e
Windows/PowerShell traps that corrupt s&box source

Get-Content/Set-Content re-encodes BOM-less UTF-8 as ANSI; CRLF files break \n-only search-replace — use byte-safe APIs.

tooling-environment · ✓ 26.07.08e
Wiring Sandbox.Services

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

publishing-shipping · ✓ 26.07.08e
Zero-radius Scene.Trace.Ray slips through coarse voxel ModelColliders

A zero-radius Scene.Trace.Ray passes straight through coarse voxel ModelColliders and returns Hit=false. Sweep a thin sphere (.Radius(...)) and it hits.

writing-gameplay · ✓ 26.07.15a

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