文档

​
​

Development

User Acquisition

Monetization

工业

Unity Cloud

Get Started

Asset Manager SDKs and services

Open Unity Dashboard

Unity Cloud

此页面不支持所选语言。
​
​
Unity Dashboard
  • Accounts
  • Organizations
  • Projects
  • Products
  • Billing
Developer Data
  • Introduction to the Developer Data Framework
  • Get started
  • View Diagnostics for your project
  • Privacy and consent
Unity Asset Manager
  • What's new
  • Asset Manager web
  • Asset Store
  • Manage Assets in the Editor
  • Unity Version Control
  • Developer documentation
    • Asset Manager SDKs and services
    • Integrations
      • Get started with your Asset Manager integration
      • Unity Cloud Python SDK
        • Prerequisites
        • Get started
        • Security information
        • Manage Identity
        • Manage assets
        • Manage asset versions
        • Manage datasets and files
        • Manage metadata
        • Manage collections
        • Manage transformations
        • Manage asset status
        • Manage VCS integrations
        • Open Dashboard
        • Configure Self-Hosted Deployment
        • Samples
        • Configure logs
        • Troubleshooting
      • Unity Pipeline Automation
      • Asset Manager for Unity Asset Transformer Studio
      • Asset Manager for Blender
Unity Pipeline Automation
  • About
  • Get started
  • Pipelines
  • Automations
  • Monitor jobs
  1. Unity Cloud Documentation
  2. Asset Manager
  3. Unity Cloud Python SDK

Manage collections

How to create and manage collections.
阅读时间2 分钟
最后更新于 1 年前

Before you begin

To access any collections, ensure that the application has all the right accesses. Read more about managing Identity.
注意
The following code snippets first require an initialization. To learn more about the
initialize()
and
uninitialize()
methods, read about getting started with the Unity Cloud Python SDK.

How do I...?

Create a collection

To create a collection, follow these steps:
  1. Create a
    CollectionCreation
    object with:
    • the collection name
    • the parent collection if any
    • the collection description
  2. Call
    create_collection
    with the organization and project IDs.
create_collection = CollectionCreation("my_collection", parent_path="", description="Collection description") collection = unity_cloud.assets.create_collection(create_collection, org_id, project_id)

Update a collection

To update a collection, follow these steps:
  1. Create a
     CollectionUpdate
    object with the new name and/or the new description.
  2. Call
    update_collection
    with the organization and project IDs, followed by the original name of the collection.
collection_update = CollectionUpdate(name="New name", description="new description")unity_cloud.assets.update_collection(collection_update, org_id, project_id, original_collection_name)

Delete a collection

To delete a collection, pass the organization and project IDs followed by the collection's name.
unity_cloud.assets.delete_collection(config.org_id, config.project_id, collection.name)

Get a collection

To get a collection, pass the organization and project IDs followed by the collection's name.
collection = unity_cloud.assets.get_collection(org_id, project_id, collection_name)

List all collections in a project

To list all collections in a project, follow these steps:
  1. Pass the organization and project IDs.
  2. (Optional) Add the parameter
    limit_to
    to limit the amount of returned results. Leave it untouched or set it to 0 to return everything.
  3. (Optional) Add the parameter
    skip
    to specify the number of collection to skip in the results. Use in combination with limit_to to page through results.
unity_cloud.assets.list_collections(org_id, project_id, limit_to=10, skip=0)

Link an asset to a collection

To link an asset to a collection, follow these steps:
  1. Pass the organization and project IDs containing the collection.
  2. Pass the name of the collection.
  3. Pass the IDs of the assets you want to link.
unity_cloud.assets.link_assets_to_collection( org_id = "012345678912", project_id = "1234abcd-ab12-cd34-ef56-123456abcdef", collection_path = "your-collection-name", asset_ids = ["0123456789abcdefghijklmn", "1123456789abcdefghijklmn", "2123456789abcdefghijklmn"] )

Unlink an asset from a collection

To remove assets from a collection, follow these steps:
  1. Pass the organization and project IDs containing the collection.
  2. Pass the name of the collection.
  3. Pass the IDs of the assets you want to remove.
unity_cloud.assets.unlink_assets_from_collection( org_id = "012345678912", project_id = "1234abcd-ab12-cd34-ef56-123456abcdef", collection_path = "your-collection-name", asset_ids = ["0123456789abcdefghijklmn", "1123456789abcdefghijklmn", "2123456789abcdefghijklmn"] )

Copyright © 2026 Unity Technologies
法律信息隐私政策CookiesDocumentation Terms of Use请勿出售或分享我的个人信息您的隐私选择(Cookie 设置)

“Unity”、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属公司在美国和其他地方的商标或注册商标(此处查看更多信息)。其他名称或品牌是其各自所有者的商标。

为方便起见,一些页面是机器翻译的,可能包含不准确的内容。如有信息不一致的情况,以英文版本为准。

  • 在本页上
    • Before you begin

    • How do I...?

      • Create a collection

      • Update a collection

      • Delete a collection

      • Get a collection

      • List all collections in a project

      • Link an asset to a collection

      • Unlink an asset from a collection


报告此页面的问题