From 3826a8b3bbd871e3558c059f2ea5f0b5c2ca81d5 Mon Sep 17 00:00:00 2001 From: yangbear Date: Thu, 9 Jul 2026 03:23:41 +0800 Subject: [PATCH] fix: add missing Push method to ActionHistory --- Assets/Scripts/Core/UndoManager.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Assets/Scripts/Core/UndoManager.cs b/Assets/Scripts/Core/UndoManager.cs index c9b9f08..d05cffc 100644 --- a/Assets/Scripts/Core/UndoManager.cs +++ b/Assets/Scripts/Core/UndoManager.cs @@ -21,6 +21,11 @@ public static class ActionHistory public static Stack History = new Stack(); + public static void Push(ActionType type, MonoBehaviour handler, int extra = 0) + { + History.Push(new HistoryItem { Type = type, Handler = handler, ExtraInt = extra }); + } + public static bool TryUndoLast() { if (History.Count == 0) return false;