Leave a Party
Last updated on
For other players that are still at the party, they will get a notification after some players leave from the party. Call this delegate function to get a notification when some party member leaves the party.
- Unreal Engine
- Unity
FRegistry::Lobby.Connect();
FRegistry::Lobby.SetPartyLeaveNotifDelegate(AccelByte::Api::Lobby::FPartyLeaveNotif::CreateLambda([](const FAccelByteModelsLeavePartyNotice& Result)
{
// Do something if PartyLeaveNotifDelegate has been successful
}));
AccelBytePlugin.GetLobby().Connect();
AccelBytePlugin.GetLobby().LeaveFromParty += result =>
{
if (result.IsError)
{
// Do something if LeaveFromParty has an error
Debug.Log($"Error LeaveFromParty, Error Code: {result.Error.Code} Error Message: {result.Error.Message}");
}
else
{
// Do something if LeaveFromParty has been successful
}
};