Class Player
Represents the player data.
Inherited Members
Namespace: Unity.Services.Apis.PlayerAuthentication
Assembly: Unity.Services.Apis.dll
Syntax
[DataContract(Name = "Player")]
[Preserve]
public class Player
Constructors
Player(bool, List<ExternalId>, string, string)
Initializes a new instance of the Player class.
Declaration
[Preserve]
public Player(bool disabled = false, List<ExternalId> externalIds = null, string id = null, string username = null)
Parameters
Type | Name | Description |
---|---|---|
bool | disabled | Whether the player is disabled by admin. (required). |
List<External |
externalIds | The list of linked external providers info. The list itself doesn't limit the number of external accounts linked with this player. In our current version, we allow only one external account of each type to link with the player. For example, you can't link two different Facebook Ids with the same player. (required). |
string | id | The player Id. The Id is unique within the Id domain. (required). |
string | username | The username used to sign in using the Username Password IdProvider.. |
Properties
Disabled
Whether the player is disabled by admin.
Declaration
[DataMember(Name = "disabled", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public bool Disabled { get; set; }
Property Value
Type | Description |
---|---|
bool | Whether the player is disabled by admin. |
ExternalIds
The list of linked external providers info. The list itself doesn't limit the number of external accounts linked with this player. In our current version, we allow only one external account of each type to link with the player. For example, you can't link two different Facebook Ids with the same player.
Declaration
[DataMember(Name = "externalIds", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public List<ExternalId> ExternalIds { get; set; }
Property Value
Type | Description |
---|---|
List<External |
The list of linked external providers info. The list itself doesn't limit the number of external accounts linked with this player. In our current version, we allow only one external account of each type to link with the player. For example, you can't link two different Facebook Ids with the same player. |
Id
The player Id. The Id is unique within the Id domain.
Declaration
[DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public string Id { get; set; }
Property Value
Type | Description |
---|---|
string | The player Id. The Id is unique within the Id domain. |
Username
The username used to sign in using the Username Password IdProvider.
Declaration
[DataMember(Name = "username", EmitDefaultValue = false)]
[Preserve]
public string Username { get; set; }
Property Value
Type | Description |
---|---|
string | The username used to sign in using the Username Password IdProvider. |