Documentation

​
​

Development

User Acquisition

Monetization

Industry

Unity Gaming Services CLI

v1.5

Legacy
​

GitHub Repository

Unity Gaming Services CLI

v1.5

Legacy
​

Unity Gaming Services CLI
​
​
Cloud Save
  • Overview
  • Commands
    • Data Custom
    • Data Index
      • Create Custom Index
      • Create Player Index
      • List Indexes
    • Data Player
  1. Overview
  2. Cloud Save

Create Player Index

Create an index for player data.
Read time 1 minute
Last updated 3 months ago

Create an index for player data.
Authentication Required:
Yes
ugs cloud-save data index player create [options]

Arguments

<fields>
An array of fields in an index represented in json. Each field must be unique within the array. Each field accepts a
key
string and an
asc
field, set to true or false.
Index creation commands can use either a
fields
argument or a
body
argument. If both are set,
fields
will be used.
Sample Fields Argument
--fields "[{\"key\":\"myIndexedKey\",\"asc\":true},{\"key\":\"myIndexedKey2\",\"asc\":false}]"
<visibility>
A string representing the visibility of the index. Must be one of
default
,
public
or
protected
.
<body>
The index definition in JSON. If this is a file path, the content of the file is used; otherwise, the raw string is used. If
fields
is set, it is used instead.
Sample Index Creation Body
{ "indexConfig": { "fields": [ { "key": "myIndexedKey", "asc": true }, { "key": "myIndexedKey2", "asc": false } ] }}

Documentation

For more documentation on index creation, see the Unity Service API Docs.

Options

Option

Alias

Description

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

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.

  • On this page
    • Arguments

    • Documentation

    • Options