This repository is a curated skill collection for AI coding agents. It provides decision-tree guidance, integration references, and production-ready code templates for building real-time multiplayer Unity games targeting mobile (iOS/Android) and WebGL2 browsers.
- SKILL.md — Entry point. Contains the decision trees, quick-start patterns, and index. Always start here.
- references/ — Deep-dive guides. Load only the file relevant to the current question, never all at once.
- assets/ — Production-ready code templates (TypeScript server + C# Unity client).
- scripts/ — Project scaffolding helpers.
- skill.json — Machine-readable registry metadata for programmatic discovery.
- Start from the decision trees in SKILL.md to guide framework/architecture choices.
- Load the specific reference file only when the user needs deeper detail.
- Suggest asset templates when the user is ready to scaffold or implement.
- Always respect WebGL2 hard constraints (no raw sockets, no threads, WSS-only in production).
| Question | Load this |
|---|---|
| Colyseus vs Nakama? | SKILL.md decision tree, then references/colyseus-integration.md or references/nakama-integration.md |
| WebSocket library? | SKILL.md comparison table, then references/websocket-networking.md |
| Architecture pattern? | SKILL.md genre table, then references/architecture-patterns.md |
| WebGL limitations? | references/webgl2-constraints.md |
| Performance? | references/performance-optimization.md |
| Deployment? | references/deployment-guides.md |
- Unity managers use singleton pattern with
DontDestroyOnLoad - All templates include exponential backoff reconnection with jitter
- Cross-platform code uses
#if UNITY_WEBGL && !UNITY_EDITORconditional compilation - Server templates are TypeScript; client templates are C#
- Event-driven architecture (C# events/callbacks) for extensibility
- Load all reference files at once — they total 18,000+ lines
- Recommend WebSocketSharp — it uses
System.Net.Socketsand fails on WebGL - Suggest raw TCP/UDP for WebGL builds — only WebSocket works
- Skip SSL/TLS considerations — WebGL requires
wss://in production