メインコンテンツまでスキップ

起動引数

Last updated on October 23, 2024

Introduction

You can use the launch arguments feature in AccelByte Development Toolkit (ADT) Hub to run tests and troubleshoot issues within the game. The feature enables you to run the game with specific parameters that can be modified and passed to an executable file.

With ADT, you can use three types of launch arguments to run a game build:

  • Predefined launch arguments
  • Default launch arguments
  • Local launch arguments
備考

You can also run games without launch arguments.

This article walks you through how to set launch arguments for your game.

Set predefined launch arguments

ADT allows you to add your own predefined launch arguments and use them for builds.

Add predefined launch arguments

You can add predefined launch arguments locally or globally and use them whenever you want.

注記

If you create a local argument, other users will not be able to see the predefined local argument that you created. For Global launch arguments, all users will be able to use the launch argument.

To add a predefined launch argument, follow these steps:

  1. In ADT Hub, click on your game name, then select Launch Arguments. Image shows game name and Launch Arguments option
  2. On the Launch Arguments window that appears, click on the Add new button.
  3. On the New Launch Argument form, do the following:
    1. Set the launch argument type to Local or Global.
    2. Type in a name for the new launch argument.
    3. Add the new launch argument into the "Launch Argument" box.
    4. Specify the platform.
  4. Click Add to save the new launch argument.

Set predefined launch argument for a track

To use a predefined launch argument for your game, follow these steps:

  1. In ADT Hub, go to the distribution channel for your game.
  2. On the track panel, click on the ellipsis menu and select Track > Set Launch Arguments.
  3. On the pop-up that appears, select Use predefined launch arguments, then select a predefined launch argument from the list.
  4. Click Save. The track's launch arguments will be updated using your selected predefined launch argument.

Set default launch arguments

The default launch argument feature can be used to set specified arguments within the build that will affect all users (global) when they play the game.

You can set the default launch argument for builds by setting it through ADT Hub and through ADT CLI.

From the Versions tab in ADT Hub

  1. In ADT Hub, go to the Versions tab and click on one of the available versions of your game.
  2. On the sidebar menu, click on Manage.
  3. In the Build section, select the build to which you want to add the custom launch argument. Image shows the Build section
  4. In the Launch Arguments section, click on Edit and add your launch argument.
  5. Click Save. The launch argument you added will be used as the default the next time you run a game build.

From the channel track in ADT Hub

  1. In ADT Hub, go to the distribution channel with the track you want to add a default launch argument to.
  2. On the track panel, click on the ellipsis menu and select Track > Set Launch Arguments. The "Set Launch Arguments" pop-up window appears.
  3. On the window, add your launch argument that will be used as the default for the track.
  4. Click Save. The launch argument you added will be used as the default the next time you run a game build from the track.

Using ADT CLI

Using this method attaches the launch argument to the build after it's uploaded, which cannot be deleted. Alternatively, you can opt for another available local launch argument or create a new one before playing the build, or simply run the build without any launch argument. See Run game build for more details.

To set the launch argument using ADT CLI, follow these steps:

  1. In ADT CLI, run the following command:
    ./BlackboxCLI.exe game-binary upload --entry-point <The game application> --game-archive <The game archive dir> --client-id <client game id> --client-secret <client secret id> --username <Your Blackbox email> --password <Your Blackbox email password> --launch-arguments <the build launch argument>`
  2. After the build is uploaded, open ADT Hub and download your build through a distribution channel or from the Versions tab. After the build is downloaded, the current default argument is displayed on the build card. Image shows launch argument on build card

Set local launch arguments

You can use the local launch arguments feature to set specific arguments for a build or build channel. Local launch arguments are stored on the user's machine (local) based on a game.

To create and add a local launch argument to a build or build channel, follow these steps:

  1. Open ADT Hub and download your build through a distribution channel or from the Versions tab.

  2. On the build card, click on the ellipsis menu next to the Play button and select Play with my Launch Arguments. Image shows the Play with launch arguments option

  3. On the Play with my launch arguments window, select your preferred way to run the build:

    • Run the game build using its default launch argument first, followed by your local argument. To do this, add your local launch argument into the "My launch arguments" text box and select the Append my launch arguments after track/build launch arguments option. The result displays the track or build's default launch argument, followed by your local launch argument.
    • Run the game build using your local launch argument first, followed by the default launch argument. To do this, add your local launch argument into the "My launch arguments" text box and select the Prepend my launch arguments after track/build launch arguments option. The result box displays your local launch argument, followed by the track or build's default launch argument.
    • Run the game build without a local launch argument. Ensure that the "My launch arguments" text box is empty. Delete its content, if any. Then, select the Replace track/build launch arguments with my launch arguments option. The result box is empty.

    Image shows the Play with launch arguments window

  4. (Optional) To save your settings and use it in the next launch, tick the Keep for the next launch checkbox.

  5. Click on Launch.

Set launch arguments in the Configure Automation menu

You can either set custom arguments or use the default command launch arguments that will be applied locally (only for the user who sets it) to its build channel. This allows you to set launch arguments based on a specific DevKit or machine (for PlayStation and Xbox series X Platform). The launch arguments will be applied once the build channel is updated. For more information, see Enable automation config for tracks.