Version: 2023.2

Provider.IncomingChangeSetAssets

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

参数

changeset 传入的变更集。
changesetID 传入的变更集 ID。

描述

给定传入的变更集,此方法将启动一个任务,用于在版本控制服务器中查询其资源是否属于变更集的一部分。

using System.Collections.Generic;
using UnityEditor;
using UnityEditor.VersionControl;
using UnityEngine;

public class EditorScript : MonoBehaviour { [MenuItem("Version Control/ChangeSetAssets")] public static void ExampleChangeSetAssets() { Task t1 = Provider.IncomingChangeSetAssets("1111"); t1.Wait(); t1.assetList.ForEach(asset => Debug.Log(asset.name + " " + asset.state.ToString())); } }

The code above will return the names and version control states for the assets belonging to the "1111" incoming changeset.