Friends and Invites

All of this is exposed through UPulseOnlineSocialSubsystem (module PulseOnlineSocial), one instance per ULocalPlayer. Its requests run in the local player’s queue (UPulseOnlineLocalPlayerSubsystem). The player must be logged in online (see Users and Login).

Friends

  • QueryFriends() starts a UPulseOnlineQueryFriendsRequest and returns it. It reads the friends list with presence through the friends service of the backend, writes it into the friends cache and broadcasts OnFriendsQueryComplete. Cached UPulseOnlineFriendInfo objects are updated in place; Relationship tells friends, sent and received friend requests and blocked players apart.
  • GetCachedFriends(), HasCachedFriends(), FindCachedFriend(NetId): sync, no network call.

Blueprint: Friends list and invite

  1. Widget Construct → Get Local Player Subsystem (Pulse Online Social Subsystem) → Query Friends → Execute Online Request.
  2. Success → Get Cached Friends → For Each Loop → create one entry widget per friend (Display Name, Is Online, Is Playing This Game).
  3. Entry “Invite” button → Send Session Invite (Friend Net Id = Net Id of the friend). Invites into the party while in one.

Sending invites

SendSessionInvite(FriendNetId) starts a UPulseOnlineSendInviteRequest and returns it: into the party while the player is in one, otherwise into the game session (SessionName of the request overrides that). The target decides the service: a lobby the game instance is in goes through the lobby service, everything else through the game session service. Broadcasts OnSendInviteComplete.

Receiving invites

The lobby service (party invites) and the game session service (game invites) of the backend report invites (OSSv1 OnSessionInviteReceived, routed by the session type; OSSv2 lobby invitations (add-on PulseOnlineOSSv2), Mock invites). UPulseOnlineSessionSubsystem matches the receiver against the local users and broadcasts OnPulseSessionInviteReceived with the session type (PULSE_SESSION_TYPE).

UPulseOnlineSocialSubsystem stores the invite as FPulseOnlinePendingInvite (SessionType, bIsPartyInvite, sender name resolved from the friends cache) in GetPendingInvites() and starts the auto-decline timer.

  • AcceptInvite(InviteId): joins as party for party invites, otherwise as game session; broadcasts OnInviteAccepted.
  • DeclineInvite(InviteId): broadcasts OnInviteDeclined.

Blueprint: Accept or decline an invite

  1. Event BeginPlay → Pulse Online Social Subsystem → Bind Event to On Invite Received.
  2. Event (Invite) → Break Pulse Online Pending Invite → show a popup with Sender Display Name and Is Party Invite.
  3. Accept → Accept Invite (Invite Id). Decline → Decline Invite (Invite Id). On Invite Expired closes the popup.
  • A timed out invite broadcasts OnInviteExpired.

Joins accepted in the platform overlay are executed the same way when bAutoJoinOverlayRequestedSessions is set (Project Settings > Pulse > Online > Social). Turn it off if the game handles overlay joins itself; JoinSessionByType(SessionResult) joins a session as party or game session by its PULSE_SESSION_TYPE. A join that comes before the player is logged in online (a game started from an invite, Steam +connect_lobby) waits and runs right after the login.

Recent players

Players of the same game sessions are remembered per local player (GetRecentPlayers, newest first, Recent Players Size entries, save game slot PulseOnlineRecentPlayers_<index>); ClearRecentPlayers forgets them and OnRecentPlayersChanged reports changes. Use them for a “recently played with” list (add as friend, invite, report).

Blocked players

Invites of players on the block list of Online Safety are dropped before they reach OnInviteReceived (Chat and Safety).


This site uses Just the Docs, a documentation theme for Jekyll.