Version: 2021.3

Provider.ChangeSetStatus

切换到手册
public static VersionControl.Task ChangeSetStatus (VersionControl.ChangeSet changeset);
public static VersionControl.Task ChangeSetStatus (string changesetID);

参数

changeset 要查询其资源的变更集。
changesetID 要查询其资源的变更集 ID。

描述

Retrieves a list of assets belonging to a changeset.

这仅适用于传出变更集。如果要从传入变更集获取资源,请使用 Provider.IncomingChangeSetAssets

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())); } }

The code above will output a full list of the asset names as well as their version control states for the given changelist "1111".