diff --git a/src/Consts.cs b/src/Consts.cs index 5740fdd..86291a8 100644 --- a/src/Consts.cs +++ b/src/Consts.cs @@ -60,12 +60,6 @@ true; #else false; -#endif - public const bool DISABLE_DRAGONECS_DEBUGGER = -#if DISABLE_DRAGONECS_DEBUGGER - true; -#else - false; #endif } } diff --git a/src/Debug/EcsDebug.cs b/src/Debug/EcsDebug.cs index 2b0bd28..6624830 100644 --- a/src/Debug/EcsDebug.cs +++ b/src/Debug/EcsDebug.cs @@ -210,7 +210,7 @@ namespace DCFApixels.DragonECS { Console.ForegroundColor = ConsoleColor.White; Console.BackgroundColor = ConsoleColor.Black; -#if !DISABLE_DRAGONECS_DEBUGGER +#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_DEBUGGER _stopwatchs = new MarkerData[64]; #endif } @@ -252,7 +252,8 @@ namespace DCFApixels.DragonECS private const string PROFILER_MARKER_CACHE = "[" + PROFILER_MARKER + "] "; public override void ProfilerMarkBegin(int id) { -#if !UNITY_EDITOR +#if ((DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_DEBUGGER) && !UNITY_5_3_OR_NEWER + var color = Console.ForegroundColor; Console.ForegroundColor = ConsoleColor.DarkGray; _stopwatchs[id].stopwatch.Start(); @@ -266,7 +267,7 @@ namespace DCFApixels.DragonECS } public override void ProfilerMarkEnd(int id) { -#if !UNITY_EDITOR +#if ((DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_DEBUGGER) && !UNITY_5_3_OR_NEWER var color = Console.ForegroundColor; Console.ForegroundColor = ConsoleColor.DarkGray; _stopwatchs[id].stopwatch.Stop(); diff --git a/src/Pools/EcsPool.cs b/src/Pools/EcsPool.cs index 684854e..b2a307e 100644 --- a/src/Pools/EcsPool.cs +++ b/src/Pools/EcsPool.cs @@ -4,6 +4,9 @@ using System; using System.Collections; using System.Collections.Generic; using System.Runtime.CompilerServices; +#if ENABLE_IL2CPP +using Unity.IL2CPP.CompilerServices; +#endif namespace DCFApixels.DragonECS { @@ -11,7 +14,6 @@ namespace DCFApixels.DragonECS public interface IEcsComponent : IEcsComponentType { } #if ENABLE_IL2CPP - using Unity.IL2CPP.CompilerServices; [Il2CppSetOption (Option.NullChecks, false)] #endif [MetaColor(MetaColor.DragonRose)] diff --git a/src/Pools/EcsTagPool.cs b/src/Pools/EcsTagPool.cs index c7f856d..11abac4 100644 --- a/src/Pools/EcsTagPool.cs +++ b/src/Pools/EcsTagPool.cs @@ -4,6 +4,9 @@ using System.Collections; using System.Collections.Generic; using System.Reflection; using System.Runtime.CompilerServices; +#if ENABLE_IL2CPP +using Unity.IL2CPP.CompilerServices; +#endif namespace DCFApixels.DragonECS { @@ -11,7 +14,6 @@ namespace DCFApixels.DragonECS public interface IEcsTagComponent : IEcsComponentType { } #if ENABLE_IL2CPP - using Unity.IL2CPP.CompilerServices; [Il2CppSetOption (Option.NullChecks, false)] #endif [MetaColor(MetaColor.DragonRose)] @@ -50,7 +52,7 @@ namespace DCFApixels.DragonECS } } #endif - #endregion +#endregion #region Properites public int Count