undoRedoEvent
Callback that is triggered after any undo or redo event.
Read time 1 minuteLast updated 11 days ago
Definition
- Type: Field
- Namespace: UnityEditor
- Assembly: UnityEditor
public static Undo.UndoRedoEventCallback undoRedoEvent
Examples
using UnityEditor;using UnityEngine;public class ExampleUndoRedoEventScript : MonoBehaviour{ void Start() { Undo.undoRedoEvent += OnUndoRedoEvent; } void OnDestroy() { Undo.undoRedoEvent -= OnUndoRedoEvent; } void OnUndoRedoEvent(in UndoRedoInfo info) { // code for the action to take on Undo or Redo event }}