Version: 2017.1

Undo.undoRedoPerformed

切换到手册
public static Undo.UndoRedoCallback undoRedoPerformed ;

描述

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

using UnityEditor;
using UnityEngine;

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

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