diff --git a/Runtime/Consts.cs b/Runtime/Consts.cs index 758435d..85a7b1c 100644 --- a/Runtime/Consts.cs +++ b/Runtime/Consts.cs @@ -1,4 +1,7 @@ -using System.Runtime.CompilerServices; +#if DISABLE_DEBUG +#undef DEBUG +#endif +using System.Runtime.CompilerServices; using UnityEngine; using UnityEngine.Rendering; @@ -50,6 +53,12 @@ namespace DCFApixels.DebugXCore { public static class DebugXDefines { + public const bool DISABLE_DEBUG = +#if DISABLE_DEBUG + true; +#else + false; +#endif public const bool DEBUGX_DISABLE_INBUILD = #if DEBUGX_DISABLE_INBUILD true; diff --git a/Runtime/DebugX.cs b/Runtime/DebugX.cs index ef28e5b..8040e9c 100644 --- a/Runtime/DebugX.cs +++ b/Runtime/DebugX.cs @@ -1,8 +1,12 @@ -//#undef DEBUG - +#if DISABLE_DEBUG +#undef DEBUG +#endif #if DEBUG #define DEV_MODE #endif +#if UNITY_EDITOR +using UnityEditor; +#endif using System; using DCFApixels.DebugXCore; using System.Collections.Generic; @@ -13,9 +17,6 @@ using UnityEngine.PlayerLoop; using Unity.Collections.LowLevel.Unsafe; using DCFApixels.DebugXCore.Internal; using System.Linq; -#if UNITY_EDITOR -using UnityEditor; -#endif namespace DCFApixels { diff --git a/Runtime/DebugX.globals.cs b/Runtime/DebugX.globals.cs index b1854fb..c2f68a0 100644 --- a/Runtime/DebugX.globals.cs +++ b/Runtime/DebugX.globals.cs @@ -1,7 +1,10 @@ -using UnityEngine; +#if DISABLE_DEBUG +#undef DEBUG +#endif #if UNITY_EDITOR using UnityEditor; #endif +using UnityEngine; namespace DCFApixels { diff --git a/Runtime/Gizmos/DebugX.base.cs b/Runtime/Gizmos/DebugX.base.cs index f304299..ed8c7ad 100644 --- a/Runtime/Gizmos/DebugX.base.cs +++ b/Runtime/Gizmos/DebugX.base.cs @@ -1,9 +1,14 @@ -using DCFApixels.DebugXCore; +#if DISABLE_DEBUG +#undef DEBUG +#endif +#if UNITY_EDITOR +using UnityEditor; +#endif +using DCFApixels.DebugXCore; using DCFApixels.DebugXCore.Internal; using System.Runtime.InteropServices; using Unity.Collections.LowLevel.Unsafe; using Unity.Jobs; -using UnityEditor; using UnityEngine; using UnityEngine.Rendering; diff --git a/Runtime/Gizmos/DebugX.dots.cs b/Runtime/Gizmos/DebugX.dots.cs index edb6470..98b653f 100644 --- a/Runtime/Gizmos/DebugX.dots.cs +++ b/Runtime/Gizmos/DebugX.dots.cs @@ -1,4 +1,7 @@ -using DCFApixels.DebugXCore; +#if DISABLE_DEBUG +#undef DEBUG +#endif +using DCFApixels.DebugXCore; using UnityEngine; namespace DCFApixels diff --git a/Runtime/Gizmos/DebugX.lines.cs b/Runtime/Gizmos/DebugX.lines.cs index 9783c0b..4c3405f 100644 --- a/Runtime/Gizmos/DebugX.lines.cs +++ b/Runtime/Gizmos/DebugX.lines.cs @@ -1,4 +1,7 @@ -using DCFApixels.DebugXCore; +#if DISABLE_DEBUG +#undef DEBUG +#endif +using DCFApixels.DebugXCore; using DCFApixels.DebugXCore.Internal; using System; using System.Collections.Generic; diff --git a/Runtime/Gizmos/DebugX.other.cs b/Runtime/Gizmos/DebugX.other.cs index 9686f88..d4e874c 100644 --- a/Runtime/Gizmos/DebugX.other.cs +++ b/Runtime/Gizmos/DebugX.other.cs @@ -1,9 +1,12 @@ -using DCFApixels.DebugXCore; -using UnityEngine; -using UnityEngine.Rendering; +#if DISABLE_DEBUG +#undef DEBUG +#endif #if UNITY_EDITOR using UnityEditor; #endif +using DCFApixels.DebugXCore; +using UnityEngine; +using UnityEngine.Rendering; namespace DCFApixels { diff --git a/Runtime/Gizmos/DebugX.primitives.cs b/Runtime/Gizmos/DebugX.primitives.cs index c389959..1b9067a 100644 --- a/Runtime/Gizmos/DebugX.primitives.cs +++ b/Runtime/Gizmos/DebugX.primitives.cs @@ -1,4 +1,7 @@ -using DCFApixels.DebugXCore; +#if DISABLE_DEBUG +#undef DEBUG +#endif +using DCFApixels.DebugXCore; using System; using UnityEngine; using UnityEngine.Rendering; diff --git a/Runtime/Gizmos/DebugX.raycasts.cs b/Runtime/Gizmos/DebugX.raycasts.cs index f5fbc54..74738a9 100644 --- a/Runtime/Gizmos/DebugX.raycasts.cs +++ b/Runtime/Gizmos/DebugX.raycasts.cs @@ -1,4 +1,7 @@ -using DCFApixels.DebugXCore.Internal; +#if DISABLE_DEBUG +#undef DEBUG +#endif +using DCFApixels.DebugXCore.Internal; using UnityEngine; namespace DCFApixels diff --git a/Runtime/Gizmos/Text/DebugXTextSettings.cs b/Runtime/Gizmos/Text/DebugXTextSettings.cs index ba9a3d1..e1c9766 100644 --- a/Runtime/Gizmos/Text/DebugXTextSettings.cs +++ b/Runtime/Gizmos/Text/DebugXTextSettings.cs @@ -1,4 +1,7 @@ -using UnityEngine; +#if DISABLE_DEBUG +#undef DEBUG +#endif +using UnityEngine; namespace DCFApixels { diff --git a/Runtime/Gizmos/Text/TextDrawHandlerExtensions.cs b/Runtime/Gizmos/Text/TextDrawHandlerExtensions.cs index 36235cf..4d13d41 100644 --- a/Runtime/Gizmos/Text/TextDrawHandlerExtensions.cs +++ b/Runtime/Gizmos/Text/TextDrawHandlerExtensions.cs @@ -1,4 +1,7 @@ -using System.Runtime.CompilerServices; +#if DISABLE_DEBUG +#undef DEBUG +#endif +using System.Runtime.CompilerServices; using UnityEngine; namespace DCFApixels diff --git a/Runtime/Gizmos/Text/TextGizmo.cs b/Runtime/Gizmos/Text/TextGizmo.cs index 39fe744..e5463db 100644 --- a/Runtime/Gizmos/Text/TextGizmo.cs +++ b/Runtime/Gizmos/Text/TextGizmo.cs @@ -1,10 +1,13 @@ -using DCFApixels.DebugXCore; -using System.Runtime.CompilerServices; -//#if UNITY_EDITOR +#if DISABLE_DEBUG +#undef DEBUG +#endif +#if UNITY_EDITOR using UnityEditor; +#endif +using DCFApixels.DebugXCore; +using System.Runtime.CompilerServices; using UnityEngine; using UnityEngine.Rendering; -//#endif namespace DCFApixels { diff --git a/Runtime/Utils/DebugXUtility.cs b/Runtime/Utils/DebugXUtility.cs index 57f3d0b..3c7128d 100644 --- a/Runtime/Utils/DebugXUtility.cs +++ b/Runtime/Utils/DebugXUtility.cs @@ -1,11 +1,14 @@ -using System; +#if DISABLE_DEBUG +#undef DEBUG +#endif +#if UNITY_EDITOR +using UnityEditor; +#endif +using System; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using UnityEngine; -#if UNITY_EDITOR -using UnityEditor; -#endif namespace DCFApixels.DebugXCore { diff --git a/Runtime/Utils/GizmosList.cs b/Runtime/Utils/GizmosList.cs index a7b5b3c..ba161e0 100644 --- a/Runtime/Utils/GizmosList.cs +++ b/Runtime/Utils/GizmosList.cs @@ -1,5 +1,6 @@ -#undef DEBUG - +#if DISABLE_DEBUG +#undef DEBUG +#endif #if DEBUG #define DEV_MODE #endif