View a Friend's Status
Last updated on
This allows the player's friends to see when the player is online and what they are doing.
- Unreal Engine
- Unity
FRegistry::Lobby.Connect();
FRegistry::Lobby.SetUserPresenceNotifDelegate(AccelByte::Api::Lobby::FFriendStatusNotif::CreateLambda([](const FAccelByteModelsUsersPresenceNotice& Result)
{
// Do something if UserPresenceNotifDelegate has been successful
}));
AccelBytePlugin.GetLobby().Connect();
AccelBytePlugin.GetLobby().FriendsStatusChanged += result =>
{
if (result.IsError)
{
// Do something if FriendsStatusChanged has an error
Debug.Log($"Error FriendsStatusChanged, Error Code: {result.Error.Code} Error Message: {result.Error.Message}");
}
else
{
// Do something if FriendsStatusChanged has been successful
}
};