This commit is contained in:
Mikhail 2024-04-29 22:12:51 +08:00
parent 5ec9bbdd70
commit 22302ab443
2 changed files with 22 additions and 11 deletions

View File

@ -5,7 +5,9 @@ using UnityEngine;
namespace DCFApixels.DragonECS namespace DCFApixels.DragonECS
{ {
#if UNITY_EDITOR
[InitializeOnLoad] [InitializeOnLoad]
#endif
public class UnityDebugService : DebugService public class UnityDebugService : DebugService
{ {
private ProfilerMarker[] _profilerMarkers = new ProfilerMarker[64]; private ProfilerMarker[] _profilerMarkers = new ProfilerMarker[64];

View File

@ -1,5 +1,4 @@
#if UNITY_EDITOR using DCFApixels.DragonECS.Unity.Internal;
using DCFApixels.DragonECS.Unity.Internal;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
@ -9,16 +8,8 @@ using UnityEngine;
namespace DCFApixels.DragonECS.Unity.Editors namespace DCFApixels.DragonECS.Unity.Editors
{ {
[InitializeOnLoad] internal static partial class UnityEditorUtility
internal static class UnityEditorUtility
{ {
static UnityEditorUtility()
{
colorBoxeStyles = new SparseArray<GUIStyle>();
}
private static SparseArray<GUIStyle> colorBoxeStyles = new SparseArray<GUIStyle>();
private static GUIContent _singletonContent = null;
#region TransformFieldName #region TransformFieldName
public static string TransformToUpperName(string name) public static string TransformToUpperName(string name)
{ {
@ -104,6 +95,24 @@ namespace DCFApixels.DragonECS.Unity.Editors
} }
#endregion #endregion
}
}
#if UNITY_EDITOR
namespace DCFApixels.DragonECS.Unity.Editors
{
[InitializeOnLoad]
internal static partial class UnityEditorUtility
{
static UnityEditorUtility()
{
colorBoxeStyles = new SparseArray<GUIStyle>();
}
private static SparseArray<GUIStyle> colorBoxeStyles = new SparseArray<GUIStyle>();
private static GUIContent _singletonContent = null;
#region Label #region Label
public static GUIContent GetLabelTemp() public static GUIContent GetLabelTemp()
{ {