v1.0.0
Latest
2022.3+

Class PlayerUpdateRequest

The body of an Update Player Data request.

Inheritance
System.Object
PlayerUpdateRequest
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Unity.Services.Lobbies.Models
Syntax
public class PlayerUpdateRequest

Constructors

PlayerUpdateRequest(String, Dictionary<String, PlayerDataObject>, String)

The body of an Update Player Data request.

Declaration
public PlayerUpdateRequest(string connectionInfo = null, Dictionary<string, PlayerDataObject> data = null, string allocationId = null)
Parameters
TypeNameDescription
System.StringconnectionInfo

Connection information for connecting to a relay with this player.

System.Collections.Generic.Dictionary<System.String, PlayerDataObject>data

Custom game-specific properties to add, update, or remove from the player (e.g. role or skill). To remove an existing property, include it in data but set the property object to null. To update the value to null, set the value property of the object to null.

System.StringallocationId

The allocationId from the Relay service which associates this player in this lobby with a persistent connection. When a disconnect notification is received, this value is used to identify the associated player in a lobby to mark them as disconnected.

Properties

AllocationId

The allocationId from the Relay service which associates this player in this lobby with a persistent connection. When a disconnect notification is received, this value is used to identify the associated player in a lobby to mark them as disconnected.

Declaration
public string AllocationId { get; }
Property Value
TypeDescription
System.String

ConnectionInfo

Connection information for connecting to a relay with this player.

Declaration
public string ConnectionInfo { get; }
Property Value
TypeDescription
System.String

Data

Custom game-specific properties to add, update, or remove from the player (e.g. role or skill). To remove an existing property, include it in data but set the property object to null. To update the value to null, set the value property of the object to null.

Declaration
public JsonObject Data { get; }
Property Value
TypeDescription
JsonObject