t1k:unity:web:convert
| Field | Value |
|---|---|
| Module | web |
| Version | 2.32.3 |
| Effort | high |
| Tools | — |
Keywords: adapter, browser-interop, convert, migrate, mobile-to-web, port, web, webgl
How to invoke
Section titled “How to invoke”/t1k:unity:web:convertConvert Unity Mobile Code to Web
Section titled “Convert Unity Mobile Code to Web”Preserve shared gameplay code and isolate platform differences. Do not create a wholesale copy of the mobile codebase.
Agent routing
Section titled “Agent routing”Route implementation through game-developer/mono-implementer (t1k-unity-base-developer) — the
bare generic implementer role now resolves here too, by default (P30, agent-split program):
t1k-routing-unity.json’s bare implementer key points at t1k-unity-base-developer. Name
t1k-unity-dots-core-implementer explicitly if DOTS-package ECS work is genuinely in scope; the
generic role no longer routes there on its own.
Inputs
Section titled “Inputs”- Latest
/t1k:unity:web:auditreport or permission to run a fresh audit. - Source platform:
android,ios, ormobile. - Target:
desktop,mobile, orboth. - Mode:
--dry-runby default;--applyonly after approval.
Workflow
Section titled “Workflow”- Establish a clean git checkpoint and run/consume the Web audit.
- Build a migration manifest grouped by subsystem.
- Classify every affected feature:
preserved: shared implementation already works.adapted: platform interface plus Web/mobile implementations.stubbed: safe no-op with visible product limitation.disabled: deliberate product decision with compile/runtime guard.unresolved: vendor or product decision is still required.
- Design the smallest adapter seams. Prefer dependency injection over platform checks scattered through gameplay code.
- Present the plan and require explicit confirmation before project writes.
- Apply one subsystem at a time, preserving existing mobile behavior.
- Compile affected assemblies, run tests, create a representative Web build, and re-run the audit.
- Report the before/after finding delta and remaining parity exceptions.
Required adapter review
Section titled “Required adapter review”- Input: pointer, keyboard, touch, focus, resize, orientation.
- Persistence: browser storage semantics, sync, quota, reload failure.
- Lifecycle: pause/focus/quit and tab visibility.
- Networking: Fetch/CORS/WebSocket-compatible transports.
- Native services: ads, IAP, authentication, analytics, notifications, privacy.
- Async: managed threads, timers, synchronous waits.
- Browser bridge:
.jslibonly when a browser API or JavaScript SDK requires it.
Read references/platform-adapter-patterns.md before creating interfaces or browser bridges.
Safety gates
Section titled “Safety gates”- Never apply changes from an audit-only request.
- Never silently delete an unsupported feature.
- Never declare a vendor package supported without vendor documentation or a successful Web build.
- Never weaken the existing Android/iOS implementation to make Web compile.
- Stop at
unresolvedwhen the replacement changes product behavior, legal consent, revenue, or backend contracts.
Required output
Section titled “Required output”- Migration manifest and platform-adapter map.
- Files changed per subsystem.
- Feature parity exceptions.
- Compile, test, Web build, and browser smoke results.
- Audit delta by stable finding ID.
- Recommended next command:
/t1k:unity:web:optimizeonly after a representative build works.