기술 자료

Unity Engine

Unity Engine

undoRedoEvent

Callback that is triggered after any undo or redo event.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

  • Type: Field
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule
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 }}