기술 자료

​
​

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 assets

How to add and manage assets with Python SDK.
읽는 시간 5분
최근 업데이트: 일 년 전

Before you begin

To access any assets, make sure the app has the right permissions. 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.

Create an asset

To add an asset into a project, follow these steps:
  1. Use the method
    create_asset
    by passing all the information inside
    AssetCreation
    .
  2. At least define
    Name
    and
    Type
    values to create an asset. The possible values for
    Type
    are:
    • 2D Asset
    • 3D Model
    • Audio
    • Material
    • Script
    • Video
    • Unity Editor
    • Other
The created asset is saved as a draft.
asset_creation = AssetCreation( name = "your-asset-name", description = "your-asset-description", type = unity_cloud.assets.AssetType.MODEL_3D, tags = ["your-tag-1", "your-tag-2", "your-tag-3"] ) asset = unity_cloud.assets.create_asset( asset_creation = asset_creation, org_id = "012345678912", project_id = "1234abcd-ab12-cd34-ef56-123456abcdef" )

Update an asset

To change the name, the description, the type, the tags, or the file used for the preview you need to:
  1. Create an
    AssetUpdate
    method.
  2. Call the
    update_asset
    method.
asset_update = AssetUpdate( name = "your-asset-name", description = "your-asset-description", type = unity_cloud.assets.AssetType.MODEL_3D, tags = ["your-tag-1", "your-tag-2", "your-tag-3"], preview_file = "Path/To/File.ext" ) unity_cloud.assets.update_asset( asset_update = asset_update, org_id = "012345678912", project_id = "1234abcd-ab12-cd34-ef56-123456abcdef", asset_id = "0123456789abcdefghijklmn", asset_version = '1234abcd-ab12-cd34-ef56-123456abcdef' )

Get an asset

To fetch a single asset, call
get_asset
.
asset = unity_cloud.assets.get_asset( org_id = "012345678912", project_id = "1234abcd-ab12-cd34-ef56-123456abcdef", asset_id = "0123456789abcdefghijklmn", asset_version = '1234abcd-ab12-cd34-ef56-123456abcdef' )

Get an asset by its label

When the version of the asset is not known, you can fetch an asset by its label using the
get_asset_by_label
method. Keep the
label
parameter empty to fetch the default version of the asset.
asset = unity_cloud.assets.get_asset_by_label( org_id = "012345678912", project_id = "1234abcd-ab12-cd34-ef56-123456abcdef", asset_id = "0123456789abcdefghijklmn", label = "your-asset-label" )

Get a list of all assets within a project

To fetch all assets contained in a given project, call
get_asset_list
.
assets = unity_cloud.assets.get_asset_list( org_id = "012345678912", project_id = "1234abcd-ab12-cd34-ef56-123456abcdef" )

Perform an advanced search for assets

To search for assets across an organization, follow these steps:
  1. Create your filters as dictionnaries or objects that will contain the conditions.
  2. Create an array that will contain the projects in which to look up. Leave the array empty to search across all projects in the organization.
  3. Create an array that will contain the collections in which to look up. Leave the array empty to search across all collections and assets not linked to a collection.
  4. Call
    search_assets_in_projects
    with the organization ID, your project IDs, your filters, the amount of matches required in the any_filter, the collections, and optionally the maximum number of results returned and the amount to skip for paging purpose.
include_filter = dict()exclude_filter = dict()any_filter = dict()include_filter[SearchableProperties.NAME] = StringFilter(StringLookUpTypes.REGEX, "asset\-.*")project_ids = []collections = []search_result = unity_cloud.assets.search_assets_in_projects(org_id, project_ids, include_filter = include_filter, exclude_filter = exclude_filter, any_filter = any_filter, any_query_minimum_match = 1, collections = collections, limit_to = 10, skip = 0)

Create filter for a search query

To create an
include_filter
, an
exclude_filter
, or an
any_filter
, you can use the enum
SearchableProperties
as a helper. This enum is provided with a comment on how each each properties should be created. You are not limited to properties in this enum and can write your own, as long as the properties you're writing exist either in an asset, dataset, or file.
To create a filter on a string property, you can either write a simple equal condition, or use an advanced
StringFilter
.
include_filter = dict()include_filter[SearchableProperties.DESCRIPTION] = "Description must be exactly equals to this"include_filter[SearchableProperties.NAME] = StringFilter(StringLookUpTypes.wildcard, "incompl*te n*me")
To create a filter on a date property, you can either write a simple equal condition, or use an advanced
DateRangeCondition
. Date must be passed.
date_to_compare = datetime.now().isoformat()exclude_filter = dict()exclude_filter[SearchableProperties.DATASETS_CREATED] = date_to_comparedata_condition = DateRangeCondition(RangeConditionTypes.LESS_THAN, date_to_compare)date_filter = DateRangeFilter([numeric_condition])exclude_filter[SearchableProperties.FILES_UPDATED] = DateRangeFilter([data_condition])
To search using a custom metadata field, write
metadata.<your-metadata-key>
as the property. To find the key of a custom metadata field, refer to metadata documentation. Complex filters cannot be used with custom metadata fields, only simple equal conditions.
exclude_filter = dict()exclude_filter["metadata.MyCustomMetadataFieldKey"] = "expected-value"

Link assets to a project

To link assets to multiple projects, use the
link_assets_to_project
method with the
project_id
argument.
unity_cloud.assets.link_asset_to_project( org_id = "012345678912", project_id = "1234abcd-ab12-cd34-ef56-123456abcdef", asset_ids = ["0123456789abcdefghijklmn"], new_project_id = "4567efgh-ab12-cd34-ef56-123456abcdef" )

Remove assets link to a project

To remove assets link to multiple projects, use the
unlink_assets_from_project
method with the
project_id
argument.
unity_cloud.assets.unlink_asset_from_project( org_id = "012345678912", project_id = "1234abcd-ab12-cd34-ef56-123456abcdef", asset_ids = ["0123456789abcdefghijklmn"] )

Get an asset preview file URL

To get the URL of the preview file of an asset, use the
get_preview_file_url
method.
preview_file_url = unity_cloud.assets.get_preview_file_url( org_id = "012345678912", project_id = "1234abcd-ab12-cd34-ef56-123456abcdef", asset_id = "0123456789abcdefghijklmn", asset_version = '1234abcd-ab12-cd34-ef56-123456abcdef' )

Add an asset reference to an asset

To add a reference to an asset, use the
add_asset_reference
method. You can either add a reference by using an asset version or a version label assigned to it.
unity_cloud.assets.add_asset_reference( org_id = "012345678912", project_id = "1234abcd-ab12-cd34-ef56-123456abcdef", source_asset_id = "0123456789abcdefghijklmn", source_asset_version = '1234abcd-ab12-cd34-ef56-123456abcdef', target_asset_id = "4567efgh-ab12-cd34-ef56-123456abcdef", target_asset_version = '4567efgh-ab12-cd34-ef56-123456abcdef', target_asset_label = "your-asset-label" )

List the references of an asset

To list the references of an asset, use the
list_asset_references
method. The
context
parameter can be
Context.SOURCE
,
Context.TARGET
or
Context.BOTH
if you want everything.
references = unity_cloud.assets.list_asset_references( org_id = "012345678912", project_id = "1234abcd-ab12-cd34-ef56-123456abcdef", asset_id = "0123456789abcdefghijklmn", asset_version = '1234abcd-ab12-cd34-ef56-123456abcdef', context = Context.SOURCE )

Remove an asset reference

Using the result of the previous method, you can remove a reference to an asset by using the
remove_asset_reference
method with the id of a reference.
unity_cloud.assets.remove_asset_reference( org_id = "012345678912", project_id = "1234abcd-ab12-cd34-ef56-123456abcdef", asset_id = "0123456789abcdefghijklmn", asset_version = '1234abcd-ab12-cd34-ef56-123456abcdef', reference_id = "4567efgh-ab12-cd34-ef56-123456abcdef" )

Copyright © 2026 Unity Technologies
법률 정보개인정보 처리방침쿠키Documentation Terms of Use개인 정보 판매 또는 공유 금지개인정보 보호 선택(쿠키 설정)

'Unity', Unity 로고 및 기타 Unity 상표는 미국 및 기타 지역 내 Unity Technologies 또는 그 계열사의 상표 또는 등록상표입니다(자세한 내용은 여기에서 확인하세요). 기타 명칭 또는 브랜드는 해당 소유자의 상표입니다.

일부 페이지는 편의를 위해 기계 번역되었으며 부정확한 내용이 있을 수 있습니다. 정보가 상충되는 경우, 영어 버전을 우선으로 참조하세요.

  • 보고 있는 페이지
    • Before you begin

    • Create an asset

    • Update an asset

    • Get an asset

    • Get an asset by its label

    • Get a list of all assets within a project

    • Perform an advanced search for assets

    • Create filter for a search query

    • Link assets to a project

    • Remove assets link to a project

    • Get an asset preview file URL

    • Add an asset reference to an asset

    • List the references of an asset

    • Remove an asset reference


이 페이지의 문제 보고