Scenario Unity Webのロゴ

Scenario Unity Web

組織
scenario-labs
scenario-unity-web

Unity 6.3のゲームをブラウザーで動かす必要があるときに使います。「WebGLにエクスポートする」、Webビルド設定やBuild Profiles、gzipまたはBrotli、Decompression Fallback、サーバーヘッダー、「Unable to parse .framework.js.br」、ビルドサイズが大きい、または読み込みが遅い問題、itch.io・CrazyGames・Pokiの制限、WebでのAddressablesやAssetBundles、「Could not produce class with ID」、Task.Runによるブラウザーのフリーズ、WebGL 2とWebGPUの比較、.jslibとSendMessageによる連携、ページ上のテキスト入力欄でキー入力を受け付けない問題、モバイルブラウザーのクラッシュ、センサー用HTTPS、ホスティングとロールアウトなどに対応します。

Add to TypingMind

概要

公開者scenario-labs
リポジトリskills
スキル名scenario-unity-web
スター
970
フォーク
114
同梱ファイル
17
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 17個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    scenario-labsがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Scenario Unity Web」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/scenario-labs/skills/tree/main/skills/game-engines/unity/scenario-unity-web
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/scenario-labs/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/game-engines/unity/scenario-unity-web .claude/skills/scenario-unity-web
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでScenario Unity Webを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にScenario Unity Webを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Scenario Unity Webは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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, ask the user to install it (npx skills add scenario-labs/skills --skill <name>); 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)

  1. The host decides compression. Own HTTPS server or CDN: Brotli, fallback off, Content-Encoding per file, application/wasm on every .wasm* (6.3 Manual). Plain HTTP: gzip (Chrome refused Brotli at a LAN address, ERR_CONTENT_DECODING_FAILED, observed; localhost is exempt). itch.io: Decompression Fallback on (Max O'Didily 8iApGVX--B0 [00:01:40]). Poki: Disabled.
  2. 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).
  3. 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.
  4. One thread, one heap, the browser's clock. Every ThreadPool API is an unrecoverable hang: use Awaitable, coroutines, UnityWebRequest (observed: Task.Run(...).Result froze 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). Leave targetFrameRate at -1: Unity cannot query the refresh rate (6.3 Manual).
  5. 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.
  6. The page and the game share a narrow contract. .jslib in ES5, strings as heap pointers, replies through makeDynCall into a static [MonoPInvokeCallback], SendMessage with one JSON string to an exactly named object. Unity takes page-wide keyboard input by default: a page name field received nothing until WebGLInput.captureAllKeyboardInput = false (observed). No system fonts: CJK and Greek names drew blank while Font.HasCharacter said present (observed). Portals ignore or rewrite index.html, so the bridge lives in .jslib.
  7. 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 in Library/: 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.
  8. 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 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; targetFrameRate -1.

Workflow

  1. Preflight and audit. ReadSettings, AuditWeb (scenes, lighting, skinning, stripping, splash, post data, imports), ut_web.scan_hang_apis (hangs, targetFrameRate), scan_jslib, package_report. GATE: zero audit errors; non-empty valid scene list (Cam Ayres bF_eUuxGEcA [00:04:02]); every costly package justified.
  2. Settings per host. WebJobs.ApplySettings with a preset (own-https, plain-http, itch, poki, crazygames, dev), always passing code_optimization and texture_subtarget; launch with build_target="WebGL". write_policy plus WebReleasePolicyTests (EditMode) guard CI. GATE: readback and 8 policy tests pass.
  3. Interop. ut_web.install_runtime(P); wire WebBridge, WebLeaderboard, WebErrorReporter (full code in procedures P3). GATE: 0 compile errors, scans clean, bridge object named as the page calls it.
  4. Build. ut_run.build(P, "web", out=...). Bundles: WriteBundleLinkXml first. GATE: Succeeded, file set matches settings, size_report recorded, build_log_report read (rank there, judge by bytes on disk).
  5. Serve and audit headers. serve, header_audit locally, then on the real host. GATE: zero errors; bytes sent equal bytes on disk.
  6. Load in Chrome. browser_check(..., metrics_seconds=8, reload=True) with the page mock. GATE: ready, gameplay_start, feature events; zero banners, zero unexpected console errors; intended ready.api; deferred requests after start; heap did not grow on mobile settings; fps steady; warm reload fetches no .data body (304 allowed); screenshot opened.
  7. Budget and load time. budget_check; throttled load (20 Mbps, 40 ms, CPU x4) and a 250 ms run for far regions. GATE: pass with headroom.
  8. Variants. itch (fallback, zip, iframe host), portal SDK, WebGPU on secure and insecure origins, dual DXT/ASTC (merge_texture_variants), phone emulation (DPR cap). GATE per variant as in 5 to 7.
  9. Release. Disk Size with LTO, symbols archived, AGENTWEB_ERROR_URL or WebErrorReporter.endpoint set, previous build kept, rollout plan (P12). Handoff packet with Verified and Assumed.

Numbers

ValueRelative toSource
20 / 50 MB, 1,500 filesCrazyGames initial download to first gameplayStart (mobile homepage / general)CrazyGames
30 MBstudio binary rule ("table stakes")Loveridge [00:03:29]
+3.6 / +1 / +0.7 MBURP, URP post-processing, TextMeshPro resourcesCrazyGames tests
9.47 MB, 8.1 srelease demo build (LTO): initial download; time to gameplay_start at 20 Mbps, 40 ms, CPU x4observed
+0.83 ssame load at 250 ms instead of 40 ms latencyobserved
-1.61 MBURP renderer post data off (10.08 to 8.47 MB)observed
32 to 68-74 MBheap growth from the default Initial Memory Size during startup; 80 MB set: no growthobserved
2048 MBMaximum Memory Size; bugs above it before Chrome/Firefox 1196.3 Manual
7 to 30 fps30 skinned characters, WebGL (CPU skinning) vs WebGPUDuncan [~00:15:13]
48 / 86 Mbpsmedian mobile / broadband speed where gains flattenCraven [00:10:53]

More measured values: references/expert-notes.md (Numbers, full).

Quality gates

  • Measurable: readback and policy tests pass; audit and scans clean; BuildReport Succeeded; header_audit 0 errors on the real host; browser_check ok with the intended API; deferred after start; heap flat; errors reach the collector; budget_check pass; throttled load under budget.
  • 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.

Common mistakes

MistakeWhat it looks likeFix
Quick local server for a compressed buildSyntaxError, "Unable to parse ...framework.js.br"ut_web.serve or per-suffix Content-Encoding
Brotli on plain HTTPERR_CONTENT_DECODING_FAILEDHTTPS, or gzip + Allow downloads over HTTP
Task.Run, HttpClient, threads, timerswork never runs; .Result freezes the tabAwaitable, coroutines, UnityWebRequest
targetFrameRate = 30 "for mobile"Unity times its own loop against an assumed 60 Hzleave -1; throttle only on purpose
Small Initial Memory with growth on phonesheap 32 to 74 MB at startup; crashes when no contiguous blockInitial = measured peak (heap_advice)
High stripping + bundlesCould not produce class with ID, component missingWriteBundleLinkXml, rebuild
Release settings trusted on CIa fresh clone reads Shorter Build Time and the default texture formatset both in every job, or commit a Build Profile
Page field beside the canvaskeystrokes swallowedWebGLInput.captureAllKeyboardInput = false (SetKeyboardCapture)
Player names in any script, built-in fontblank glyphs; Font.HasCharacter still trueship fallback fonts or draw names in HTML; screenshot each script
Trusting the Graphics API list or version loreWebGPU 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
{{{ }}} or ES6 in a .jslibbuild failsES5, no macros in comments (scan_jslib)
Page logic in index.html for a portalmissing on CrazyGames, rewritten on Poki.jslib or the portal SDK
Template defaults shippedShorter Build Time, Minimal stripping, WASM 2023 off: 46 MB raw wasmrelease 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_check, browser_check evidence (API, events, bytes before start, heap, fps, screenshots), policy file, zip, symbols, Verified and Assumed lists.

Unity 6.3 notes

  • Menus say "Web", code keeps BuildTarget.WebGL, PlayerSettings.WebGL, UNITY_WEBGL, Assets/WebGLTemplates; no public API creates a Build Profile before 6.5. WebGLInput lives in UnityEngine.WebGLModule, present only in Web player builds: guard it with 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.
  • unityInstance.GetMetricsInfo() (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.

References

  • references/procedures.md: 24 procedures with full code (bridge included), live test and recorded result.
  • references/expert-notes.md: judgment by expert with timestamps, full numbers, disagreement table.
  • references/critique.md: the self-review rubric.
  • references/gui-paths.md: the same work through windows and menus.
  • references/sources.md: every source, credentials, timestamps, revision history.
  • scripts/ut_web.py, scripts/AgentKit/Web/WebJobs.cs, scripts/AgentKitOptional/ (Addressables job, EditMode policy tests), scripts/WebRuntime/ (bridge, error reporter, .jslib, AgentWeb template).

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Scenario Unity Web」では何ができますか?

Unity 6.3のゲームをブラウザーで動かす必要があるときに使います。「WebGLにエクスポートする」、Webビルド設定やBuild Profiles、gzipまたはBrotli、Decompression Fallback、サーバーヘッダー、「Unable to parse .framework.js.br」、ビルドサイズが大きい、または読み込みが遅い問題、itch.io・CrazyGames・Pokiの制限、WebでのAddressablesやAssetBundles、「Could not produce class with ID」、Task.Runによるブラウザーのフリーズ、WebGL 2とWebGPUの比較、.jslibとSendMessageによる連携、ページ上のテキスト入力欄でキー入力を受け付けない問題、モバイルブラウザーのクラッシュ、センサー用HTTPS、ホスティングとロールアウトなどに対応します。

TypingMindでScenario Unity Webを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Scenario Unity Webはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにScenario Unity Webをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/scenario-labs/skills/tree/main/skills/game-engines/unity/scenario-unity-webを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Scenario Unity Webを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Scenario Unity Webで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもScenario Unity Webを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Scenario Unity Web」は無料ですか?

はい。scenario-labsがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る
nexu-ioのロゴ

Html Ppt Zhangzara Block Frame

nexu-io
組織人気

まとまりのないスタートアップのデッキを、取締役会に通用する体系へと立て直します。課題の診断、ページ構成のルール、再構築した根拠提示ページを紹介します。創業者や経営幹部のプレゼンターが意思決定に活用できる、デザイン制作のためのデッキとして制作されています。

11.2K
96.7K
2ファイル
表示
nexu-ioのロゴ

Html Ppt Zhangzara Cartesian

nexu-io
組織人気

地域の最低賃金引き上げが雇用に与える影響を分析する、経済学専攻の卒業論文です。識別戦略、根拠、限界を取り上げます。論文審査委員会が意思決定に活用できる、授業課題の発表デッキとして制作…

11.2K
96.7K
2ファイル
表示
addyosmaniのロゴ

Constraint Driven Development

addyosmani
コミュニティ人気

プロジェクトの品質基準を明文化して合意事項とし、AIエージェントが気づかれないように基準を引き下げるのを防ぎます。重視する品質項目をユーザーに確認し、数値の希望がない場合は妥当なデフォルトのしきい値を提示して、すべてを…

10.1K
95.8K
1ファイル
表示
addyosmaniのロゴ

Spec Driven Development

addyosmani
コミュニティ人気

コーディングの前に仕様を作成します。新しいプロジェクトや機能、大規模な変更を始める際に仕様がないときや、目的と範囲を定めたPRDを作成するときに使います。

10.1K
95.8K
指示
表示

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇