From e6e010641fc179bac41b5fb7fd1dc3dea6a59dce Mon Sep 17 00:00:00 2001 From: DCFApixels <99481254+DCFApixels@users.noreply.github.com> Date: Mon, 24 Feb 2025 13:20:06 +0800 Subject: [PATCH] Update DebugX.globals.cs --- Runtime/DebugX.globals.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Runtime/DebugX.globals.cs b/Runtime/DebugX.globals.cs index 6f12871..50a4237 100644 --- a/Runtime/DebugX.globals.cs +++ b/Runtime/DebugX.globals.cs @@ -1,11 +1,12 @@ -using UnityEditor; -using UnityEngine; +using UnityEngine; +#if UNITY_EDITOR +using UnityEditor; +#endif namespace DCFApixels { public static unsafe partial class DebugX { - #region Globals private const string GlobalTimeScalePrefName = "DCFApixels.DebugX.TimeScale"; private static float _timeScaleCache; public static float GlobalTimeScale @@ -60,13 +61,13 @@ namespace DCFApixels EditorPrefs.DeleteKey(GlobalTimeScalePrefName); EditorPrefs.DeleteKey(GlobalDotSizePrefName); EditorPrefs.DeleteKey(GlobalColorPrefName); +#endif _dotSizeCache = default; _timeScaleCache = default; _globalColorCache = default; InitGlobals(); -#endif } - public static void InitGlobals() + private static void InitGlobals() { GlobalTimeScale = 1; GlobalDotSize = 1; @@ -78,6 +79,5 @@ namespace DCFApixels GlobalColor = (Color)(*(Color32*)&colorCode); #endif } - #endregion } } \ No newline at end of file