Undo.undoRedoPerformed

Switch to Manual
public static Undo.UndoRedoCallback undoRedoPerformed ;

Description

执行撤销或重做后触发的回调。

using UnityEditor;
using UnityEngine;

public class ExampleScript : MonoBehaviour { void Start() { Undo.undoRedoPerformed += MyUndoCallback; }

void MyUndoCallback() { // some code here } }