diff --git a/src/Debug/UnityDebugService.cs b/src/Debug/UnityDebugService.cs index 00a0e15..acca69e 100644 --- a/src/Debug/UnityDebugService.cs +++ b/src/Debug/UnityDebugService.cs @@ -5,7 +5,9 @@ using UnityEngine; namespace DCFApixels.DragonECS { +#if UNITY_EDITOR [InitializeOnLoad] +#endif public class UnityDebugService : DebugService { private ProfilerMarker[] _profilerMarkers = new ProfilerMarker[64]; diff --git a/src/Internal/Editor/UnityEditorUtility.cs b/src/Internal/Editor/UnityEditorUtility.cs index c1fd138..45efc0a 100644 --- a/src/Internal/Editor/UnityEditorUtility.cs +++ b/src/Internal/Editor/UnityEditorUtility.cs @@ -1,5 +1,4 @@ -#if UNITY_EDITOR -using DCFApixels.DragonECS.Unity.Internal; +using DCFApixels.DragonECS.Unity.Internal; using System; using System.Collections.Generic; using System.Runtime.InteropServices; @@ -9,16 +8,8 @@ using UnityEngine; namespace DCFApixels.DragonECS.Unity.Editors { - [InitializeOnLoad] - internal static class UnityEditorUtility + internal static partial class UnityEditorUtility { - static UnityEditorUtility() - { - colorBoxeStyles = new SparseArray(); - } - private static SparseArray colorBoxeStyles = new SparseArray(); - private static GUIContent _singletonContent = null; - #region TransformFieldName public static string TransformToUpperName(string name) { @@ -104,6 +95,24 @@ namespace DCFApixels.DragonECS.Unity.Editors } #endregion + } +} + + +#if UNITY_EDITOR +namespace DCFApixels.DragonECS.Unity.Editors +{ + [InitializeOnLoad] + internal static partial class UnityEditorUtility + { + static UnityEditorUtility() + { + colorBoxeStyles = new SparseArray(); + } + private static SparseArray colorBoxeStyles = new SparseArray(); + private static GUIContent _singletonContent = null; + + #region Label public static GUIContent GetLabelTemp() {