v1.0.0
Latest
2022.3+

Class PlayerDataObject

Custom data property for a player.

Inheritance
System.Object
PlayerDataObject
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 PlayerDataObject

Constructors

PlayerDataObject(PlayerDataObject.VisibilityOptions, String)

Custom data property for a player.

Declaration
public PlayerDataObject(PlayerDataObject.VisibilityOptions visibility, string value = null)
Parameters
TypeNameDescription
PlayerDataObject.VisibilityOptionsvisibility

Indicates for whom the property should be visible. If public, the property will be visible to everyone and will be included in query results. If member, the data will only be visible to users who are members of the lobby (i.e. those who have successfully joined). If private, the metadata will only be visible to the player.

System.Stringvalue

The value of the custom property. This property can be set to null or an empty string.

Properties

Value

The value of the custom property. This property can be set to null or an empty string.

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

Visibility

Indicates for whom the property should be visible. If public, the property will be visible to everyone and will be included in query results. If member, the data will only be visible to users who are members of the lobby (i.e. those who have successfully joined). If private, the metadata will only be visible to the player.

Declaration
public PlayerDataObject.VisibilityOptions Visibility { get; }
Property Value
TypeDescription
PlayerDataObject.VisibilityOptions