docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class PlayerDataObject

    Custom data property for a player.

    Inheritance
    object
    PlayerDataObject
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.Services.Apis.Lobbies
    Assembly: solution.dll
    Syntax
    [Preserve]
    public class PlayerDataObject

    Constructors

    PlayerDataObject(string, VisibilityEnum)

    Initializes a new instance of the PlayerDataObject class.

    Declaration
    [Preserve]
    public PlayerDataObject(string value = null, PlayerDataObject.VisibilityEnum visibility = (PlayerDataObject.VisibilityEnum)0)
    Parameters
    Type Name Description
    string value

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

    PlayerDataObject.VisibilityEnum 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. (required).

    Properties

    Value

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

    Declaration
    [Preserve]
    public string Value { get; set; }
    Property Value
    Type Description
    string

    The value of the custom property. This property can be set to null or an empty 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
    [Preserve]
    public PlayerDataObject.VisibilityEnum Visibility { get; set; }
    Property Value
    Type Description
    PlayerDataObject.VisibilityEnum

    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.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)