Skip to content

Latest commit

 

History

History
66 lines (41 loc) · 4.14 KB

File metadata and controls

66 lines (41 loc) · 4.14 KB

Bulk download script

This sample script demonstrates how you can use Python SDK to download assets from Unity Cloud Asset Manager.

Find and connect support services on the Help & Support page.

Table of contents

Prerequisites

Note: To download assets from Asset Manager, you need the Asset Manager Admin role at the organization level or the Asset Manager Contributor add-on role at the project level. Asset Manager Contributors can update assets only for the specific projects to which they have access.

Before you start

Before you download assets from Unity Cloud Asset Manager, make sure you have the following:

  • Python installed on your machine.

  • An up-to-date Python SDK wheel installed ( > 0.5.0).

  • The required permissions. Read more about verifying permissions.

    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.

  • A Unity Cloud source project with the Asset Manager service enabled to download assets. Read more about creating a project in Unity Cloud page.

  • 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 page.

Licenses

The bulk download sample script is provided under the Unity ToS license.

Run the sample

To run the sample, follow these steps:

  1. Link the sample to your project by editing the following information in the main conditional section of the bulk_download.py script.

    • org_id: Enter your organization ID.
    • project_id: Enter your project ID.
    • download_directory: Enter the path to the directory where you download the assets.
    • 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.
    • 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 documentation.

    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 documentation.

    • 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.
  2. Run the script:

    1. Go to the current folder with a command line tool.
    2. Run the following command: python bulk_download.py.

See also

For more information, see the Unity Cloud Python SDK documentation.

Tell us what you think

Thank you for exploring our project! Please help us improve and deliver greater value by providing your feedback in our Help & Support page. We appreciate your input!