Documentation

​
​

Development

User Acquisition

Monetization

Industry

Unity Gaming Services CLI

v1.4

Legacy
​

GitHub Repository

Unity Gaming Services CLI

v1.4

Legacy
​

​
​
Unity Gaming Services CLI
  • Overview
Get started
  • Install the CLI
  • Set up a Common Configuration
  • Get Authenticated
  • Use Your First Command
Base commands
  • Configuration
  • Deploy
  • Environment
  • Fetch
  • Login
  • Logout
  • Status
Deployment definition
  • What is a Deployment Definition
  • Commands for Deployment Definition
  • Excludes
  • Troubleshooting Deployment Definition
Samples
  • CI/CD Pipeline Usage
    • Unity Build Automation
    • Docker
    • GitHub Actions
    • Jenkins
    • Installing the CLI from CI
  • Deploy Samples
  • File Type Associations
  • Redirecting Command Result to File
Troubleshooting
  • Project Roles
  • Unauthorized (Error 403)
CLI Services Documentation
  • Access
  • Cloud Code
  • Cloud Content Delivery
  • Cloud Save
  • Economy
  • Game Server Hosting
  • Leaderboards
  • Lobby
  • Player
  • Remote Config
  • Scheduler
  • Triggers
  1. Overview

Unity Build Automation

Learn how to integrate the CLI with Unity Build Automation.
Read time 1 minute
Last updated 3 months ago

In your Dashboard, navigate to
DevOps
>
Build Automation
>
Configurations
and create a new configuration.
In the advanced settings for your new configuration, you can set environment variables.
As an example, try setting the following environment variables:

Variable

Value

UGS_CLI_PROJECT_IDyour-project-id
UGS_CLI_SERVICE_KEY_IDyour-service-key-id
UGS_CLI_SERVICE_SECRET_KEYyour-service-secret-key
In the repository you've configured for your services, create a new
.sh
file that will contain your UGS CLI commands. Then, in your new configuration's advanced settings, set a script hook with the name of the
.sh
file. There are two fields
pre-build
which lets you execute your file before building, or
post-build
which executes your file after building.
Example content for the
.sh
file:
#!/bin/bashugs --versionugs config get environmentugs statusugs env listugs deploy <directory-with-service-configurations> -j

Copyright © 2026 Unity Technologies
LegalPrivacy PolicyCookiesDocumentation Terms of UseDo Not Sell or Share My Personal InformationYour Privacy Choices (Cookie Settings)

"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S and elsewhere (more info here). Other names or brands are trademarks of their respective owners.

Some pages are machine-translated for convenience, and may contain inaccuracies. In the event of conflicting information, the English version is authoritative.