Provider.IncomingChangeSetAssets

Switch to Manual
public static VersionControl.Task IncomingChangeSetAssets (VersionControl.ChangeSet changeset);
public static VersionControl.Task IncomingChangeSetAssets (string changesetID);

Parameters

changesetIncoming changeset.
changesetIDIncoming changesetid.

Description

Given an incoming changeset this will start a task to query the version control server for which assets are part of the changeset.

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.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961