Skip to content

Rooms

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.

EngineStatusNotes
UnityPreviewComplete main room flow is available.
GameMakerNot supportedThe first GameMaker release does not include room capabilities.
GodotIn developmentThe preview runtime already has room lifecycle calls.
  • 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.
using UnityEngine;
using IGP.Multiplayer;
public sealed class IGPRoomDriver : MonoBehaviour
{
[SerializeField] private IGPMultiplayerRuntime runtimeManager;
private void OnEnable()
{
runtimeManager.RoomChanged += OnRoomChanged;
runtimeManager.ConnectionChanged += OnRealtimeConnectionChanged;
}
private void OnDisable()
{
runtimeManager.RoomChanged -= OnRoomChanged;
runtimeManager.ConnectionChanged -= OnRealtimeConnectionChanged;
}
private void OnRoomChanged(IGPRoomChangedEvent change)
{
Debug.Log($"Room {change.Kind}, flags={change.Changes}, id={change.Room?.id}");
}
private async void OnRealtimeConnectionChanged(IGPMultiplayerConnectionChangedEvent change)
{
if (change.IsReady && runtimeManager.CurrentRoomData.hostId == runtimeManager.PlayerId)
{
await runtimeManager.SetSceneGateAsync("arena-ready");
}
}
public async void StartGame()
{
await runtimeManager.StartHostedGameAsync();
}
public async void FinishGame()
{
await runtimeManager.FinishHostedGameAsync();
}
public async void LeaveRoom()
{
await runtimeManager.LeaveHostedRoomAsync();
}
}

SceneGate is KCP state owned by the current RoomNode runtime room, not a hosted room-snapshot field. Every client can read CurrentSceneGate and listen for RoomChanged with the SceneGate flag; the host calls SetSceneGateAsync after realtime connects. Late-joining or reconnecting clients call GetSceneGateAsync after realtime is ready, and the Owner’s targeted response updates the cached value asynchronously. The value naturally disappears when the RoomNode runtime room is destroyed.

EngineCheckpoint
UnityAfter realtime connects, the host calls SetSceneGateAsync("arena-ready"); every client receives the updated value through KCP.
GameMakerRoom validation is not performed currently.
GodotRoomSnapshotReceived is received and SetReadyAsync(true) succeeds.
  • 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 IGPRuntimeManager was created.
  • Unity SceneGate does not update: confirm the caller is the current host and realtime/KCP is connected.
  • Godot does not receive room snapshots: confirm bootstrap is complete and the room multiplayer connection is established.