Skip to content

Realtime messaging

Realtime messaging is a sub-capability of Multiplayer lobby for sending custom data between players inside a room. Unity provides reliable channels and large-message fragmentation; Godot currently provides a JSON message entry point. Realtime messaging requires a room connection first and cannot be used before joining a room.

EngineStatusNotes
UnityPreviewSupports room messages, reliable transport, and large-message fragmentation.
GameMakerNot supportedThe first GameMaker release does not include realtime messaging.
GodotIn developmentThe preview runtime already supports sending and receiving JSON messages.
  • The minimal Rooms flow is complete.
  • A room has been joined.
  • Message types must not use SDK-reserved types.
  • Message content should keep a stable structure so both ends can parse it.
using System;
using UnityEngine;
using IGP.UnitySDK;
using IGP.UnitySDK.Models;
public sealed class IGPChatDriver : MonoBehaviour
{
[SerializeField] private IGPRuntimeManager runtimeManager;
private void OnEnable()
{
runtimeManager.onMessageReceived.AddListener(OnMessageReceived);
}
private void OnDisable()
{
runtimeManager.onMessageReceived.RemoveListener(OnMessageReceived);
}
public async void SendChat()
{
await runtimeManager.SendMessageAsync(new Message
{
type = "chat.message",
roomId = runtimeManager.CurrentRoomId,
playerId = runtimeManager.PlayerId,
reliable = true,
content = new
{
text = "hello",
sentAt = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(),
},
});
}
private void OnMessageReceived(string messageType, object content)
{
Debug.Log($"Message {messageType}: {content}");
}
}
EngineCheckpoint
UnityTwo clients are in the same room; after one sends a message, the other receives onMessageReceived.
GameMakerRealtime messaging validation is not performed currently.
GodotAfter sending a JSON message, the other endpoint receives the MessageReceived signal.
  • Send succeeds but no message is received: confirm both clients are in the same room.
  • Content parsing fails: validate with the simplest JSON string first.
  • Unity large message send fails: prefer the reliable message entry point.
  • Godot reports a reserved type error: use a business-defined message type name.