Unity Gaming Services CLI
Manage trigger configurations from the command line using the Unity Gaming Services command-line interface.
읽는 시간 1분최근 업데이트: 한 달 전
Unity Gaming Services CLI를 사용하여 트리거와 상호 작용할 수 있습니다. CLI를 사용하면 커맨드 라인에서 트리거 구성을 관리할 수 있습니다.
필수 조건
CLI에 대한 보다 포괄적인 내용을 알아보려면 Unity Gaming Services CLI 시작하기 가이드에 나와 있는 단계를 따르십시오. 이 가이드를 따르려면 먼저 다음 작업을 완료해야 합니다.- UGS CLI를 설치합니다.
-
다음과 같이 프로젝트 ID와 환경을 구성합니다.
ugs config set project-id <your-project-id>
ugs config set environment-name <your-environment-name> - Triggers와 환경 관리에 필요한 역할을 사용하여 서비스 계정을 구성합니다. 인증 받기를 참고하십시오.
CLI 사용
모든 커맨드와 옵션에 대한 전체 레퍼런스가 필요한 경우, Triggers 커맨드 라인 기술 자료를 참고하십시오.트리거 배포
new-file구성 파일 콘텐츠의 예시는 다음과 같습니다.ugs triggers new-file <file-name>
여러 트리거를 포함하도록 구성 파일을 수정할 수도 있습니다.{ "$schema": "https://ugs-config-schemas.unity3d.com/v1/triggers.schema.json", "Configs": [ { "Name": "example-trigger", "EventType": "com.unity.services.scheduler.{{EVENT_NAME}}.v{{EVENT_VERSION}}", "ActionUrn": "urn:ugs:cloud-code:MyScript", "ActionType": "cloud-code" } ]}
{ "$schema": "https://ugs-config-schemas.unity3d.com/v1/triggers.schema.json", "Configs": [ { "Name": "example-trigger", "EventType": "com.unity.services.scheduler.{{EVENT_NAME}}.v{{EVENT_VERSION}}", "ActionUrn": "urn:ugs:cloud-code:MyScript", "ActionType": "cloud-code" }, { "Name": "example-trigger-2", "EventType": "com.unity.services.scheduler.{{EVENT_NAME}}.v{{EVENT_VERSION}}", "ActionUrn": "urn:ugs:cloud-code:MyScript", "ActionType": "cloud-code" } ]}
Deployugs deploy <path-to-triggers-file> <path-to-triggers-file>
트리거를 기존 Cloud Code 스크립트나 모듈과 연결한 경우, 지정된ugs deploy <path-to-directory>
eventType트리거 검색
Fetchugs fetch <path>
트리거 삭제
트리거를 삭제하려면deploy--reconcileugs deploy --services triggers <path-to-triggers-file> --reconcile