diff --git a/Packages/ga.fuquna.rosettaui/Runtime/Utilities/StaticResourceUtility.cs b/Packages/ga.fuquna.rosettaui/Runtime/Utilities/StaticResourceUtility.cs index 4e519eb..6719a8e 100644 --- a/Packages/ga.fuquna.rosettaui/Runtime/Utilities/StaticResourceUtility.cs +++ b/Packages/ga.fuquna.rosettaui/Runtime/Utilities/StaticResourceUtility.cs @@ -1,6 +1,5 @@ using System; using System.Diagnostics; - #if UNITY_EDITOR using UnityEditor; #endif @@ -15,7 +14,7 @@ public static class StaticResourceUtility { #if UNITY_EDITOR public static event Action onResetStaticResource; - + static StaticResourceUtility() { EditorApplication.playModeStateChanged += state => @@ -31,7 +30,9 @@ static StaticResourceUtility() [Conditional("UNITY_EDITOR")] public static void AddResetStaticResourceCallback(Action callback) { +#if UNITY_EDITOR onResetStaticResource += callback; +#endif } } } \ No newline at end of file