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.