Configuration variables

Note: The content on this page pertains to Multiplay Hosting, available on the Unity Cloud Dashboard. If you’re using Clanforge, refer to Clanforge documentation.

Configuration variables are variables defined on build configurations that Multiplay Hosting uses to generate a server.json file for each server. Each build configuration has a set of built-in variables, but you can create any number of custom configuration variables to track data that’s important to your build. You might want to track a difficulty modifier, the game mode, or the game map.

You can define configuration variables per build configuration. These custom configuration variables allow you to track data, such as a difficulty modifier, the game mode, or the game map.

Multiplay Hosting uses your custom variables and the built-in variables to generate a server.json for each game server.

Note: Multiplay Hosting loads configuration variables into the server.json file after the build executable starts. If you need to pass configuration to your server as it starts, consider using launch parameters instead.

Built-in Configuration variables

Each build configuration has the following built-in configuration variables:

Configuration variableDescription
allocatedUUIDThe unique ID of the allocation.
fleetIDThe ID of the fleet of which the server is a member.
ipThe IP address of the server instance.
ipv6The IPv6 address of the server instance, if available.
machineIDThe ID of the machine on which the server is running.
portThe port at which the specific server instance is accessible.
queryTypeThe query protocol the server instance uses.
queryPortThe port at which you can access the query protocol data.
regionIDThe ID of the region of which the server is a member.
regionNameThe name of the region of which the server is a member.
serverFilesDirThe path where game server files should be written to be usable with the Unity Cloud Dashboard file collection and download functionality.
serverIDThe unique identifier of the server instance.
serverLogDirThe path where log files should be written to be usable with the Unity Cloud Dashboard file collection and download functionality.