Social: Friends, Presence & Party
UCrimsonOnlineFriendsService
Wraps IOnlineFriends. Reads and refreshes the platform friend list; queries presence; sends and responds to friend requests.
| Function | Description |
|---|
| ReadFriendsList(LocalPlayerIndex, ListName, Delegate) | Refreshes the cached friend list from the platform |
| GetFriendsList(LocalPlayerIndex, ListName) | Returns TArray<FCrimsonFriendInfo> from the cache |
| GetFriend(LocalPlayerIndex, FriendId, ListName) | Returns FCrimsonFriendInfo for a specific friend |
| IsFriend(LocalPlayerIndex, UniqueId, ListName) | Returns bool |
| SendInvite(LocalPlayerIndex, FriendId, ListName, Delegate) | Sends a friend request |
| AcceptInvite(LocalPlayerIndex, FriendId, ListName, Delegate) | Accepts an incoming friend request |
| RejectInvite(LocalPlayerIndex, FriendId, ListName, Delegate) | Rejects an incoming friend request |
| DeleteFriend(LocalPlayerIndex, FriendId, ListName, Delegate) | Removes a friend |
| QueryRecentPlayers(LocalPlayerIndex, Namespace, Delegate) | Queries the platform recent-players list |
| OnFriendsChange | Delegate broadcast when the friend list changes |
| OnInviteReceived | Delegate: LocalPlayerIndex + SenderId |
FCrimsonFriendInfo
| Field | Type | Description |
|---|
| UniqueId | TSharedPtr<const FUniqueNetId> | Platform ID |
| DisplayName | FString | Localised display name |
| Presence | ECrimsonFriendPresence | Online / Playing / Away / Offline |
| RichPresenceText | FString | Current game / lobby status string |
| bIsPlayingThisGame | bool | Same game title |
UCrimsonOnlinePresenceService
Wraps IOnlinePresence. Sets and queries rich presence strings for local and remote players.
| Function | Description |
|---|
| SetPresence(LocalPlayerIndex, PresenceData, Delegate) | Publishes a presence string to the platform |
| QueryPresence(LocalPlayerIndex, UserId, Delegate) | Fetches presence for a remote player |
| GetCachedPresence(LocalPlayerIndex, UserId) | Returns the last-fetched presence string; empty if not cached |
| OnPresenceReceived | Delegate: LocalPlayerIndex + UserId |
UCrimsonOnlinePartyService
Wraps IOnlineParty. Manages party creation, membership, leader transfer, and kick.
| Function | Description |
|---|
| CreateParty(LocalPlayerIndex, PartyConfig, Delegate) | Creates a new party for the local player |
| JoinParty(LocalPlayerIndex, PartyId, Delegate) | Joins an existing party by ID |
| LeaveParty(LocalPlayerIndex, PartyId, Delegate) | Leaves the current party |
| KickMember(LocalPlayerIndex, PartyId, MemberId, Delegate) | Removes a member (leader only) |
| TransferLeadership(LocalPlayerIndex, PartyId, NewLeaderId, Delegate) | Transfers party leader role |
| InviteToParty(LocalPlayerIndex, PartyId, RecipientId, Delegate) | Sends a party invite |
| GetPartyMembers(LocalPlayerIndex, PartyId) | Returns TArray<FCrimsonPartyMemberInfo> |
| GetPartyLeader(LocalPlayerIndex, PartyId) | Returns FCrimsonPartyMemberInfo for the current leader |
| OnPartyMemberJoined | Delegate: PartyId + MemberId |
| OnPartyMemberLeft | Delegate: PartyId + MemberId + Reason |
| OnPartyInviteReceived | Delegate: LocalPlayerIndex + SenderId + PartyId |
| OnPartyLeaderChanged | Delegate: PartyId + NewLeaderId |