Extra data for a match. Holds one string, float, double, int, or long.
More...
Inherited by MatchFilter.
|
| MatchData (string value, ValueType valueType) |
| Create a new instance of matchData with a specific ValueType. More...
|
|
| MatchData (double value) |
| Create a new instance of matchData that stores a double More...
|
|
| MatchData (float value) |
| Create a new instance of matchData that stores a float More...
|
|
| MatchData (int value) |
| Create a new instance of matchData that stores an int More...
|
|
| MatchData (uint value) |
| Create a new instance of matchData that stores an unsigned int More...
|
|
| MatchData (long value) |
| Create a new instance of matchData that stores a long More...
|
|
| MatchData (ulong value) |
| Create a new instance of matchData that stores a ulong More...
|
|
| MatchData (string value) |
| Create a new instance of matchData that stores a string More...
|
|
virtual string | Serialize (string key) |
| Serialize the match data for sending to the matchmaking server. More...
|
|
override string | ToString () |
|
Extra data for a match. Holds one string, float, double, int, or long.
You can add as many MatchData entries as you want for match. MatchData can be set by the host when creating a match or any time afterwards. MatchData is received on clients when they GetMatchList (unless you pass in false for includeMatchData) and when they JoinMatch(). MatchData can not be requested except by listing matches or joining a match. You can use MatchFilter to filter the results of GetMatchList() based on a Match's MatchData. For example, the server might create a match with MatchData eloScore = 100 <verbatim> Clients could then use MatchFilter to search for matches with eloScore < 150 and > 50 </verbatim>
◆ ValueType
The type of the value stored by this MatchData
◆ MatchData() [1/8]
Create a new instance of matchData with a specific ValueType.
- Parameters
-
value | The value as a string |
valueType | The ValueType to store the value as |
◆ MatchData() [2/8]
Create a new instance of matchData that stores a double
- Parameters
-
◆ MatchData() [3/8]
Create a new instance of matchData that stores a float
- Parameters
-
◆ MatchData() [4/8]
Create a new instance of matchData that stores an int
- Parameters
-
◆ MatchData() [5/8]
Create a new instance of matchData that stores an unsigned int
- Parameters
-
◆ MatchData() [6/8]
Create a new instance of matchData that stores a long
- Parameters
-
◆ MatchData() [7/8]
Create a new instance of matchData that stores a ulong
- Parameters
-
◆ MatchData() [8/8]
Create a new instance of matchData that stores a string
- Parameters
-
◆ operator double()
static implicit operator double |
( |
MatchData |
matchData | ) |
|
|
static |
Implicitly converts a MatchData object to a double
These operators make accessing MatchData a little easier. So you can do things like: double eloScore = matchData["eloScore"]; instead of: double eloScore = matchData["eloScore"].doubleValue;
- Parameters
-
◆ operator float()
static implicit operator float |
( |
MatchData |
matchData | ) |
|
|
static |
Implicitly converts a MatchData object to a float
These operators make accessing MatchData a little easier. So you can do things like: double eloScore = matchData["eloScore"]; instead of: double eloScore = matchData["eloScore"].doubleValue;
- Parameters
-
◆ operator int()
static implicit operator int |
( |
MatchData |
matchData | ) |
|
|
static |
Implicitly converts a MatchData object to an int
These operators make accessing MatchData a little easier. So you can do things like: int eloScore = matchData["eloScore"]; instead of: int eloScore = matchData["eloScore"].intValue;
- Parameters
-
◆ operator long()
static implicit operator long |
( |
MatchData |
matchData | ) |
|
|
static |
Implicitly converts a MatchData object to a long
These operators make accessing MatchData a little easier. So you can do things like: int eloScore = matchData["eloScore"]; instead of: int eloScore = matchData["eloScore"].intValue;
- Parameters
-
◆ operator MatchData() [1/7]
static implicit operator MatchData |
( |
int |
value | ) |
|
|
static |
Implicitly converts an int to a MatchData object.
These operators make storing MatchData a little easier. So you can do things like:
var matchData = new Dictionary<string, MatchData>( { "eloScore", 200 } );
instead of:
var matchData =
new Dictionary<string, MatchData>( {
"eloScore",
new MatchData(200) } );
- Parameters
-
◆ operator MatchData() [2/7]
static implicit operator MatchData |
( |
uint |
value | ) |
|
|
static |
Implicitly converts an unsigned int to a MatchData object.
These operators make storing MatchData a little easier. So you can do things like:
var matchData = new Dictionary<string, MatchData>( { "eloScore", 200 } );
instead of:
var matchData =
new Dictionary<string, MatchData>( {
"eloScore",
new MatchData(200) } );
- Parameters
-
◆ operator MatchData() [3/7]
static implicit operator MatchData |
( |
long |
value | ) |
|
|
static |
Implicitly converts a long to a MatchData object.
These operators make storing MatchData a little easier. So you can do things like:
var matchData = new Dictionary<string, MatchData>( { "eloScore", 200 } );
instead of:
var matchData =
new Dictionary<string, MatchData>( {
"eloScore",
new MatchData(200) } );
- Parameters
-
◆ operator MatchData() [4/7]
static implicit operator MatchData |
( |
ulong |
value | ) |
|
|
static |
Implicitly converts an unsigned long to a MatchData object.
These operators make storing MatchData a little easier. So you can do things like:
var matchData = new Dictionary<string, MatchData>( { "eloScore", 200 } );
instead of:
var matchData =
new Dictionary<string, MatchData>( {
"eloScore",
new MatchData(200) } );
- Parameters
-
◆ operator MatchData() [5/7]
static implicit operator MatchData |
( |
double |
value | ) |
|
|
static |
Implicitly converts a double to a MatchData object.
These operators make storing MatchData a little easier. So you can do things like:
var matchData = new Dictionary<string, MatchData>( { "eloScore", 200.0 } );
instead of:
var matchData =
new Dictionary<string, MatchData>( {
"eloScore",
new MatchData(200.0) } );
- Parameters
-
◆ operator MatchData() [6/7]
static implicit operator MatchData |
( |
float |
value | ) |
|
|
static |
Implicitly converts a float to a MatchData object.
These operators make storing MatchData a little easier. So you can do things like:
var matchData = new Dictionary<string, MatchData>( { "eloScore", 200.0f } );
instead of:
var matchData =
new Dictionary<string, MatchData>( {
"eloScore",
new MatchData(200.0f) } );
- Parameters
-
◆ operator MatchData() [7/7]
static implicit operator MatchData |
( |
string |
value | ) |
|
|
static |
Implicitly converts a string to a MatchData object.
These operators make storing MatchData a little easier. So you can do things like:
var matchData = new Dictionary<string, MatchData>( { "password", "hunter5"} );
instead of:
var matchData =
new Dictionary<string, MatchData>( {
"password",
new MatchData(
"hunter5") } );
- Parameters
-
◆ operator string()
static implicit operator string |
( |
MatchData |
matchData | ) |
|
|
static |
Implicitly converts a MatchData object to a string
These operators make accessing MatchData a little easier. So you can do things like: string password = matchData["password"]; instead of: string password = matchData["password"].stringValue;
- Parameters
-
◆ operator uint()
static implicit operator uint |
( |
MatchData |
matchData | ) |
|
|
static |
Implicitly converts a MatchData object to an unsigned int
These operators make accessing MatchData a little easier. So you can do things like: int eloScore = matchData["eloScore"]; instead of: int eloScore = matchData["eloScore"].intValue;
- Parameters
-
◆ operator ulong()
static implicit operator ulong |
( |
MatchData |
matchData | ) |
|
|
static |
Implicitly converts a MatchData object to an unsigned long
These operators make accessing MatchData a little easier. So you can do things like: int eloScore = matchData["eloScore"]; instead of: int eloScore = matchData["eloScore"].intValue;
- Parameters
-
◆ Serialize()
virtual string Serialize |
( |
string |
key | ) |
|
|
virtual |
Serialize the match data for sending to the matchmaking server.
- Returns
- A string representing the MatchData
◆ SerializeDict()
static string SerializeDict |
( |
Dictionary< string, MatchData > |
data | ) |
|
|
static |
Converts an entire Dictionary of MatchData into a string for sending to the matchmaking server.
- Parameters
-
- Returns
- A string represenation of all of the data.
◆ valueType
The type of the value stored by this MatchData
◆ doubleValue
Get the value as a double
◆ floatValue
◆ intValue
◆ longValue
◆ stringValue
Get the value as a string
◆ uintValue
Get the value as an unsigned int
◆ ulongValue
Get the value as an unsigned long