"Loose resource files don't auto-publish"
▸ SYMPTOM
- Works in editor; after publish, textures/sounds/JSON configs missing.
- Often cited as the #1 "worked in editor, broken after publish" cause.
▸ CAUSE
Non-compiled assets do not auto-publish. PNG, WAV, MP3, JSON, and similar loose files must be explicitly listed in Project Settings → Other → Resource Files.
Paths must not be prefixed with assets/: use root-relative paths the resource system expects.
Compiled types (.vmdl, .vmat, .sound → *_c, etc.) follow the normal asset compile/publish path; loose files are the footgun.
▸ FIX
- Open Project Settings → Other → Resource Files.
- Add every loose file the game loads at runtime, e.g.:
materials/foo/bar.png
sounds/impact/boing_a.mp3
data/waves.jsonWrong: assets/materials/foo/bar.png
- Republish; join as a player and confirm loads.
- Keep the list in sync when generators add new PNGs/MP3s/JSON: treat Resource Files as part of the asset pipeline checklist.
Related publish traps: cloud-assets-fail-under-load, dotnet-build-vs-whitelist.
▸ WHY IT WORKS
The publisher packs what the project declares. Editor play can see anything on disk under Assets/; the published package only includes compiled assets plus the explicit Resource Files allowlist: omit the list and players get holes.