Skip to content

Commit

Permalink
fix: an error occurs when saving a preset
Browse files Browse the repository at this point in the history
close #293
  • Loading branch information
mob-sakai committed Jan 7, 2025
1 parent f7175c0 commit 894c561
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Packages/src/Editor/UIEffectEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,10 @@ private static void DrawPresetMenu(Object[] targets)
r.x += r.width;
if (GUI.Button(r, EditorGUIUtility.TrTempContent("Save As New"), "MiniButton"))
{
UIEffectProjectSettings.SaveAsNewPreset(targets.OfType<UIEffect>().FirstOrDefault());
EditorApplication.delayCall += () =>
{
UIEffectProjectSettings.SaveAsNewPreset(targets.OfType<UIEffect>().FirstOrDefault());
};
}
}
}
Expand Down

0 comments on commit 894c561

Please sign in to comment.