包含此页的版本:
不含此页的版本:
执行撤销或重做后触发的回调。
using UnityEditor; using UnityEngine;public class ExampleScript : MonoBehaviour { void Start() { Undo.undoRedoPerformed += MyUndoCallback; } void MyUndoCallback() { // code for the action to take on Undo } }