UE4 Steamwork Callbacks¶
Initial Set Up¶
C:\Program Files (x86)\UE_(VersionNumber)\Engine\Plugins\Marketplace
Getting Started¶
Enabling Steam Subsystem¶
Referencing Callback Object¶
Get (Name of Object) Callback

Cleanup¶

Assigning Events¶
Finding Callbacks

Assigning Callbacks to Custom Events

Assigning Callbacks to Functions

Preventing Crashes
GetSteamPersona
if the function returns empty then do not bind events:
if (IOnlineSubsystem::Get("Steam")) {}
Useful References¶
Steam Friend Callbacks¶
GetFriendCallback¶
Get reference to Friend Callback Object to assign callback events.

Name | Type | Description |
---|---|---|
Return Value | PFFriendCallbacks | Pointer to friend callback handler. |
SteamGameOverlayActivatedCallback¶
When the steam overlay activates or deactivates. Can be used to pause or resume single player games.

Name | Type | Description |
---|---|---|
bActive | bool | Returns true if steam overlay was activated, and returns false when steam overlay deactivated. |
SteamPersonaStateChangeCallback¶
Called when a friends’ status changes.

Name | Type | Description |
---|---|---|
SteamUserID | Integer | Steam ID of user who changed. |
SteamPersonaChange | ESteamPersonaChange | Steam persona change result. |
ESteamPersonaChange¶

Name | Value | Description |
---|---|---|
EPersonaChangeName | ChangedName (1) | The user changed their persona name. |
EPersonaChangeStatus | ChangedStatus (2) | The user changed their account status (online, away, busy). |
EPersonaChangeComeOnline | ComeOnline (3) | The user has come online. |
EPersonaChangeGoneOffline | GoneOffline (4) | The user has gone offline. |
EPersonaChangeGamePlayed | ChangedGame (5) | The user has changed games. |
EPersonaChangeGameServer | ChangeServer (6) | The user has changed game servers. |
EPersonaChangeAvatar | ChangedAvatar (7) | The user has changed their steam avatar. |
EPersonaChangeJoinedSource | ChangedSource (8) | The user has changed source. |
EPersonaChangeLeftSource | LeftSource (9) | The user has left source. |
EPersonaChangeRelationshipChanged | ChangedRelationship (10) | The user has changed their relationship. |
EPersonaChangeNameFirstSet | ChangedFirstName (11) | The user has changed their first name. |
EPersonaChangeFacebookInfo | ChangedFacebookInfo (12) | The user has changed their facebook info. |
EPersonaChangeNickname | ChangedNickname (13) | The user’s nickname has changed. |
EPersonaChangeSteamLevel | ChangedFacebookInfo (14) | The user’s steam level has changed. |
EPersonaChangeErr | Error (15) | Result Error. |
SteamSetPersonaNameCallback¶
Result of entering a lobby.

Name | Type | Description |
---|---|---|
bSuccess | bool | true if name change completed successfully. |
bLocalSuccess | bool | true if name changed was locally. |
SteamSetPersonaEResult | (Integer) EResult. | result of the operation as an integer of EResult. |
Steam Matchmaking Callbacks¶
GetMatchmakingCallback¶
Get reference to Matchmaking Callback Object to assign callback events.

Name | Type | Description |
---|---|---|
Return Value | PFMatchmakingCallbacks | Pointer to matchmaking callback handler. |
SteamLobbyUpdatedCallback¶
The lobby room state has changed, usually sent when a user has joined or leaves the lobby.

Name | Type | Description |
---|---|---|
SteamLobbyID | Integer | Steam ID of the lobby. |
UserChangedSteamID | Integer | Steam ID of the user who’s status has changed. |
MakingChangeSteamID | Integer | Steam ID of user who made the change. |
MemberStateChange | EChatMemberStateChange | Field of EChatMemberStateChange. |
EChatMemberStateChange¶

Name | Value | Description |
---|---|---|
ChatMemberStateChangeEntered | Entered (0x0001) | The User has joined or is joining the lobby. |
ChatMemberStateChangeLeft | Left (0x0002) | The User has left or is leaving the lobby. |
ChatMemberStateChangeDisconnected | Disconnected (0x0004) | The User has disconnected from the lobby. |
ChatMemberStateChangedKicked | Kicked (0x0008) | The User has been kicked. |
ChatMemberStateChangeBanned | Banned (0x0010) | The User has been kicked or banned. |
SteamLobbyCreatedCallback¶
Result of a request to create a Lobby. Lobby has been joined and is ready for use at this point.

Name | Type | Description |
---|---|---|
SteamLobbyID | Integer | Steam ID of the lobby. |
SteamLobbyResult | (Integer) EResult. | result of the operation as an integer of EResult. |
SteamLobbyEnteredCallback¶
Result of entering a lobby.

Name | Type | Description |
---|---|---|
SteamLobbyID | Integer | Steam ID of the lobby. |
SteamLobbyBlocked | bool | When true only invited users may join. |
LobbyEnteredResponse | ELobbyEnteredResponse | Response to determine if lobby was entered successfully. |
ELobbyEnteredResponse¶

Name | Value | Description |
---|---|---|
EResponse_Success | Success (1) | Successful entry to chat/lobby. |
EResponse_DoesntExist | DoesntExist (2) | Lobby/Chat doesn’t exist (maybe closed). |
EResponse_NotAllowed | NotAllowed (3) | Do not have permission to join. |
EResponse_Full | Full (4) | Chat/Lobby room is full. |
EResponse_UnexpectedError | UnexpectedError (5) | UnexpectedError. |
EResponse_Banned | Banned (6) | The User has been banned from this lobby/chat and cannot join. |
EResponse_Limited | Limited (7) | Cannot join this lobby because the user is limited. |
EResponse_ClanDisabled | ClanDisabled (8) | Attempt to join a chat when clan chat is locked or disabled. |
EResponse_CommunityBan | CommunityBan (9) | Cannot join this chat/lobby because the user is banned from the community |
EResponse_MemberBlockedYou | MemberBlockedYou (10) | Cannot join this chat/lobby because a member in this chat/lobby blocked you. |
EResponse_YouBlockedMember | YouBlockedMember (11) | Cannot join this chat/lobby because the user has blocked a user already in the chat/lobby |
SteamLobbyInviteCallback¶
When an invite to join a lobby has been recieved.

Name | Type | Description |
---|---|---|
SteamUserID | integer | Steam ID of the person who sent the invite. |
SteamLobbyID | Integer | Steam ID of the lobby we’re invited to. |
SteamGameID | Integer | Game ID of the lobby we’re invited to. |
Steam User Callbacks¶
GetUserCallback¶
Get reference to User Callback Object to assign callback events.

Name | Type | Description |
---|---|---|
Return Value | PFUserCallbacks | Pointer to user callback handler. |
SteamGetAuthSessionTicketCallback¶
Called when cerating an auth session ticket.

Name | Type | Description |
---|---|---|
AuthTicket | Integer | id of ticket created. |
SteamGetAuthSessionTicketResults | (Integer) EResult. | result of the operation as an integer of EResult. |
SteamMicroTxnAuthorizationCallback¶
Called when a user has responded to a microtransaction authorization request.

Name | Type | Description |
---|---|---|
AppID | Integer | App ID for the microtransaction. |
OrderID | Integer | Order ID provided for the microtransaction. |
bAuthorized | bool | Did the user authorize the transaction. |
LicensesUpdatedCallback¶
Called whenever the users licenses (owned packages) changes.

This callback has no return fields.
SteamServerConnectFailureCallback¶
Called when a connection attempt has failed.

Name | Type | Description |
---|---|---|
SteamGetAuthSessionTicketResults | (Integer) EResult. | result of the operation as an integer of EResult. |
bStillRetrying | bool | Is steam client still trying to connect to the server? |
SteamServersConnectedCallback¶
Called when a connection to the Steam back-end has been established.

This callback has no return fields.