Skip to content

Commit 894c561

Browse files
committed
fix: an error occurs when saving a preset
close #293
1 parent f7175c0 commit 894c561

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Packages/src/Editor/UIEffectEditor.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,10 @@ private static void DrawPresetMenu(Object[] targets)
457457
r.x += r.width;
458458
if (GUI.Button(r, EditorGUIUtility.TrTempContent("Save As New"), "MiniButton"))
459459
{
460-
UIEffectProjectSettings.SaveAsNewPreset(targets.OfType<UIEffect>().FirstOrDefault());
460+
EditorApplication.delayCall += () =>
461+
{
462+
UIEffectProjectSettings.SaveAsNewPreset(targets.OfType<UIEffect>().FirstOrDefault());
463+
};
461464
}
462465
}
463466
}

0 commit comments

Comments
 (0)