mirror of
https://github.com/mob-sakai/UIEffect.git
synced 2026-11-21 18:42:37 +08:00
fix: undo now works correctly after clicking the 'Clear' button in the inspector
This commit is contained in:
@@ -665,6 +665,7 @@ namespace Coffee.UIEffects.Editors
|
|||||||
r.width = 55;
|
r.width = 55;
|
||||||
if (GUI.Button(r, EditorGUIUtility.TrTempContent("Clear"), "MiniButton"))
|
if (GUI.Button(r, EditorGUIUtility.TrTempContent("Clear"), "MiniButton"))
|
||||||
{
|
{
|
||||||
|
Undo.RecordObjects(targets, "Clear UIEffect");
|
||||||
Array.ForEach(targets.OfType<UIEffect>().ToArray(), Unsupported.SmartReset);
|
Array.ForEach(targets.OfType<UIEffect>().ToArray(), Unsupported.SmartReset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user