You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Licensed under the Unity Terms of Service ( see https://unity.com/legal/terms-of-service.).
4
+
5
+
Unless expressly provided otherwise, the Software under this license is made available strictly on an "AS IS" BASIS WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. Please review the license for details on these and other terms and conditions.
Public slack channel: [#uc-cs-am-python-sdk](https://unity.slack.com/messages/C04R01SGG68/) <br/>
3
-
[View this project in Backstage](https://backstage.corp.unity3d.com/catalog/default/component/unity-cloud-python-sdk-samples) <br/>
4
-
# Converting to public repository
5
-
Any and all Unity software of any description (including components) (1) whose source is to be made available other than under a Unity source code license or (2) in respect of which a public announcement is to be made concerning its inner workings, may be licensed and released only upon the prior approval of Legal.
6
-
The process for that is to access, complete, and submit this [FORM](https://airtable.com/appj757BYrNIMuTBI/shriEdWiQuxWmJOku).
1
+
# Python SDK samples
2
+
3
+
This repository exposes a few samples that demonstrate the use of Python SDK in real life use-cases:
Thank you for taking a look at the project! To help us improve and provide greater value, please consider providing feedback in our [Help & Support page](https://cloud.unity.com/home/dashboard-support). Thank you!
The sample script demonstrates how to use Python SDK to download assets from Unity Cloud Asset Manager.
4
+
5
+
To connect and find support, join the [Help & Support page](https://cloud.unity.com/home/dashboard-support)!
6
+
7
+
## Table of contents
8
+
-[Bulk download script](#bulk-download-script)
9
+
-[Table of contents](#table-of-contents)
10
+
-[Prerequisites](#prerequisites)
11
+
-[System requirements](#system-requirements)
12
+
-[Licenses](#licenses)
13
+
-[How do I run the sample ?](#how-do-i-run-the-sample-)
14
+
-[1. Edit the `bulk_download.py` script with your requirements](#1-edit-the--bulk_downloadpy-script-with-your-requirements)
15
+
-[2. Run the script](#2-run-the-script)
16
+
-[See also](#see-also)
17
+
-[Tell us what you think!](#tell-us-what-you-think)
18
+
19
+
## Prerequisites
20
+
21
+
### System requirements
22
+
23
+
To run the script, you need:
24
+
- Python installed on your machine
25
+
- An up-to-date Python SDK wheel installed ( > 0.5.0).
26
+
- The right permissions to use Asset Manager. See [Get Started with Asset Manager](https://docs.unity.com/cloud/en-us/asset-manager/get-started) for more details.
27
+
- A source project with assets manager enable and assets already uploaded in it.
28
+
29
+
### Licenses
30
+
31
+
The bulk download sample script is made available under the [Unity ToS license](../LICENSE.md).
32
+
33
+
## How do I run the sample ?
34
+
35
+
To run the sample, follow these steps:
36
+
37
+
### 1. Edit the `bulk_download.py` script with your requirements
38
+
39
+
In the `main` conditional section, you must edit some information to link the sample to your project.
40
+
41
+
- org_id: Your organization id.
42
+
- project_id: Your project id.
43
+
- download_directory: must be edited with the path where the assets will be downloaded.
44
+
- overwrite: When set to `True`, the script will overwrite the files in the download directory if they already exist. Otherwise, it will skip the download.
45
+
- include_filter/exclude_filter/any_filter: This dictionary contains the search criteria to fetch the assets. Some example are written in comments, otherwise please refer to [the Python SDK documentation](https://docs.unity.com/cloud/en-us/asset-manager/python-sdk/manage-assets#create-filter-for-a-search-query) to learn how to use search criteria.
46
+
- collections: This list contains the collections to fetch the assets from. Leave it empty to search through all the assets in the project.
47
+
48
+
### 2. Run the script
49
+
50
+
With you favorite command line tool, run `python bulk_download.py` in this folder.
Thank you for taking a look at the project! To help us improve and provide greater value, please consider providing feedback in our [Help & Support page](https://cloud.unity.com/home/dashboard-support). Thank you!
The Bulk upload Command-Line Interface (CLI) is a cross-platform command-line tool to connect to Asset Manager and execute administrative commands. It allows you to create configuration files that you can save and run from a terminal. Using CLI, you can create and update assets in bulk from your local disk to Asset Manager based on several inputs to match your folder structure. This tool offers an interactive mode where you are prompted to provide the necessary information to create and save configuration files for future asset updates.
4
+
5
+
To connect and find support, join the [Help & Support page](https://cloud.unity.com/home/dashboard-support)!
6
+
7
+
## Table of contents
8
+
-[Bulk upload CLI](#bulk-upload-cli)
9
+
-[Table of contents](#table-of-contents)
10
+
-[Prerequisites](#prerequisites)
11
+
-[System requirements](#system-requirements)
12
+
-[Licenses](#licenses)
13
+
-[How do I...?](#how-do-i)
14
+
-[Install the tool](#install-the-tool)
15
+
-[Run the tool in interactive mode](#run-the-tool-in-interactive-mode)
16
+
-[Select the input method](#select-the-input-method)
17
+
-[See also](#see-also)
18
+
-[Tell us what you think!](#tell-us-what-you-think)
19
+
20
+
## Prerequisites
21
+
22
+
### System requirements
23
+
24
+
To run the script, you need:
25
+
- Python installed on your machine
26
+
- An Asset Manager Contributor role on the project level or an Organization Owner role. For more information about roles, see [Roles and permissions](https://docs.unity.com/cloud/en-us/asset-manager/org-project-roles). You can upload up to 10 GB on the free tier of Unity Cloud.
27
+
- A Unity Cloud project with asset manager service enabled to upload assets. For more information on how to create a new project on Unity Cloud, see [Create a new project](https://docs.unity.com/cloud/en-us/asset-manager/new-asset-manager-project).
28
+
- An assigned seat if you are part of an entitled organization, that is, an organization with a Pro or Enterprise license. For more information, see the [Important notes](https://docs.unity.com/cloud/en-us/asset-manager/org-project-roles#project-level-roles) section.
29
+
30
+
### Licenses
31
+
32
+
The bulk download sample script is made available under the [Unity ToS license](../LICENSE.md).
33
+
34
+
## How do I...?
35
+
36
+
### Install the tool
37
+
38
+
1. Navigate to the current folder with your terminal.
39
+
2. Run the following help command to install the tool:
40
+
* On Mac: `python3 bulk_cli.py --install`
41
+
* On Windows: `python bulk_cli.py --install`
42
+
43
+
### Run the tool in interactive mode
44
+
45
+
1. Navigate to the current folder with your terminal.
46
+
2. Run the following command:
47
+
* On Mac: `python3 bulk_cli.py --create`
48
+
* On Windows: `python bulk_cli.py --create`
49
+
50
+
### Select the input method
51
+
52
+
Select one of the three strategies as the input method for bulk asset creation:
53
+
54
+
1. Answer the following CLI prompt: `Are you uploading assets from a Unity project?`
55
+
* Enter Yes if you upload files that are either:
56
+
* In a Unity project and have .meta files from the editor
57
+
or:
58
+
* In a Unity package, like content from the asset store
59
+
60
+
2. If you answered No to the prompt in step 1, select either of the following under the `Select a strategy` prompt:
61
+
62
+
*`group files by name`: Select this option if your assets are following a naming convention, for example, blueasset.fbx, blueasset.png.
63
+

64
+
65
+
*`group files by folder`: Select this option if your assets are organized by folder, that is, all relevant files are in distinct folders.
66
+

Thank you for taking a look at the project! To help us improve and provide greater value, please consider providing feedback in our [Help & Support page](https://cloud.unity.com/home/dashboard-support). Thank you!
0 commit comments