Skip to content

fix(webgl): the browser menu before the game data — no ghost images, singleplayer waits for the data, compressed download (#2185 #2186 #2187) - #2196

Merged
marceld23 merged 1 commit into
mainfrom
fix/webgl-menu-before-content
Oct 2, 2026
Merged

marceld23 merged 1 commit into
mainfrom
fix/webgl-menu-before-content

Conversation

@marceld23

Copy link
Copy Markdown
Owner

Closes #2185
Closes #2186
Closes #2187

What happened

On the first visit after the v2026.10.2 update (/play), the auto-opened "What's new?" stayed on screen after it was closed. Menu, loading screen and the "New world?" dialog were drawn on top of each other, the background was black and the logo smeared. "New world" → "Delete and start over" did nothing for a long time, then ended in "The world could not be started in this browser". A reload made it work.

One root cause. The browser menu is up before the game data has downloaded and parsed. The data cache is stamped with the version, so every release re-downloads it: 56 files, ~20 MB of JSON, served uncompressed (measured live; settlement_templates.json 6.8 MB → 194 KB gzipped). During that window:

Changes

  • ShellClearCamera (new): created in AppShell.Awake; solid black, culling mask 0, depth -100. It enables itself in LateUpdate only while no other enabled camera renders to the screen; cameras with a target texture (preview rigs) do not count. The backdrop, the intro, the editors and the world rig take over as before.
  • AppShell.BootBrowserSingleplayer: waits behind the loading screen until ContentReady. It stops if the phase changes, and returns to the menu (content-error overlay with Retry) if the download fails.
  • UiLoading: while the browser data is still loading, the title reads "Loading game data… n/56" and the bar follows the download. New StreamingAssetsCache.RemoteFileTotal.
  • Locale key ui.loading.data: all 14 languages, translated by hand.
  • deploy/worldhost/docker-compose.yml: caddy.encode: zstd gzip. Caddy's default type list skips the Unity build files: they are Brotli-packed *.unityweb and go out as application/octet-stream (checked live).
  • Docs: docs/developer/WEBCLIENT_FEASIBILITY.md §"The menu before the game data"; TODO.md entry.

Verification

Rollout

🤖 Generated with Claude Code

…singleplayer waits for the data, compressed download (#2185 #2186 #2187)

On the first visit after an update the browser menu is usable long before the
game data (56 files, ~20 MB of JSON, re-downloaded every release) is in.

- ShellClearCamera: the launcher scene has no camera and the backdrop's camera
  needs the content, so nothing cleared the screen and every shell canvas left
  ghost images. A culling-mask-0 black clear now runs while no other camera
  draws to the screen (#2185).
- BootBrowserSingleplayer waits behind the loading screen until ContentReady
  instead of starting the in-process server without content ("could not be
  started in this browser"); the loading screen shows the data download
  (ui.loading.data, all 14 languages) (#2186).
- deploy/worldhost: caddy.encode zstd gzip — the JSON shrinks ~10-35x on the
  wire; the Unity build files (octet-stream) are not matched (#2187).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@marceld23 marceld23 added bug Something isn't working infrastructure Build, CI, licensing & server infrastructure area: client Unity client / Client.Core labels Oct 2, 2026
@marceld23 marceld23 self-assigned this Oct 2, 2026
@marceld23
marceld23 merged commit 791cbbf into main Oct 2, 2026
20 checks passed
@marceld23
marceld23 deleted the fix/webgl-menu-before-content branch October 2, 2026 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: client Unity client / Client.Core bug Something isn't working infrastructure Build, CI, licensing & server infrastructure

Projects

None yet

1 participant