Unity Gaming Services CLI
Use the Unity Gaming Services command-line tool to create, deploy, and manage Economy resources.
Read time 1 minuteLast updated a day ago
You can use the Unity Gaming Services CLI to interact with Economy resources. The CLI allows you to create, deploy, and manage Economy resources 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 Economy and environments management. Refer to Get Authenticated.
Using the CLI
Refer to the Economy Command Line documentation for a full reference of all commands and options.Deploy resources
Run thenew-fileYou can use theugs economy new-file <file-name>
Deployugs deploy <path-to-economy-file> <path-to-economy-file>
ugs deploy <path-to-directory>
Retrieve resources
To retrieve information about the deployed resource, run the following command:You can use theugs economy get-resources
Fetchugs fetch <path> --services economy
Environment synchronization
You can move all your resources from one environment and deploy them to another environment. Run the following command to produce an archive of all the resources in your current environment:You can then deploy the resources to another environment by running the following command:ugs fetch <out-dir> --services economy --environment-name <environment-from>
The resources are published as part of the deploy command.ugs deploy <in-dir> --services economy --environment-name <environment-to>
Delete resource
To delete an existing resource, run the following command:ugs economy delete <resource-id>