文档

Unity Engine

Download Unity

Unity Engine

ChangeSets()

Gets a list of pending changesets owned by the current user.
阅读时间1 分钟最后更新于 11 天前

Definition

public static Task ChangeSets()

Returns

Type

Description

TaskThe task that gets the pending changesets owned by the current user.

Remarks

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.