Skip to content

Startup and connection

Startup and connection is the prerequisite flow for all features. Each engine integrates it differently, but the goal is the same: let the game obtain appId, connect to the local IGP desktop client, and enter the multiplayer lobby flow when needed.

This layer mainly handles:

  • Reading or configuring appId
  • Running SDK initialization explicitly from the game startup flow
  • Connecting to the local IGP desktop client
  • Checking connection state
  • Querying capabilities currently exposed by the desktop client
  • Handling parameters injected when the IGP desktop client launches the game
  • Establishing the room multiplayer connection for rooms, realtime messaging, state, and RPC
EngineStatusNotes
UnityPreviewIGPRuntimeManager handles desktop client connection, launch parameters, and room multiplayer connection.
GameMakerPreviewThe Windows runtime handles initialization, per-frame updates, capability queries, and the event queue.
GodotIn developmentUses command-line bootstrap and exposes room multiplayer capabilities through autoload.
  • IGP desktop client is installed locally.
  • The game has an appId assigned by IGP.
  • The game calls the IGP SDK initialization method from its startup flow.
  • For rooms, realtime messaging, state, or RPC, the game must be launched by the IGP desktop client through the local testing flow.
  • Achievements, game authorization, and real-name verification and anti-addiction also require an available IGP desktop client connection.

Initialization is controlled by the game project’s own startup flow. Placing SDK components in the scene does not start the SDK by itself.

In Unity, call IGPRuntimeManager.InitializeAsync() to initialize the SDK.

In GameMaker, call igp_init(...) to initialize the runtime.

In Unity, place one IGPRuntimeManager in the scene, configure appId, and call InitializeAsync() from your startup flow.

using UnityEngine;
using IGP.UnitySDK;
public sealed class IGPStartupDriver : MonoBehaviour
{
[SerializeField] private IGPRuntimeManager runtimeManager;
private void OnEnable()
{
if (runtimeManager == null)
{
return;
}
runtimeManager.onConnectionStateChanged.AddListener(OnConnectionChanged);
runtimeManager.onRoomJoined.AddListener(room =>
{
Debug.Log($"IGP room joined: {room.id}");
});
runtimeManager.onError.AddListener(error =>
{
Debug.LogError($"IGP runtime error: {error}");
});
}
private async void Start()
{
await runtimeManager.InitializeAsync();
}
private void OnDisable()
{
if (runtimeManager == null)
{
return;
}
runtimeManager.onConnectionStateChanged.RemoveListener(OnConnectionChanged);
}
private void OnConnectionChanged(bool connected)
{
Debug.Log($"IGP connected={connected}");
}
}

To debug the complete room flow in Unity Editor, read Unity debugging.

EngineMinimum self-test
UnityComplete Unity Quick Start and either see desktop capability results for non-room flows or room joined and ready logs for room flows.
GameMakerComplete GameMaker Quick Start and confirm the connection state no longer stays at disconnected.
GodotUse the preview project to verify BootstrapFromCommandLineAsync() succeeds and a room snapshot is received.

For a more complete checklist, see Testing.

  • No appId: add the platform-assigned appId first.
  • No connection or events from the SDK: confirm whether the game calls IGPRuntimeManager.InitializeAsync() or the equivalent initialization entry for the engine.
  • Not launched from the desktop client: rooms, realtime messaging, state, and RPC usually cannot be fully available.
  • Connection state keeps failing: confirm the local IGP desktop client is installed and can start.
  • Unity disconnects after a scene switch: ensure there is exactly one IGPRuntimeManager throughout the flow, and make it persistent across scenes when needed.