Version: 2021.3
public static VersionControl.Task ChangeSets ();

描述

Gets a list of pending changesets owned by the current user.

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

public class EditorScript : MonoBehaviour { [MenuItem("Version Control/Changesets")] static void ExampleChangeSets() { Task t = Provider.ChangeSets(); t.Wait(); t.changeSets.ForEach(changeset => Debug.Log(changeset.id + " : " + changeset.description)); } }

The code above will output all of the currently active changesets to the console.