Rooms
Feature description
Section titled “Feature description”Rooms are the base capability for Multiplayer lobby. Realtime messaging, state and RPC, and Mirror transport all depend on the room flow.
Room support covers entering a room, ready, start, finish, rematch, leave, and player join / leave events. The room flow usually requires the IGP desktop client to launch the game through the local testing or formal launch flow.
Supported engines
Section titled “Supported engines”| Engine | Status | Notes |
|---|---|---|
| Unity | Preview | Complete main room flow is available. |
| GameMaker | Not supported | The first GameMaker release does not include room capabilities. |
| Godot | In development | The preview runtime already has room lifecycle calls. |
Prerequisites
Section titled “Prerequisites”- Startup and connection is complete.
- The game is launched by the IGP desktop client and receives multiplayer launch information.
- Unity scene keeps exactly one
IGPRuntimeManager. - Godot project has registered
IGPGodotAutoload.
By engine
Section titled “By engine”using UnityEngine;using IGP.UnitySDK;using IGP.UnitySDK.Models;
public sealed class IGPRoomDriver : MonoBehaviour{ [SerializeField] private IGPRuntimeManager runtimeManager;
private void OnEnable() { runtimeManager.onRoomJoined.AddListener(OnRoomJoined); runtimeManager.onRoomUpdated.AddListener(OnRoomUpdated); runtimeManager.onRoomLeft.AddListener(OnRoomLeft); }
private void OnDisable() { runtimeManager.onRoomJoined.RemoveListener(OnRoomJoined); runtimeManager.onRoomUpdated.RemoveListener(OnRoomUpdated); runtimeManager.onRoomLeft.RemoveListener(OnRoomLeft); }
private async void OnRoomJoined(Room room) { Debug.Log($"Joined room {room.id}"); await runtimeManager.SetReadyAsync(true); }
public async void StartGame() { await runtimeManager.StartHostedGameAsync(); }
public async void FinishGame() { await runtimeManager.FinishHostedGameAsync(); }
public async void LeaveRoom() { await runtimeManager.LeaveHostedRoomAsync(); }
private void OnRoomUpdated(Room room) {} private void OnRoomLeft(Room room) {}}GameMaker currently does not support room capabilities.
Godot currently should call room capabilities through autoload.
using Godot;using IGP.GodotSDK.Autoload;
public partial class RoomPanel : Control{ private IGPGodotAutoload IGP => GetNode<IGPGodotAutoload>("/root/IGP");
public override void _Ready() { IGP.RoomSnapshotReceived += OnRoomSnapshotReceived; IGP.RoomEventReceived += OnRoomEventReceived; }
public async void Ready() { await IGP.SetReadyAsync(true); }
public async void StartGame() { await IGP.StartHostedGameAsync(); }
public async void FinishGame() { await IGP.FinishHostedGameAsync(); }
private void OnRoomSnapshotReceived(string connectionStatus) {} private void OnRoomEventReceived(int eventType, string roomId) {}}Godot is still in development. The current example is primarily for evaluation and integration alignment.
Self-test
Section titled “Self-test”| Engine | Checkpoint |
|---|---|
| Unity | onRoomJoined is received and SetReadyAsync(true) succeeds. |
| GameMaker | Room validation is not performed currently. |
| Godot | RoomSnapshotReceived is received and SetReadyAsync(true) succeeds. |
Troubleshooting
Section titled “Troubleshooting”- Cannot enter a room: first confirm the game is launched by the IGP desktop client.
- Unity room disconnects after a scene switch: check whether a second
IGPRuntimeManagerwas created. - ready does not take effect: call ready only after the room has been joined.
- Godot does not receive room snapshots: confirm bootstrap is complete and the room multiplayer connection is established.