Unity Gaming Services CLI
Deploy leaderboard configurations with the command-line interface.
Read time 1 minuteLast updated 21 days ago
You can use the Unity Gaming Services CLI to interact with Leaderboard configurations. The CLI allows you to create, deploy, and manage Leaderboard configurations from the command line.
Prerequisites
For a deep dive into the CLI, follow the steps in the Unity Gaming Services CLI Get Started guide. To follow this guide, you must first complete the following actions:- Install the UGS CLI.
- Configure your Project ID and Environment as such:
ugs config set project-id <your-project-id>
ugs config set environment-name <your-environment-name> - Configure a Service Account with the required roles for Leaderboards and environments management. Refer to Get Authenticated.
Using the CLI
Refer to the Leaderboards Command Line documentation for a full reference of all commands and options.Deploy configurations
Run thenew-fileYou can use theugs leaderboards new-file <file-name>
Deployugs deploy <path-to-configuration-file> <path-to-configuration-file>
ugs deploy <path-to-directory>
Retrieve configurations
To retrieve information about the deployed configurations, run the following command:You can also list all configurations currently deployed to Leaderboards by running the following command:ugs leaderboards get <leaderboard-id>
You can use theugs leaderboards list
Fetchugs fetch <path> --services leaderboards
Environment synchronization
You can move all your configurations from one environment and deploy them to another environment. You can then fetch the configurations and deploy them to another environment by running the following commands:ugs fetch <out-dir> --services leaderboards --environment-name <environment-name>
ugs deploy <in-dir> --services leaderboards --environment-name <environment-name>
Delete configuration
To delete an existing leaderboard, run the following command:ugs leaderboards delete <leaderboard-id>