文档

​
​

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 VCS integrations

Manage VCS integrations and VCS mappings
阅读时间4 分钟
最后更新于 1 年前

Prerequisites

To access and create VCS integrations or VCS mappings, make sure the app has the right access. Read more about managing Identity.
注意
The VCS integrations feature is currently only accessible in AWS Private Cloud.
注意
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 a VCS Integration

To create a new VCS integration, use the following method:
integration_creation = unity_cloud.models.VcsIntegrationCreation(name="my new integration", provider="PlasticSCM", server_host="your_server_url.com", auth_bearer_token="123456")vcs_integration = unity_cloud.assets.create_vcs_integration(org_id="012345678912", integration_creation=integration_creation)

Retrieve a VCS Integration

To retrieve a previously created VCS integration, pass the organization ID and the VCS integration ID.
vcs_integration = unity_cloud.assets.get_vcs_integration(org_id="012345678912", vcs_integration_id="my_integration_id")

List VCS Integrations

To list all VCS integrations in an organization, you may specify optional parameters for pagination.
vcs_integrations = unity_cloud.assets.list_vcs_integrations(org_id="012345678912", limit_to=100, skip=0 )
Note that the
limit_to
and
skip
parameters are optional and setting them to 0 will return all results.

Update a VCS Integration

To update an existing VCS integration, provide the updated information, organization ID, and integration ID.
integration_update = unity_cloud.models.VcsIntegrationUpdate(name="my new integration", provider="PlasticSCM", server_host="your_server_url.com", auth_bearer_token="123456")vcs_integration = unity_cloud.assets.update_vcs_integration(org_id="012345678912", integration_creation=integration_update, vcs_integration_id="my_integration_to_update_id")

Delete a VCS Integration

To delete a VCS integration, provide the organization ID and integration ID.
delete_success = unity_cloud.assets.delete_vcs_integration(org_id="012345678912", vcs_integration_id="my_integration_id")

List VCS Integration Repositories

To list repositories associated with a VCS integration:
repositories = unity_cloud.assets.list_vcs_integration_repositories(org_id="012345678912", vcs_integration_id="my_integration_id", limit_to=100, skip=0)
Note that the
limit_to
and
skip
parameters are optional and setting them to 0 will return all results.

List Repository Branches

To list branches of a repository in a VCS integration:
branches = unity_cloud.assets.list_repository_branches(org_id="012345678912", vcs_integration_id="my_integration_id", repository_name="my_repository_name", limit_to=100, skip=0)
Note that the
limit_to
and
skip
parameters are optional and setting them to 0 will return all results.

List Branch Folders

To retrieve folders from a specific branch in a repository:
folders = unity_cloud.assets.list_branch_folders(org_id="012345678912", vcs_integration_id="my_integration_id", repository_name="my_repository_name", branch_name="my_branch_name", file_path="my/folder/path", limit_to=100, skip=0)
Leave the
file_path
parameter empty to list the root folder. Note that the
limit_to
and
skip
parameters are optional and setting them to 0 will return all results.

Create a VCS Mapping

To create a mapping between a VCS repository and a project, you must first have a created asset and a VCS integration, and then use the following method::
vcs_mapping_creation = unity_cloud.models.VcsMappingCreation(asset_id="my_asset_id", asset_version="my_asset_version", vcs_integration_id="my_integration_id", repository_name="my_repository", branch_name="my_branch", filter_paths=["/"], filter_extensions=[".fbx", ".png"], filter_files=["file1", "file2"])vcs_mapping = unity_cloud.assets.create_vcs_mapping(project_id="012345678912", vcs_mapping_creation=vcs_mapping_creation)
Use the
filter_paths
,
filter_extensions
, and
filter_files
parameters to specify the files to include in the mapping.
filter_paths
is a list of paths to include in the mapping. Set to
["/"]
to include all paths.
filter_extensions
is a list of file extensions to include in the mapping. Leave empty to include all extensions.
filter_files
is a list of file along with their path to include in the mapping. Leave empty to include all files.

Update a VCS Mapping

To update an existing VCS mapping:
vcs_mapping_update = unity_cloud.models.VcsMappingUpdate(id="my_mapping_id", project_id="012345678912", filter_paths=["/"], filter_extensions=[".fbx", ".png"], filter_files=["file1", "file2"])update_success = unity_cloud.assets.update_vcs_mapping(project_id="012345678912", vcs_mapping_update=vcs_mapping_update)

Retrieve a VCS Mapping

To retrieve details of a VCS mapping:
vcs_mapping = unity_cloud.assets.get_vcs_integration(project_id="012345678912", vcs_mapping_id="my_mapping_id")

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

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

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

  • 在本页上
    • Prerequisites

    • Create a VCS Integration

    • Retrieve a VCS Integration

    • List VCS Integrations

    • Update a VCS Integration

    • Delete a VCS Integration

    • List VCS Integration Repositories

    • List Repository Branches

    • List Branch Folders

    • Create a VCS Mapping

    • Update a VCS Mapping

    • Retrieve a VCS Mapping


报告此页面的问题