Launch parameters
Learn how launch parameters control command-line arguments passed to your game executable.
Read time 3 minutesLast updated 3 days ago
Launch parameters are variables passed to a game server at the time of start-up. These variables load before any other configuration variables and are separate from configuration variables and the
server.json- Initialize a port number.
- Set the log directory.
$$port$$port$$-port $$port$$ -queryport $$query_port$$ -log $$log_dir$$
Server variables
Like build configuration variables, you can use the following server-specific variables in your launch parameters. The following table has example server variables, each with a type, description, and example value.Variable | Type | Description | Example value |
|---|---|---|---|
| string | A string of the launch parameters passed to the game server or application on launch. | |
| string | The directory that contains the Unity configuration server.json. | |
| string | The ID of the fleet of which the server is a member. | |
| string | The name of the build executable. | |
| string | The directory to which the server should send log files. | |
| string | The directory to which the server should send game files. Log files can also be written here. | |
| integer | The ID of the machine on which the server is running. | |
| integer | The network port on which the server should bind for traffic. | |
| integer | The network port on which the server should bind for query protocol traffic. | |
| string | The query protocol supported by the build the server is running. | |
| integer | The ID of the server. | |
| string | The ID of the region of which the server is a member. | |
| string | The name of the region of which the server is a member. | |
| string | The IP (version 4) address of the server. | |
| string | The IP (version 6) address of the server. | |
| string | The UTC timestamp of when the server started. | |
Default launch parameters
The following sections display the default launch parameters for games made with Unity and games made with Unreal.Unity
The default launch parameters for games made with Unity include-nographics-batchmode-logFile-nographics -batchmode -port $$port$$ -logFile $$log_dir$$/Engine.log
Launch parameter | Description |
|---|---|
| Run the game executable without graphics. |
| Run Unity in batch mode. In batch mode, Unity runs command line arguments without the need for human interaction. |
| Specify the port clients can use to connect to the game server. |
| Specify the location where the server saves log files. It accepts a directory relative to the server ID and can include build configuration variables. |
queryPortqueryType-nographics -batchmode -port $$port$$ -logFile $$log_dir$$/Engine.log -queryPort $$query_port$$ -queryType $$query_type$$
Launch parameter | Description |
|---|---|
| Specify the network port on which the server should bind for query protocol traffic. |
| Specify the query protocol supported by the build the server is running. |
Unreal
The default launch parameters for games made with Unreal include-log-port-log=$serverid.log -port=$$port$$
Launch parameter | Description |
|---|---|
| Specify the location where the server saves log files. |
| Specify the port clients can use to connect to the game server. |
queryPortqueryType-log=$serverid.log -port=$$port$$ -queryPort $$query_port$$ -queryType $$query_type$$
Launch parameter | Description |
|---|---|
| Specify the network port on which the server should bind for query protocol traffic. |
| Specify the query protocol supported by the build the server is running. |