Configuration variables

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

Configuration variables are variables defined on build configurations that Game Server 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.

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

Note: Game Server 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
allocatedIDThe unique ID of the allocation.
files_dirThe path where game server files should be written to be usable with the Unity Cloud Dashboard file collection and download functionality.
ipThe IP address of the server instance.
ipv6The IPv6 address of the server instance, if available.
fleetIDThe ID of the fleet of which the server is a member.
log_dirThe path where log files should be written to be usable with the Unity Cloud Dashboard file collection and download functionality.
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.
serverIDThe unique identifier of the server instance.