Version: 2023.1

Provider.ChangeSetDescription

切换到手册
public static VersionControl.Task ChangeSetDescription (VersionControl.ChangeSet changeset);

参数

changeset 要查询其相关描述的变更集。

描述

给定仅包含变更集 ID 的变更集,此方法将启动用于查询变更集相关描述的任务。

The resulting description can be retrieved using the task's "text" property.

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

public class EditorScript : MonoBehaviour { [MenuItem("Version Control/Changeset Description")] static void ExampleChangeSetDescription() { AssetList assets = new AssetList(); ChangeSet changeset = new ChangeSet("Unknown Description", "1111"); Task t = Provider.ChangeSetDescription(changeset); t.Wait(); Debug.Log(t.text); } }

The code above will check the description of the changeset with the ID of "1111" and output it to the console.