3D desktop/web/mobile client for Turn-Based UNO Demo built with Unity and the Colyseus Unity SDK.
- Open this folder as a Unity project (Unity Hub → Add → select the
unity/folder). Requires Unity 2022.3 LTS or newer. - Unity resolves the Colyseus SDK package automatically from
Packages/manifest.json. - Open
Assets/Scenes/Main.unityand press Play.
Make sure the game server is running on port 2567.
SceneBootstrap.cs wires up NetworkManager, GameManager, HUDManager, and LobbyManager at runtime, so the scene only needs a camera.
Configured in NetworkManager.cs — override the URL there or set it on the prefab when wiring the scene manually.
- Click — Play a card (opens color picker for wilds)
- Hover — Preview playable cards
- New Game button — Starts a new round after a winner is declared
# From the unity/ directory
BUILD_OUTPUT_PATH=../BUILDS/unity unity -batchmode -quit -projectPath . -executeMethod BuildScript.BuildWebGLunity/
├── Assets/
│ ├── Scripts/
│ │ ├── SceneBootstrap.cs # Auto-creates all managers at runtime
│ │ ├── NetworkManager.cs # Colyseus client wrapper (singleton)
│ │ ├── GameManager.cs # Game controller, 3D rendering, input
│ │ ├── LobbyManager.cs # Lobby UI (IMGUI)
│ │ ├── HUDManager.cs # In-game HUD overlay (IMGUI)
│ │ ├── CardEntity.cs # Double-sided card with spring physics
│ │ └── Schema/ # UnoRoomState, PlayerSchema, UnoCardSchema
│ ├── Scenes/Main.unity
│ ├── Resources/Cards/ # Card PNG textures
│ └── Editor/BuildScript.cs # WebGL build automation
└── Packages/manifest.json
Card textures load from Assets/Resources/Cards/ at runtime:
- Color cards:
{color}_{value}.png(e.g.,red_5.png,blue_skip.png) - Wild cards:
wild.png,wild_draw4.png - Card back:
back.png
