Invite a Player
Last updated on
This is how the invited player will get notification after the other player requests an invite party to the player that will get the notification.
- Unreal Engine
- Unity
FRegistry::Lobby.Connect();
FRegistry::Lobby.SetPartyGetInvitedNotifDelegate(AccelByte::Api::Lobby::FPartyGetInvitedNotif::CreateLambda([](const FAccelByteModelsPartyGetInvitedNotice& Result)
{
// Do something if PartyGetInvitedNotifDelegate has been successful
}));
AccelBytePlugin.GetLobby().Connect();
AccelBytePlugin.GetLobby().InvitedToParty += result =>
{
if (result.IsError)
{
// Do something if InvitedToParty has an error
Debug.Log($"Error InvitedToParty, Error Code: {result.Error.Code} Error Message: {result.Error.Message}");
}
else
{
// Do something if InvitedToParty has been successful
}
};