the symptom, in your words
"It worked in the editor but broke after publishing"
✓ verified on engine 26.07lane: Publishing & shippingposted
▸ SYMPTOM
The game runs clean in the editor. After you publish to sbox.game, players hit missing assets (error.vmdl), silent API failures, or behavior that never showed up locally. dotnet build was green.
▸ CAUSE
Three common post-publish traps:
- Whitelist divergence — published packages run under an API access list. Code that compiles in-editor can still fail whitelist checks for players, especially across engine updates.
- Loose resource files — non-compiled assets (PNG, WAV, MP3, JSON…) are not auto-published unless listed under Project Settings → Other → Resource Files (paths must not be prefixed with
assets/). - Cloud assets under load — streamed cloud assets can fail silently; the engine may rewrite prefab refs to
error.vmdlwith no auto-retry.
▸ FIX
- After every publish and every s&box engine update, join the published package as a player, not only in-editor, before announcing.
- Register every loose resource in Resource Files with root-relative paths (no
assets/prefix). - Minimize cloud-asset dependence; after publish, verify each critical cloud asset loads. If placeholders appear: editor restart + republish.
- Never disable the whitelist casually — it blocks platform publish and is a one-way door toward standalone-only.
▸ WHY IT WORKS
Editor play and published play are different sandboxes. The editor is permissive about APIs and local files; the published package is what players actually get. Treating "green compile" as "shipped" skips the only environment that matters.
✓
Verified on engine 26.07 — seen in a real project.
s&box moves fast; an undated fix is a liability. Spot a stale detail?