TeleportToBestMatchServer
Method
Teleport local actor to the best match server instance based on the specified properties. If no match can be found, a new server instance will be created with the specified properties.
For example:
- A server exists that has a property "gameMode" with value "deathmatch"
- You can call this method with serverProperties={"gameMode": "deathmatch"} and serverPropertiesToMatch={"gameMode"}
- This will find the existing server and teleport the actor to that server
- If no server exists with the specified properties, a new server will be created with the specified properties
Parameters
Parameter | Description |
---|---|
int maxParticipants | Find a server that matches this maxParticipants count; 0 means "any" and will default to the settings set for the space if no match was found |
IReadOnlyCollection<KeyValuePair<string, object>> serverProperties | Specify the properties that you want to match for |
IReadOnlyCollection<string> serverPropertiesToMatch | Specify which properties from "serverProperties" that should be used for matchmaking. |