docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class DataObject

    Custom data property for a lobby.

    Inheritance
    object
    DataObject
    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 DataObject

    Constructors

    DataObject(string, VisibilityEnum, IndexEnum?)

    Initializes a new instance of the DataObject class.

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

    The value of the custom property. This property can be set to null or an empty string. If this property is indexed (by setting the index field) then the length of the value must be less than 128 bytes..

    DataObject.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 host. (required).

    DataObject.IndexEnum? index

    The name of the column to index this property value under, either S# for strings or N# for numeric values. If an index is specified on a property, then you can use that index name in a QueryFilter to filter results by that property. You will not be prevented from indexing multiple objects having properties with different names but the same index, but you will likely receive unexpected results from a query..

    Properties

    Index

    The name of the column to index this property value under, either S# for strings or N# for numeric values. If an index is specified on a property, then you can use that index name in a QueryFilter to filter results by that property. You will not be prevented from indexing multiple objects having properties with different names but the same index, but you will likely receive unexpected results from a query.

    Declaration
    [Preserve]
    public DataObject.IndexEnum? Index { get; set; }
    Property Value
    Type Description
    DataObject.IndexEnum?

    The name of the column to index this property value under, either S# for strings or N# for numeric values. If an index is specified on a property, then you can use that index name in a QueryFilter to filter results by that property. You will not be prevented from indexing multiple objects having properties with different names but the same index, but you will likely receive unexpected results from a query.

    Value

    The value of the custom property. This property can be set to null or an empty string. If this property is indexed (by setting the index field) then the length of the value must be less than 128 bytes.

    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. If this property is indexed (by setting the index field) then the length of the value must be less than 128 bytes.

    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 host.

    Declaration
    [Preserve]
    public DataObject.VisibilityEnum Visibility { get; set; }
    Property Value
    Type Description
    DataObject.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 host.

    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)