|
1 | 1 | # Bulk download script |
2 | 2 |
|
3 | | -The sample script demonstrates how to use Python SDK to download assets from Unity Cloud Asset Manager. |
| 3 | +This sample script demonstrates how you can use Python SDK to download assets from Unity Cloud Asset Manager. |
4 | 4 |
|
5 | | -To connect and find support, join the [Help & Support page](https://cloud.unity.com/home/dashboard-support)! |
| 5 | +Find and connect support services on the [Help & Support](https://cloud.unity.com/home/dashboard-support) page. |
6 | 6 |
|
7 | 7 | ## Table of contents |
8 | 8 | - [Bulk download script](#bulk-download-script) |
9 | 9 | - [Table of contents](#table-of-contents) |
10 | 10 | - [Prerequisites](#prerequisites) |
11 | | - - [System requirements](#system-requirements) |
| 11 | + - [Before you start](#before-you-start) |
12 | 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) |
| 13 | + - [Run the sample](#run-the-sample) |
16 | 14 | - [See also](#see-also) |
17 | | - - [Tell us what you think!](#tell-us-what-you-think) |
| 15 | + - [Tell us what you think](#tell-us-what-you-think) |
18 | 16 |
|
19 | 17 | ## Prerequisites |
20 | 18 |
|
21 | | -### System requirements |
| 19 | +> **Note**: To download assets from Asset Manager, you need the [`Asset Manager Admin`](https://docs.unity.com/cloud/en-us/asset-manager/org-project-roles#organization-level-roles) role at the organization level or the [`Asset Manager Contributor`]( https://docs.unity.com/cloud/en-us/asset-manager/org-project-roles#project-level-roles) add-on role at the project level. Asset Manager Contributors can update assets only for the specific projects to which they have access. |
22 | 20 |
|
23 | | -To run the script, you need: |
24 | | -- Python installed on your machine |
| 21 | +### Before you start |
| 22 | + |
| 23 | +Before you download assets from Unity Cloud Asset Manager, make sure you have the following: |
| 24 | + |
| 25 | +- Python installed on your machine. |
25 | 26 | - 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. |
| 27 | +- The required permissions. Read more about [verifying permissions](https://docs.unity.com/cloud/en-us/asset-manager/org-project-roles#verify-your-permissions). |
| 28 | + |
| 29 | + > **Note**: Asset Manager roles define the permissions that you have for a single Asset Manager project. Depending on your work, permissions may vary across projects. |
| 30 | +
|
| 31 | +- A Unity Cloud source project with the Asset Manager service enabled to download assets. Read more about [creating a project in Unity Cloud](https://docs.unity.com/cloud/en-us/asset-manager/new-asset-manager-project) page. |
| 32 | + |
| 33 | +- A Unity Cloud source project with asset manager service enabled to download assets and assets already uploaded in it. For more information on how to create a new project on Unity Cloud, see the [Create a new project](https://docs.unity.com/cloud/en-us/asset-manager/new-asset-manager-project) page. |
28 | 34 |
|
29 | 35 | ### Licenses |
30 | 36 |
|
31 | | -The bulk download sample script is made available under the [Unity ToS license](../LICENSE.md). |
| 37 | +The bulk download sample script is provided under the [Unity ToS license](../LICENSE.md). |
32 | 38 |
|
33 | | -## How do I run the sample ? |
| 39 | +## Run the sample |
34 | 40 |
|
35 | 41 | To run the sample, follow these steps: |
36 | 42 |
|
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. |
| 43 | +1. Link the sample to your project by editing the following information in the `main` conditional section of the `bulk_download.py` script. |
40 | 44 |
|
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. |
| 45 | + - org_id: Enter your organization ID. |
| 46 | + - project_id: Enter your project ID. |
| 47 | + - download_directory: Enter the path to the directory where you download the assets. |
| 48 | + - overwrite: Set to `True` to overwrite already existing files in the download directory. If you set it to `False`, the script skips the download process for existing files. |
| 49 | + - include_filter, exclude_filter, or any_filter: If you want to add include, exclude, or any filters to your request, build them as described in the [Unity Cloud Python SDK](https://docs.unity.com/cloud/en-us/asset-manager/python-sdk/manage-assets#create-filter-for-a-search-query) documentation. |
| 50 | + |
| 51 | + > **Note**: The script contains commented code that shows an example of filter usage to help you with the integration of custom filters. However, these comments do not cover the entire filter creation process. For comprehensive details, see the [Unity Cloud Python SDK](https://docs.unity.com/cloud/en-us/asset-manager/python-sdk/manage-assets#create-filter-for-a-search-query) documentation. |
| 52 | + |
| 53 | + - collections: Fill the `collections` list with the names of those collections from which you want to fetch your assets. Leave the `collections` list empty if you want to search through the whole project. |
47 | 54 |
|
48 | | -### 2. Run the script |
| 55 | +2. Run the script: |
49 | 56 |
|
50 | | -With you favorite command line tool, run `python bulk_download.py` in this folder. |
| 57 | + 1. Go to the current folder with a command line tool. |
| 58 | + 2. Run the following command: `python bulk_download.py`. |
51 | 59 |
|
52 | 60 | ## See also |
53 | 61 |
|
54 | | -- [Unity Cloud Python SDK documentation](https://docs.unity.com/cloud/en-us/asset-manager/python-sdk) |
| 62 | +For more information, see the [Unity Cloud Python SDK](https://docs.unity.com/cloud/en-us/asset-manager/python-sdk) documentation. |
55 | 63 |
|
56 | | -## Tell us what you think! |
| 64 | +## Tell us what you think |
57 | 65 |
|
58 | | -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! |
| 66 | +Thank you for exploring our project! Please help us improve and deliver greater value by providing your feedback in our [Help & Support](https://cloud.unity.com/home/dashboard-support) page. We appreciate your input! |
0 commit comments