Class DataObject
Custom data property for a lobby.
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.
|
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.