+1

UGS CLI - Install & Usage [English]

in this post, we will learn what UGS CLI do and how to install, run, login and authenticate for UGS CLI.

0. What is UGS CLI

The Unity Gaming Services (UGS) CLI is a unified command line interface tool for gaming services. The source code of the UGS CLI is public on GitHub for reference only. You may not be able to build it due to lack of access to internal dependencies.

1. Install UGS CLI

Requirements

Nodejs: https://nodejs.org/en Git: https://git-scm.com/downloads

Installation

To install the CLI with npm, make sure you have node and npm installed, then run: npm install -g ugs This installs the CLI as an npm package and adds ugs to your PATH. After installation, you should be able to call ugs --version and other commands directly from your command line.

2. Login

After you have installed UGS CLI, what you need to do is login using an authenticate account.

Step 1 - Login to unity admin portal

Login to Unity Dashboard: https://dashboard.unity3d.com/ Create an new project, then on the left side panel, we navigate to Admin Portal by clicking on **Projects** image.png

Step 2 - Create an services account

Continue from Admin Portal, we navigate to Services Accounts and create a new one for it. image.png

After create the services account, we need to create an new key for it. Remember to keep the key for yourself, also note that the secrect key cannot be access again! But you can add new key 😄 image.png

Step 3 - Login from UGS CLI

From this step, we open terminal or any application that have same functionality as terminal. Then enter following command: ugs login

The UGS CLI will ask for set of key ID and secrect key. This where both of key we save above come in.

  • Note that you just need to do this step once, if you not change the service account frequently.

3. Projects, enviroments

Imagine in an unity account, we can create as many project as we want. Inside the project there will be enviroments. image.png

Create enviroments inside a project

Environments are logical partitions for Unity Game Services that contain data associated with your project. Basically, enviroments is just a set of datas, configurations and stuffs you put inside the project which on UGS.

To create and assign new enviroment, we just need to do a few simple step on Admin Portal

image.png

Then from the dashboard, click Add Enviroment on the top right of the screen.

Conclusion

You have learn the first step to setup an UGS CLI, project & enviroments for yourself. Congratulation!


All rights reserved

Viblo
Hãy đăng ký một tài khoản Viblo để nhận được nhiều bài viết thú vị hơn.
Đăng kí