文档

Unity Engine

Unity Engine

ChangeSetStatus

Starts a task that gets the list of assets in an outgoing changeset.
阅读时间1 分钟最后更新于 11 天前

Definition

ChangeSetStatus(ChangeSet)

Starts a task that gets the list of assets in an outgoing changeset.
public static Task ChangeSetStatus(ChangeSet changeset)

Parameters

changeset

The outgoing changeset to get the assets of.

Returns

Type

Description

TaskThe task that gets the assets in the changeset.

Remarks

This method works only with outgoing changesets. To get the assets in an incoming changeset, use Provider.IncomingChangeSetAssets. When the task completes, its Task.assetList contains the assets.

ChangeSetStatus(string)

Starts a task that gets the list of assets in the outgoing changeset with a specified ID.
public static Task ChangeSetStatus(string changesetID)

Parameters

changesetID

The ID of the outgoing changeset to get the assets of.

Returns

Type

Description

TaskThe task that gets the assets in the changeset.

Remarks

This method works only with outgoing changesets. To get the assets in an incoming changeset, use Provider.IncomingChangeSetAssets. When the task completes, its Task.assetList contains the assets.
using System.Collections.Generic;using UnityEditor;using UnityEditor.VersionControl;using UnityEngine;public class EditorScript : MonoBehaviour{ [MenuItem("VersionControl/ChangeSetStatus")] static void ExampleChangeSetStatus() { Task t = Provider.ChangeSetStatus("1111"); t.Wait(); t.assetList.ForEach(asset => Debug.Log(asset.name + " " + asset.state.ToString())); }}
This example logs the name and version control state of each asset in the changeset with the ID
1111
.