scenario-unity-web
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseUnity Web (web specialist)
Unity Web(Web 专家)
Expert level on the Web means the build is judged where players get it: bytes until gameplay starts, served by the real host with the right headers, loaded in a real browser that reports which graphics API ran, how big the heap grew, and that the page and the game talk. The stance: the host picks the compression, the budget is measured to the first playable moment, and nothing counts until a served build loads headless with zero errors and a screenshot you looked at. Target: Unity 6000.3.21f1, URP 17.3, Chrome headless on macOS. If a sibling skill named here is missing from your available skills, ask the user to install it (); unattended, proceed from tool schemas and flag the gap.
npx skills add scenario-labs/skills --skill <name>REQUIRED BACKGROUND: scenario-unity-expert (channels, review loop, 6.3 traps). Toolkit: , (incl. , ), , plus this skill's , and (bridge, , error reporter, template).
ut_envut_runbuild(P, "web")run_testsut_reviewscripts/ut_web.pyscripts/AgentKit/Web/WebJobs.csscripts/WebRuntime/.jslibWeb 方面的专家级能力意味着,最终评判必须发生在玩家实际获取游戏的真实环境中:统计直到开始游玩前传输的字节数,确认真实托管端返回了正确的 headers,在真实浏览器中加载并报告实际运行的 graphics API、heap 增长情况,以及页面与游戏能否正常通信。原则是:压缩方式由托管端决定;预算按首次可玩时刻衡量;在托管的 build 通过 headless 加载且零错误、并由人查看过截图之前,任何结果都不算数。目标环境:Unity 6000.3.21f1、URP 17.3、macOS 上的 Chrome headless。如果这里提到的某个同级 skill 不在可用 skills 中,请要求用户安装();在无人值守的情况下,根据 tool schemas 继续操作,并标记该缺口。
npx skills add scenario-labs/skills --skill <name>必需背景: scenario-unity-expert(channels、review loop、6.3 陷阱)。工具包:、(包括 、)、,以及本 skill 的 、 和 (bridge、、error reporter、template)。
ut_envut_runbuild(P, "web")run_testsut_reviewscripts/ut_web.pyscripts/AgentKit/Web/WebJobs.csscripts/WebRuntime/.jslibStance (the expert delta)
立场(专家能力的增量)
- The host decides compression. Own HTTPS server or CDN: Brotli, fallback off, per file,
Content-Encodingon everyapplication/wasm(6.3 Manual). Plain HTTP: gzip (Chrome refused Brotli at a LAN address,.wasm*, observed;ERR_CONTENT_DECODING_FAILEDis exempt). itch.io: Decompression Fallback on (Max O'Didily 8iApGVX--B0 [00:01:40]). Poki: Disabled.localhost - Budget bytes to gameplay start. CrazyGames counts the initial download until the first : 20 MB for the mobile homepage, 50 MB otherwise, 1,500 files. Deferred content must be requested after that moment (network log proves it). Preload tags only for bundles the first playable moment needs: they move bytes into the counted window (observed +0.84 MB before start).
gameplayStart - Load time is the metric; past broadband the binary and CPU dominate. -25 percent load time gave +50 percent sessions (Craven, LlE35onVdmQ [00:08:40]); gains flatten above 86 Mbps [00:11:26]. Measure with CPU throttling and latency; hosting coverage is load time (Loveridge, FYsVftoLBP8 [00:16:12]). Design the wait: a loading card with how-to text, not a bare bar (Craven [00:14:16]), then a tap to play that also unlocks audio.
- One thread, one heap, the browser's clock. Every ThreadPool API is an unrecoverable hang: use , coroutines,
Awaitable(observed:UnityWebRequestfroze the tab). The heap grows from Initial Memory Size and growth can crash on phones: size Initial from a measured session (observed 32 MB grew to 68 to 74 MB; set to 80, no growth). LeaveTask.Run(...).Resultat -1: Unity cannot query the refresh rate (6.3 Manual).targetFrameRate - WebGL 2 ships; WebGPU is for compute and falls back silently. Experimental in 6.3 to 6.5, supported but opt-in from 6.6. Keep WebGL 2 below it and log (a plain-HTTP page got WebGL 2 with no error, observed). WebGL 2 skins on the CPU (30 characters: 7 fps vs 30 on WebGPU, Duncan 3bu4WZUCGYc [~00:15:13]) and takes non-directional lightmaps only.
SystemInfo.graphicsDeviceType - The page and the game share a narrow contract. in ES5, strings as heap pointers, replies through
.jslibinto a staticmakeDynCall,[MonoPInvokeCallback]with one JSON string to an exactly named object. Unity takes page-wide keyboard input by default: a page name field received nothing untilSendMessage(observed). No system fonts: CJK and Greek names drew blank whileWebGLInput.captureAllKeyboardInput = falsesaid present (observed). Portals ignore or rewriteFont.HasCharacter, so the bridge lives inindex.html..jslib - What ships is not what you set. Strip Engine Code removes classes only bundles use (, observed; fix: link.xml). Code Optimization and the texture subtarget live in
Could not produce class with ID 182: a fresh clone reads Shorter Build Time (observed). Safari has no IndexedDB in iframes (6.3 Manual): on itch.io, Safari players may reload everything.Library/ - Ship like a live service and cut what does not earn its bytes. Hashed names, previous build kept, 5 percent staged rollout (Loveridge [frame 00:23:29]), symbols and an error collector per release. "If it only improves your game's visual fidelity by one or two percent... it needs to go" [00:11:15]: URP post data cost 1.61 MB here.
- 托管端决定压缩方式。 对于自有 HTTPS server 或 CDN:Brotli、关闭 fallback、逐文件设置 ,并为每个
Content-Encoding设置.wasm*(6.3 Manual)。普通 HTTP:gzip(实测 Chrome 曾拒绝 LAN 地址上的 Brotli,出现application/wasm;ERR_CONTENT_DECODING_FAILED除外)。itch.io:开启 Decompression Fallback(Max O'Didily 8iApGVX--B0 [00:01:40])。Poki:禁用。localhost - 按字节数规划首次可玩时刻的预算。 CrazyGames 会把首次 之前的初始下载计入限制:移动端首页为 20 MB,其他页面为 50 MB,最多 1,500 个文件。延迟内容必须在该时刻之后请求(由 network log 证明)。仅对首次可玩时刻所需的 bundles 使用 Preload 标签:它们会把字节移入受统计的时间窗口(实测在开始前增加 0.84 MB)。
gameplayStart - 加载时间才是关键指标;进入宽带区间后,二进制体积和 CPU 才是主导因素。 加载时间降低 25% 带来会话数增加 50%(Craven,LlE35onVdmQ [00:08:40]);当带宽超过 86 Mbps 后,收益趋于平缓([00:11:26])。在 CPU throttling 和 latency 条件下进行测量;托管覆盖面的实际表现取决于加载时间(Loveridge,FYsVftoLBP8 [00:16:12])。设计等待体验:使用带操作说明的 loading card,而不是只有一条进度条(Craven [00:14:16]),然后通过 tap to play 进入游戏,同时解锁音频。
- 单线程、单 heap,使用浏览器的时钟。 每个 ThreadPool API 都可能导致无法恢复的卡死:应使用 、coroutine 和
Awaitable(实测UnityWebRequest冻结了标签页)。heap 会从 Initial Memory Size 开始增长,并可能在手机上崩溃:根据实测 session 设置 Initial(实测从 32 MB 增长到 68~74 MB;设为 80 MB 后不再增长)。将Task.Run(...).Result保持为 -1:Unity 无法查询刷新率(6.3 Manual)。targetFrameRate - WebGL 2 才是当前发布目标;WebGPU 面向 compute,并且会静默回退。 WebGPU 在 6.3~6.5 中为实验性功能,从 6.6 起受支持但需要主动启用。保持 WebGL 2 作为其下层回退,并记录 (实测普通 HTTP 页面运行 WebGL 2 且没有错误)。WebGL 2 在 CPU 上执行 skinning(30 个角色:WebGL 2 为 7 fps,WebGPU 为 30 fps,Duncan 3bu4WZUCGYc [~00:15:13]),并且只支持 non-directional lightmaps。
SystemInfo.graphicsDeviceType - 页面与游戏共享一个窄接口契约。 必须使用 ES5,将字符串作为 heap pointer,通过
.jslib调用静态makeDynCall,并使用[MonoPInvokeCallback]将一个 JSON 字符串发送给名称完全匹配的对象。Unity 默认捕获整个页面的键盘输入:某个页面 name field 一直收不到输入,直到设置SendMessage(实测)。不能使用系统字体:CJK 和希腊文名称显示为空白,而WebGLInput.captureAllKeyboardInput = false仍返回存在(实测)。Portal 会忽略或重写Font.HasCharacter,因此 bridge 应放在index.html中。.jslib - 实际发布的内容并不等于你在设置中看到的内容。 Strip Engine Code 可能移除仅由 bundles 使用的类(实测出现 ;修复方式:link.xml)。Code Optimization 和 texture subtarget 位于
Could not produce class with ID 182中:全新 clone 会读取 Shorter Build Time(实测)。Safari 的 iframe 中没有 IndexedDB(6.3 Manual):因此在 itch.io 上,Safari 玩家可能需要重新加载全部内容。Library/ - 像发布线上服务一样交付,并删掉不值得占用字节的内容。 使用 hashed names,保留 previous build,执行 5% staged rollout(Loveridge [frame 00:23:29]),并为每次发布保留 symbols 和 error collector。“如果它只能将游戏的视觉保真度提升百分之一或二……那它就应该被移除” [00:11:15]:这里的 URP post data 占用 1.61 MB。
Establish first
首先确认
Ask once: every host or portal (compression, fallback, page ownership, iframe); audience and browser floor (WebAssembly 2023 needs Safari 16.4+, Chrome 91+, Firefox 89+, while Unity supports iOS Safari 15; CrazyGames disables Unity on iOS by default); budget in bytes to gameplay start and seconds at a stated line speed and region; 2D or 3D, URP, lightmaps, skinned crowds; compute need (WebGPU); the page API and any page text fields; scripts player text can use (fonts); desktop and mobile (dual DXT/ASTC data); audio (first tap); Unity version. Defaults: WebGL 2 only; own HTTPS + Brotli; 20 MB portal mobile, 30 MB otherwise (Loveridge [00:03:29]); Explicitly Thrown; WebAssembly 2023 on; Disk Size while iterating, Disk Size with LTO for release; Maximum Memory 2048 MB, Initial from measurement; DPR 1 on phones; -1.
targetFrameRate一次性询问:所有 host 或 portal(compression、fallback、page ownership、iframe);受众与 browser floor(WebAssembly 2023 需要 Safari 16.4+、Chrome 91+、Firefox 89+,而 Unity 支持 iOS Safari 15;CrazyGames 默认在 iOS 上禁用 Unity);在指定线路速度和区域下,直到首次可玩时刻的字节预算与秒数;2D 或 3D、URP、lightmaps、skinned crowds;是否需要 compute(WebGPU);页面 API 及任何页面 text fields;玩家文本可使用的 scripts(fonts);desktop 和 mobile(双 DXT/ASTC 数据);音频(首次 tap);Unity version。默认值:仅使用 WebGL 2;自有 HTTPS + Brotli;portal mobile 为 20 MB,其他场景为 30 MB(Loveridge [00:03:29]);Explicitly Thrown;开启 WebAssembly 2023;迭代时使用 Disk Size,发布时使用 Disk Size with LTO;Maximum Memory 为 2048 MB,Initial 根据测量结果设置;手机端 DPR 为 1; 为 -1。
targetFrameRateWorkflow
工作流
- Preflight and audit. ,
ReadSettings(scenes, lighting, skinning, stripping, splash, post data, imports),AuditWeb(hangs,ut_web.scan_hang_apis),targetFrameRate,scan_jslib. GATE: zero audit errors; non-empty valid scene list (Cam Ayres bF_eUuxGEcA [00:04:02]); every costly package justified.package_report - Settings per host. with a preset (
WebJobs.ApplySettings,own-https,plain-http,itch,poki,crazygames), always passingdevandcode_optimization; launch withtexture_subtarget.build_target="WebGL"pluswrite_policy(EditMode) guard CI. GATE: readback and 8 policy tests pass.WebReleasePolicyTests - Interop. ; wire
ut_web.install_runtime(P),WebBridge,WebLeaderboard(full code in procedures P3). GATE: 0 compile errors, scans clean, bridge object named as the page calls it.WebErrorReporter - Build. . Bundles:
ut_run.build(P, "web", out=...)first. GATE: Succeeded, file set matches settings,WriteBundleLinkXmlrecorded,size_reportread (rank there, judge by bytes on disk).build_log_report - Serve and audit headers. ,
servelocally, then on the real host. GATE: zero errors; bytes sent equal bytes on disk.header_audit - Load in Chrome. with the page mock. GATE:
browser_check(..., metrics_seconds=8, reload=True),ready, feature events; zero banners, zero unexpected console errors; intendedgameplay_start; deferred requests after start; heap did not grow on mobile settings; fps steady; warm reload fetches noready.apibody (304 allowed); screenshot opened..data - Budget and load time. ; throttled load (20 Mbps, 40 ms, CPU x4) and a 250 ms run for far regions. GATE: pass with headroom.
budget_check - Variants. itch (fallback, zip, iframe host), portal SDK, WebGPU on secure and insecure origins, dual DXT/ASTC (), phone emulation (DPR cap). GATE per variant as in 5 to 7.
merge_texture_variants - Release. Disk Size with LTO, symbols archived, or
AGENTWEB_ERROR_URLset, previous build kept, rollout plan (P12). Handoff packet with Verified and Assumed.WebErrorReporter.endpoint
- 预检与审计。 执行 、
ReadSettings(scenes、lighting、skinning、stripping、splash、post data、imports)、AuditWeb(hangs、ut_web.scan_hang_apis)、targetFrameRate、scan_jslib。门槛:审计零错误;scene list 非空且有效(Cam Ayres bF_eUuxGEcA [00:04:02]);每个成本高昂的 package 都有明确理由。package_report - 按 host 设置。 使用 preset 调用 (
WebJobs.ApplySettings、own-https、plain-http、itch、poki、crazygames),始终传入dev和code_optimization;启动时使用texture_subtarget。通过build_target="WebGL"和write_policy(EditMode)保护 CI。门槛:readback 和 8 项 policy tests 通过。WebReleasePolicyTests - 互操作。 执行 ;连接
ut_web.install_runtime(P)、WebBridge、WebLeaderboard(完整代码见 procedures P3)。门槛:0 个编译错误,扫描结果干净,bridge object 的名称与页面调用名称一致。WebErrorReporter - 构建。 执行 。Bundles:先执行
ut_run.build(P, "web", out=...)。门槛:状态为 Succeeded,文件集与 settings 一致,记录WriteBundleLinkXml,并读取size_report(在其中排序,以磁盘上的字节数为准)。build_log_report - 托管并审计 headers。 先在本地执行 、
serve,然后在真实 host 上执行。门槛:零错误;发送的字节数等于磁盘上的字节数。header_audit - 在 Chrome 中加载。 使用页面 mock 执行 。门槛:出现
browser_check(..., metrics_seconds=8, reload=True)、ready和 feature events;零 banner、零意外 console error;使用预期的gameplay_start;延迟请求发生在开始之后;mobile settings 下 heap 没有增长;fps 稳定;warm reload 不再获取ready.apibody(允许 304);已打开 screenshot。.data - 预算与加载时间。 执行 ;进行 throttled load(20 Mbps、40 ms、CPU x4),并针对远端区域执行 250 ms run。门槛:测试通过且留有余量。
budget_check - 变体。 测试 itch(fallback、zip、iframe host)、portal SDK、安全和不安全 origin 上的 WebGPU、双 DXT/ASTC()、手机模拟(DPR cap)。每个变体均按步骤 5~7 中的门槛验收。
merge_texture_variants - 发布。 使用 Disk Size with LTO,归档 symbols,设置 或
AGENTWEB_ERROR_URL,保留 previous build,并制定 rollout plan(P12)。交付包中应包含 Verified 和 Assumed 清单。WebErrorReporter.endpoint
Numbers
数值
| 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] |
More measured values: (Numbers, full).
references/expert-notes.md| 数值 | 相对于 | 来源 |
|---|---|---|
| 20 / 50 MB、1,500 个文件 | CrazyGames 从首次下载到 | CrazyGames |
| 30 MB | 工作室 binary 体积规则(“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;在 20 Mbps、40 ms、CPU x4 下到达 | 实测 |
| +0.83 s | 相同 load 在 250 ms latency 而非 40 ms latency 下的耗时 | 实测 |
| -1.61 MB | 关闭 URP renderer post data(从 10.08 MB 降至 8.47 MB) | 实测 |
| 32 增至 68~74 MB | 启动期间使用默认 Initial Memory Size 导致的 heap 增长;设为 80 MB 后不再增长 | 实测 |
| 2048 MB | Maximum Memory Size;在 Chrome/Firefox 119 之前,超过此值会出现 bug | 6.3 Manual |
| 7 增至 30 fps | 30 个 skinned characters,WebGL(CPU skinning)与 WebGPU 的对比 | Duncan [~00:15:13] |
| 48 / 86 Mbps | 收益趋于平缓时的移动端 / 宽带中位速度 | Craven [00:10:53] |
更多实测值:(Numbers、完整内容)。
references/expert-notes.mdQuality gates
质量门槛
- Measurable: readback and policy tests pass; audit and scans clean; Succeeded;
BuildReport0 errors on the real host;header_auditok with the intended API; deferred after start; heap flat; errors reach the collector;browser_checkpass; throttled load under budget.budget_check - Visual: canvas screenshot opened: scene rendered, UI legible at 900x500, DPR 1 and a 390 px portrait canvas, a line of every script players can type, loading card and banners readable.
- 可测量: readback 和 policy tests 通过;审计与扫描结果干净;状态为 Succeeded;真实 host 上的
BuildReport为 0 错误;header_audit返回 ok 且使用预期 API;延迟请求发生在开始之后;heap 保持稳定;错误能够到达 collector;browser_check通过;throttled load 未超出预算。budget_check - 视觉: 已打开 canvas screenshot:场景正常渲染;UI 在 900x500 下清晰可读;DPR 1 和 390 px 纵向 canvas 表现正常;每种玩家可输入文字的 script 都展示一行;loading card 和 banners 清晰可读。
Common mistakes
常见错误
| 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 |
| 错误 | 表现 | 修复方式 |
|---|---|---|
| 为压缩 build 快速启动本地 server | | 使用 |
| 在普通 HTTP 上使用 Brotli | | 使用 HTTPS,或使用 gzip + Allow downloads over HTTP |
| 工作永不执行; | 使用 |
为“mobile”设置 | Unity 按假设的 60 Hz 为自己的循环计时 | 保持 -1;仅在有意时进行 throttle |
| Initial Memory 较小且在手机上增长 | 启动期间 heap 从 32 MB 增至 74 MB;无法获取连续内存块时崩溃 | Initial = measured peak( |
| 高强度 stripping + bundles | | |
| 在 CI 中信任 release settings | 全新 clone 会读取 Shorter Build Time 和默认 texture format | 在每个 job 中同时设置两者,或提交 Build Profile |
| canvas 旁存在页面 field | 按键输入被吞掉 | |
| 玩家名称使用任意 script,并使用内置字体 | 字形为空白; | 提供 fallback fonts,或在 HTML 中绘制名称;为每种 script 截图验证 |
| 相信 Graphics API 列表或版本传闻 | WebGPU build 实际运行 WebGL 2;误认为“WebGPU 在 6.3 已达到 production-ready” | 按 origin 记录 API;6.3~6.5 为实验性,6.6 起需主动启用 |
| 构建失败 | 使用 ES5,注释中不要使用 macros( |
在 portal 的 | CrazyGames 中缺失,Poki 中被重写 | 使用 |
| 发布 template defaults | Shorter Build Time、Minimal stripping、WebAssembly 2023 off,原始 wasm 达 46 MB | 使用 release preset |
Handoffs
交接
- Receives from scenario-unity-architecture: code free of hang APIs (scan findings go back); scenario-unity-pipeline-automation: Addressables layout, CI, Build Profiles (this skill supplies the policy tests, LZ4, deferred loading, link.xml); scenario-unity-mobile: ASTC vs DXT, touch, safe areas; scenario-unity-ui: canvas legible at 900x500, DPR 1 and portrait, fallback fonts for player text; scenario-unity-rendering-lighting: a Web URP tier (1 to 2 cascades, lean or no post, non-directional lightmaps or real-time); scenario-unity-shaders and scenario-unity-vfx: WebGPU-safe compute and a WebGL 2 fallback; scenario-unity-performance: frame and memory budgets.
- Delivers to scenario-unity-expert and the user: build folders per host, header table or server config, ,
size_report,budget_checkevidence (API, events, bytes before start, heap, fps, screenshots), policy file, zip, symbols, Verified and Assumed lists.browser_check
- 接收自 scenario-unity-architecture:不包含 hang APIs 的代码(scan findings 需要回传);scenario-unity-pipeline-automation:Addressables layout、CI、Build Profiles(本 skill 提供 policy tests、LZ4、deferred loading、link.xml);scenario-unity-mobile:ASTC 与 DXT、touch、safe areas;scenario-unity-ui:在 900x500 下清晰可读的 canvas、DPR 1 和纵向布局、玩家文本的 fallback fonts;scenario-unity-rendering-lighting:Web URP tier(1~2 cascades、精简或关闭 post、non-directional lightmaps 或 real-time);scenario-unity-shaders 和 scenario-unity-vfx:WebGPU-safe compute 和 WebGL 2 fallback;scenario-unity-performance:frame 和 memory budgets。
- 交付给 scenario-unity-expert 和用户:按 host 划分的 build folders、header table 或 server config、、
size_report、budget_check证据(API、events、开始前的字节数、heap、fps、screenshots)、policy file、zip、symbols,以及 Verified 和 Assumed 清单。browser_check
Unity 6.3 notes
Unity 6.3 注意事项
- Menus say "Web", code keeps ,
BuildTarget.WebGL,PlayerSettings.WebGL,UNITY_WEBGL; no public API creates a Build Profile before 6.5.Assets/WebGLTemplateslives inWebGLInput, present only in Web player builds: guard it withUnityEngine.WebGLModule.UNITY_WEBGL && !UNITY_EDITOR - URP template ships Brotli, Shorter Build Time, WebAssembly 2023 off, Minimal stripping (observed); WebAssembly 2023 becomes the default in 6.5 (Emscripten 4.0.19; 6.3 reports ).
3.1.39-git - WebGPU: experimental and URP-only in 6.3; PSO tracing and Microphone arrive in 6.4; supported, opt-in, Device Filter and compatibility mode in 6.6.
- The Build Profile's texture compression overrides Player Settings (per-texture overrides beat both) and, like Code Optimization, is stored outside ProjectSettings.
- (heap, fps, janked frames) works in release builds without the Diagnostics Overlay (whose JS memory reads N/A on Safari and iOS); 6.3 profiles a running Web build over IP; the Frame Debugger does not work on the Web.
unityInstance.GetMetricsInfo()
- 菜单中显示为“Web”,代码仍使用 、
BuildTarget.WebGL、PlayerSettings.WebGL、UNITY_WEBGL;在 6.5 之前没有公共 API 可以创建 Build Profile。Assets/WebGLTemplates位于WebGLInput,仅存在于 Web player builds 中:应使用UnityEngine.WebGLModule进行保护。UNITY_WEBGL && !UNITY_EDITOR - URP template 默认附带 Brotli、Shorter Build Time、WebAssembly 2023 off、Minimal stripping(实测);WebAssembly 2023 从 6.5 开始成为默认选项(Emscripten 4.0.19;6.3 报告为 )。
3.1.39-git - WebGPU 在 6.3 中为实验性功能且仅支持 URP;PSO tracing 和 Microphone 在 6.4 中加入;从 6.6 起受支持,并提供主动启用、Device Filter 和 compatibility mode。
- Build Profile 的 texture compression 会覆盖 Player Settings(逐纹理 override 的优先级高于二者);它与 Code Optimization 一样,存储在 ProjectSettings 之外。
- (heap、fps、janked frames)无需 Diagnostics Overlay 即可在 release builds 中使用(Diagnostics Overlay 的 JS memory reads 在 Safari 和 iOS 上为 N/A);6.3 支持通过 IP 分析正在运行的 Web build;Frame Debugger 无法在 Web 上工作。
unityInstance.GetMetricsInfo()
References
参考资料
- : 24 procedures with full code (bridge included), live test and recorded result.
references/procedures.md - : judgment by expert with timestamps, full numbers, disagreement table.
references/expert-notes.md - : the self-review rubric.
references/critique.md - : the same work through windows and menus.
references/gui-paths.md - : every source, credentials, timestamps, revision history.
references/sources.md - ,
scripts/ut_web.py,scripts/AgentKit/Web/WebJobs.cs(Addressables job, EditMode policy tests),scripts/AgentKitOptional/(bridge, error reporter,scripts/WebRuntime/, AgentWeb template)..jslib
- :24 个 procedures 的完整代码(包括 bridge)、live test 和记录结果。
references/procedures.md - :带时间戳的专家判断、完整数值和分歧表。
references/expert-notes.md - :self-review rubric。
references/critique.md - :通过 Windows 和菜单执行相同工作的说明。
references/gui-paths.md - :全部来源、凭据、时间戳和修订历史。
references/sources.md - 、
scripts/ut_web.py、scripts/AgentKit/Web/WebJobs.cs(Addressables job、EditMode policy tests)、scripts/AgentKitOptional/(bridge、error reporter、scripts/WebRuntime/、AgentWeb template)。.jslib