Essential Kit
Loading...
Searching...
No Matches
ILocalPlayer

Provides interface to access information about the authenticated player running your game on the device. More...

+ Inheritance diagram for ILocalPlayer:

Public Member Functions

void LoadFriends (EventCallback< GameServicesLoadPlayerFriendsResult > callback)
 Loads the list of friends for the authenticated local player.
 
void AddFriend (string playerId, EventCallback< bool > callback)
 Initiates a friend request to the specified player.
 
- Public Member Functions inherited from IPlayer
void LoadImage (EventCallback< TextureData > callback)
 Loads the player profile image.
 

Properties

bool IsAuthenticated [get]
 A bool value that indicates whether a local player is currently signed in to game service. (read-only)
 
bool IsUnderAge [get]
 A bool value that indicates whether a local player is underage. (read-only)
 
- Properties inherited from IPlayer
string Id [get]
 A string assigned by game service to uniquely identify a player. (read-only)
 
string DeveloperScopeId [get]
 A unique identifier for a player of all the games that you distribute using your developer account.
 
string LegacyId [get]
 Legacy identifier for backward compatibility. Use Id or DeveloperScopeId instead.
 
string Identifier [get]
 A string assigned by game service to uniquely identify a player. (read-only) On iOS, this is equivalent to game scope identifier.
 
string DeveloperScopeIdentifier [get]
 A unique identifier for a player of all the games that you distribute using your developer account.
 
string LegacyIdentifier [get]
 Legacy identifier for backward compatibility. Use Identifier or DeveloperScopeIdentifier instead.
 
string Alias [get]
 A string chosen by the player to identify themselves to others. (read-only)
 
string DisplayName [get]
 A string to display for the player. (read-only)
 

Detailed Description

At any given time, only one user may be authenticated on the device, this user must log out before another user can log in.

Remarks
Your game must authenticate the local user before using any features.

Member Function Documentation

◆ LoadFriends()

void LoadFriends ( EventCallback< GameServicesLoadPlayerFriendsResult > callback)
Parameters
callbackThe callback that will be called after operation is completed. If successful, it will contain the list of friends.

Referenced by GameServices.LoadFriends().

◆ AddFriend()

void AddFriend ( string playerId,
EventCallback< bool > callback )
Parameters
playerIdThe id of the player to send the request to.
callbackThe callback that will be called after operation is completed.

Referenced by GameServices.AddFriend().

Property Documentation

◆ IsUnderAge

bool IsUnderAge
get

true if is under age; otherwise, false.