fix: undo now works correctly after clicking the 'Clear' button in the inspector

This commit is contained in:
mob-sakai
2025-04-04 13:55:51 +09:00
parent a0dd316df6
commit 75ed355e27
+1
View File
@@ -665,6 +665,7 @@ namespace Coffee.UIEffects.Editors
r.width = 55;
if (GUI.Button(r, EditorGUIUtility.TrTempContent("Clear"), "MiniButton"))
{
Undo.RecordObjects(targets, "Clear UIEffect");
Array.ForEach(targets.OfType<UIEffect>().ToArray(), Unsupported.SmartReset);
}
}