Unity Gaming Services CLI
Create, deploy, and manage Cloud Code scripts using the Unity Gaming Services command-line interface.
읽는 시간 1분최근 업데이트: 8달 전
Unity Gaming Services CLI를 사용하여 Cloud Code 스크립트와 상호 작용할 수 있습니다. CLI를 사용하면 커맨드 라인에서 Cloud Code 스크립트를 생성, 배포, 관리할 수 있습니다.
필수 조건
CLI에 대해 자세히 알아보려면 Unity Gaming Services CLI 시작하기 가이드에 나와 있는 단계를 따르십시오.
이 가이드를 따르려면 먼저 다음 작업을 완료해야 합니다.
-
다음과 같이 프로젝트 ID와 환경을 구성합니다.
ugs config set project-id <your-project-id>
ugs config set environment-name <your-environment-name>
CLI 사용
커맨드와 옵션이 모두 나와 있는 레퍼런스가 필요한 경우, Cloud Code 커맨드 라인 기술 자료를 참고하십시오.
스크립트 배포
new-fileugs cloud-code scripts new-file <file-name>
Deployugs deploy <path-to-script-file> <path-to-script-file>
ugs deploy <path-to-directory>
스크립트 검색
배포된 스크립트에 대한 정보를 검색하려면 다음과 같은 커맨드를 실행합니다.
ugs cloud-code scripts get <script-name>
다음과 같은 커맨드를 실행하여 현재 Cloud Code에 배포된 모든 스크립트를 나열할 수도 있습니다.
ugs cloud-code scripts list
Fetchugs fetch <path>
환경 동기화
한 환경의 모든 스크립트를 다른 환경에 옮겨 배포할 수 있습니다.
다음과 같은 커맨드를 실행하여 현재 환경에 있는 모든 스크립트의 아카이브를 생성합니다.
ugs cloud-code scripts export <out-dir> <file-name>
그러면 다음과 같은 커맨드를 실행하여 스크립트를 임포트하고 다른 환경에 배포할 수 있습니다.
ugs cloud-code scripts import <in-dir> <file-name> --environment-name <environment-name>
스크립트는 자동으로 퍼블리시됩니다.
스크립트 삭제
기존 스크립트를 삭제하려면 다음과 같은 커맨드를 실행합니다.
ugs cloud-code scripts delete <script-name>