Skip to main content

Documentation Index

Fetch the complete documentation index at: https://www.cometchat.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Before diving into individual features, it helps to understand the three building blocks of the plugin: the Subsystem, Latent Async Nodes, and Real-Time Delegates.

The Subsystem

UCometChatSubsystem is a UGameInstanceSubsystem — Unreal creates one instance automatically when your game starts, and it lives for the entire session. You never need to spawn or manage it yourself.
Get a reference from any Blueprint:Get Game InstanceGet Subsystem → select CometChatSubsystem
The Subsystem handles:
  • Configuration — storing your App ID and Region
  • SDK lifecycle — creating and shutting down the underlying C++ SDK
  • Auth state — tracking whether a user is logged in
  • Real-time events — exposing multicast delegates for push notifications

Latent Async Nodes

Every SDK operation that talks to the network (Login, Send Message, Get Messages, etc.) is exposed as a latent async action — a Blueprint node with two output execution pins:
PinWhen it fires
On SuccessThe operation completed successfully. Output data is available on the success pin.
On FailureSomething went wrong. An FString error message describes what happened.

How an Async Node Executes

In C++, these are UCometChatAsyncAction subclasses. You create them with a static factory method, bind delegates, and call Activate():
auto* Action = UCometChatLoginAction::LoginAsync(this, TEXT("user-123"), TEXT("auth-key"));
Action->OnSuccess.AddDynamic(this, &AMyActor::HandleLoginSuccess);
Action->OnFailure.AddDynamic(this, &AMyActor::HandleLoginFailure);
Action->Activate();
All async callbacks fire on the Game Thread, so it’s safe to update UI, spawn actors, or call other engine APIs directly from the callback.

Available Async Nodes

CategoryNodeSuccess Output
AuthLogin Async
AuthLogout Async
MessagingSend Message AsyncFCometChatMessage
MessagingSend Group Message AsyncFCometChatMessage
MessagingGet Messages AsyncTArray<FCometChatMessage>
MessagingGet Group Messages AsyncTArray<FCometChatMessage> + FCometChatPagination
UsersGet User AsyncFCometChatUser
GroupsCreate Group AsyncFCometChatGroup
GroupsJoin Group Async
GroupsLeave Group Async

Real-Time Delegates

The Subsystem exposes five multicast delegates for real-time push events. Bind to them once after calling Configure, and they’ll fire whenever the server pushes an update.
DelegatePayload TypeFires When
OnMessageReceivedFCometChatMessageA new message arrives in any conversation
OnPresenceChangedFCometChatPresenceA user goes online, offline, or away
OnTypingChangedFCometChatTypingEventA user starts or stops typing
OnReceiptReceivedFCometChatReceiptEventA message is delivered or read
OnConnectionStateChangedECometChatConnectionStateWebSocket connects, disconnects, or reconnects
Drag off the Subsystem reference and search for the delegate name (e.g., On Message Received). Use Bind Event to wire it to a custom event.
Bind your delegates before calling Login. Events that arrive between Login and binding will be missed.

Data Types

The plugin uses Unreal-native USTRUCT types — no std::string or STL containers leak into your game code.

FCometChatUser

PropertyTypeDescription
UidFStringUnique user identifier
NameFStringDisplay name
AvatarUrlFStringURL to the user’s avatar image
StatusFStringCurrent status text

FCometChatMessage

PropertyTypeDescription
IdFStringUnique message identifier
SenderUidFStringUID of the sender
ReceiverUidFStringUID of the receiver (user or group)
TextFStringMessage body
SentAtint64Unix timestamp (seconds) when sent
TypeFStringMessage type: text, image, file, custom
CategoryFStringCategory: message, action, call, custom
ReceiverTypeFStringuser or group
ConversationIdFStringConversation identifier
SenderNameFStringSender’s display name
SenderAvatarFStringSender’s avatar URL
UpdatedAtint64Unix timestamp of last update

FCometChatGroup

PropertyTypeDescription
GuidFStringUnique group identifier
NameFStringGroup display name
DescriptionFStringGroup description
MemberIdsTArray<FString>UIDs of group members

FCometChatPagination

PropertyTypeDescription
Totalint32Total messages available
Countint32Messages returned in this page
PerPageint32Page size requested
CurrentPageint32Current page number
TotalPagesint32Total pages available
HasMoreboolWhether more pages exist
NextCursorint32Message ID to pass as BeforeMessageId for the next page

FCometChatPresence

PropertyTypeDescription
UidFStringUser identifier
StatusECometChatPresenceStatusOnline, Offline, or Away
LastActiveAtint64Unix timestamp of last activity

FCometChatTypingEvent

PropertyTypeDescription
UidFStringUser who is typing
ConversationIdFStringConversation where typing is happening
bIsTypingbooltrue if started typing, false if stopped

FCometChatReceiptEvent

PropertyTypeDescription
MessageIdFStringThe message this receipt is for
UidFStringUser who triggered the receipt
StatusFStringdelivered or read
Timestampint64Unix timestamp of the receipt

Enums

ECometChatConnectionState
ValueDescription
ConnectedWebSocket is connected and active
DisconnectedWebSocket is disconnected
ReconnectingSDK is attempting to reconnect
ECometChatPresenceStatus
ValueDescription
OnlineUser is currently online
OfflineUser is offline
AwayUser is away