Set Player Status
Last updated on
A player's presence can be set by a game. This function is how to update the status of the player that is going to change the status.
- Unreal Engine
- Unity
Availability Availability = Availability::Availabe;
FString Activity = FString("My New Activity");
FRegistry::Lobby.Connect();
FRegistry::Lobby.SendSetPresenceStatus(Availability, Activity);
UserStatus status = UserStatus.Availabe;
string activity = "My New Activity";
AccelBytePlugin.GetLobby().Connect();
AccelBytePlugin.GetLobby().SetUserStatus(status, activity, result =>
{
if (result.IsError)
{
// Do something if SetUserStatus has an error
Debug.Log($"Error SetUserStatus, Error Code: {result.Error.Code} Error Message: {result.Error.Message}");
}
else
{
// Do something if SetUserStatus has been successful
}
});