Invite to a Party
Last updated on
Players can invite other players to their party. Invitees will receive a notification that they have been invited to join a party and current party members will also receive a notification that someone has been invited to the party.
- Unreal Engine
- Unity
FRegistry::Lobby.SetInvitePartyResponseDelegate(Lobby::FPartyInviteResponse::CreateLambda([](FAccelByteModelsPartyInviteResponse result)
{
UE_LOG(LogAccelByteLobbyTest, Log, TEXT("Invite Party Success!"));
})
);
const FString InvitedPlayerId = “a1b2c3d4e5”;
FRegistry::Lobby.SendInviteToPartyRequest(InvitedPlayerId);
string userId = "SomeTargetUserId";
AccelBytePlugin.GetLobby().Connect();
AccelBytePlugin.GetLobby().InviteToParty(userId, result =>
{
if (result.IsError)
{
// Do something if InviteToParty has an error
Debug.Log($"Error InviteToParty, Error Code: {result.Error.Code} Error Message: {result.Error.Message}");
}
else
{
// Do something if InviteToParty has been successful
}
});