scenario-unity-web
БесплатноЗапускает вложенные скриптыНе проверен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…
от scenario-labs★ 4 422 звезды на GitHubОб этом скилле
Unity Web (web specialist)
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,
load it with skill_get (Scenario MCP) or ask the user to install it
(https://github.com/scenario-labs/skills#install); unattended, proceed from tool schemas and flag
the gap.
REQUIRED BACKGROUND: scenario-unity-expert (channels, review loop, 6.3 traps). Toolkit:
ut_env, ut_run (incl. build(P, "web"), run_tests), ut_review, plus this skill's
scripts/ut_web.py,
scripts/AgentKit/Web/WebJobs.cs and
scripts/WebRuntime/ (bridge, .jslib, error reporter, template).
Stance (the expert delta)
- The host decides compression. Own HTTPS server or CDN: Brotli, fallback off,
Content-Encodingper file,application/wasmon every.wasm*(6.3 Manual). Plain HTTP: gzip (Chrome refused Brotli at a LAN address,ERR_CONTENT_DECODING_FAILED, observed;localhostis exempt). itch.io: Decompression Fallback on (Max O'Didily 8iApGVX--B0 [00:01:40]). Poki: Disabled. - Budget bytes to gameplay start. CrazyGames counts the initial download until the first
gameplayStart: 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). - 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
Awaitable, coroutines,UnityWebRequest(observed:Task.Run(...).Resultfroze 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). LeavetargetFrameRateat -1: Unity cannot query the refresh rate (6.3 Manual). - 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
SystemInfo.graphicsDeviceType(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. - The page and the game share a narrow contract.
.jslibin ES5, strings as heap pointers, replies throughmakeDynCallinto a static[MonoPInvokeCallback],SendMessagewith one JSON string to an exactly named object. Unity takes page-wide keyboard input by default: a page name field received nothing untilWebGLInput.captureAllKeyboardInput = false(observed). No system fonts: CJK and Greek names drew blank whileFont.HasCharactersaid present (observed). Portals ignore or rewriteindex.html, so the bridge lives in.jslib. - What ships is not what you set. Strip Engine Code removes classes only bundles use
(
Could not produce class with ID 182, observed; fix: link.xml). Code Optimization and the texture subtarget live inLibrary/: 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. - 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.
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 crowd
Установить scenario-unity-web в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл scenario-unity-web?
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.
Как установить скилл scenario-unity-web?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл scenario-unity-web запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic