Loading...
Loading...
Use when a Unity 6.3 game must run in a browser: 'export to WebGL', Web build settings or Build Profiles, gzip or Brotli, Decompression Fallback, server headers, 'Unable to parse .framework.js.br', build too big or slow to load, itch.io, CrazyGames or Poki limits, Addressables or AssetBundles on the Web, 'Could not produce class with ID', Task.Run freezing the browser, WebGL 2 vs WebGPU, .jslib and SendMessage interop, a page text field that gets no keystrokes, mobile browsers crashing, HTTPS for sensors, hosting and rollout.
npx skill4agent add scenario-labs/skills scenario-unity-webnpx skills add scenario-labs/skills --skill <name>ut_envut_runbuild(P, "web")run_testsut_reviewscripts/ut_web.pyscripts/AgentKit/Web/WebJobs.csscripts/WebRuntime/.jslibContent-Encodingapplication/wasm.wasm*ERR_CONTENT_DECODING_FAILEDlocalhostgameplayStartAwaitableUnityWebRequestTask.Run(...).ResulttargetFrameRateSystemInfo.graphicsDeviceType.jslibmakeDynCall[MonoPInvokeCallback]SendMessageWebGLInput.captureAllKeyboardInput = falseFont.HasCharacterindex.html.jslibCould not produce class with ID 182Library/targetFrameRateReadSettingsAuditWebut_web.scan_hang_apistargetFrameRatescan_jslibpackage_reportWebJobs.ApplySettingsown-httpsplain-httpitchpokicrazygamesdevcode_optimizationtexture_subtargetbuild_target="WebGL"write_policyWebReleasePolicyTestsut_web.install_runtime(P)WebBridgeWebLeaderboardWebErrorReporterut_run.build(P, "web", out=...)WriteBundleLinkXmlsize_reportbuild_log_reportserveheader_auditbrowser_check(..., metrics_seconds=8, reload=True)readygameplay_startready.api.databudget_checkmerge_texture_variantsAGENTWEB_ERROR_URLWebErrorReporter.endpoint| Value | Relative to | Source |
|---|---|---|
| 20 / 50 MB, 1,500 files | CrazyGames initial download to first | CrazyGames |
| 30 MB | studio binary rule ("table stakes") | Loveridge [00:03:29] |
| +3.6 / +1 / +0.7 MB | URP, URP post-processing, TextMeshPro resources | CrazyGames tests |
| 9.47 MB, 8.1 s | release demo build (LTO): initial download; time to | observed |
| +0.83 s | same load at 250 ms instead of 40 ms latency | observed |
| -1.61 MB | URP renderer post data off (10.08 to 8.47 MB) | observed |
| 32 to 68-74 MB | heap growth from the default Initial Memory Size during startup; 80 MB set: no growth | observed |
| 2048 MB | Maximum Memory Size; bugs above it before Chrome/Firefox 119 | 6.3 Manual |
| 7 to 30 fps | 30 skinned characters, WebGL (CPU skinning) vs WebGPU | Duncan [~00:15:13] |
| 48 / 86 Mbps | median mobile / broadband speed where gains flatten | Craven [00:10:53] |
references/expert-notes.mdBuildReportheader_auditbrowser_checkbudget_check| Mistake | What it looks like | Fix |
|---|---|---|
| Quick local server for a compressed build | | |
| Brotli on plain HTTP | | HTTPS, or gzip + Allow downloads over HTTP |
| work never runs; | |
| Unity times its own loop against an assumed 60 Hz | leave -1; throttle only on purpose |
| Small Initial Memory with growth on phones | heap 32 to 74 MB at startup; crashes when no contiguous block | Initial = measured peak ( |
| High stripping + bundles | | |
| Release settings trusted on CI | a fresh clone reads Shorter Build Time and the default texture format | set both in every job, or commit a Build Profile |
| Page field beside the canvas | keystrokes swallowed | |
| Player names in any script, built-in font | blank glyphs; | ship fallback fonts or draw names in HTML; screenshot each script |
| Trusting the Graphics API list or version lore | WebGPU build running WebGL 2; "WebGPU is production-ready in 6.3" | log the API per origin; 6.3 to 6.5 experimental, 6.6 opt-in |
| build fails | ES5, no macros in comments ( |
Page logic in | missing on CrazyGames, rewritten on Poki | |
| Template defaults shipped | Shorter Build Time, Minimal stripping, WASM 2023 off: 46 MB raw wasm | release preset |
size_reportbudget_checkbrowser_checkBuildTarget.WebGLPlayerSettings.WebGLUNITY_WEBGLAssets/WebGLTemplatesWebGLInputUnityEngine.WebGLModuleUNITY_WEBGL && !UNITY_EDITOR3.1.39-gitunityInstance.GetMetricsInfo()references/procedures.mdreferences/expert-notes.mdreferences/critique.mdreferences/gui-paths.mdreferences/sources.mdscripts/ut_web.pyscripts/AgentKit/Web/WebJobs.csscripts/AgentKitOptional/scripts/WebRuntime/.jslib