Documentation

Unity Gaming Services CLI


GitHub Repository

Unity Gaming Services CLI


Get script

Get a Cloud Code script.
Read time 1 minuteLast updated 3 days ago

Get a Cloud Code script.

Command

Authentication Required:
Yes
ugs cloud-code scripts get <script-name> [options]

Arguments

<script-name>
The name of the script to get

Options

Alias

Description

project-id-p, --project-idThe Unity cloud project ID.
environment-e, --environment-nameThe services environment name.
versions--versionsExpand each version instead of listing version numbers.
help-?, -h, --helpDisplay help and usage information.
quiet-q, --quietReduce logging to a minimum.
json-j, --jsonUse JSON as the output format.

Versions

By default
versions
is a list of published version numbers. With
--versions
, each version is expanded:
versions: - isDraft: true dateUpdated: 2026-09-08T11:47:37 - version: 2 isDraft: false dateUpdated: 2026-09-08T11:47:37 dateCreated: 2026-09-01T09:14:02 tags: tier: a
The first entry is the working copy. It has no version number, which is why it appears only in the expanded form, and it is the only entry that can have
isDraft: true
.
Each version's code and parameters are not shown, as the code would dominate the output. Use publish to promote a version, and note that
datePublished
belongs to
activeScript
rather than to an individual version.