Method GetPlayerNameAsync
GetPlayerNameAsync(bool)
Returns the name of the logged in player if it has been set. If no name has been set, this will return null if autoGenerate is set to false. This will also cache the name locally.
Declaration
Task<string> GetPlayerNameAsync(bool autoGenerate = true)
Parameters
Type | Name | Description |
---|---|---|
bool | autoGenerate | Option auto generate a player name if none already exist. Defaults to true |
Returns
Type | Description |
---|---|
Task<string> | Task for the operation with the resulting player name |
Exceptions
Type | Condition |
---|---|
AuthenticationException | The task fails with the exception when the task cannot complete successfully due to Authentication specific errors.
|
RequestFailedException | The task fails with the exception when the task cannot complete successfully.
|