mirror of
https://github.com/DCFApixels/Unity-DebugX.git
synced 2025-09-17 17:34:35 +08:00
Update DebugX.globals.cs
This commit is contained in:
parent
8743b77dfa
commit
e6e010641f
@ -1,11 +1,12 @@
|
|||||||
using UnityEditor;
|
using UnityEngine;
|
||||||
using UnityEngine;
|
#if UNITY_EDITOR
|
||||||
|
using UnityEditor;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace DCFApixels
|
namespace DCFApixels
|
||||||
{
|
{
|
||||||
public static unsafe partial class DebugX
|
public static unsafe partial class DebugX
|
||||||
{
|
{
|
||||||
#region Globals
|
|
||||||
private const string GlobalTimeScalePrefName = "DCFApixels.DebugX.TimeScale";
|
private const string GlobalTimeScalePrefName = "DCFApixels.DebugX.TimeScale";
|
||||||
private static float _timeScaleCache;
|
private static float _timeScaleCache;
|
||||||
public static float GlobalTimeScale
|
public static float GlobalTimeScale
|
||||||
@ -60,13 +61,13 @@ namespace DCFApixels
|
|||||||
EditorPrefs.DeleteKey(GlobalTimeScalePrefName);
|
EditorPrefs.DeleteKey(GlobalTimeScalePrefName);
|
||||||
EditorPrefs.DeleteKey(GlobalDotSizePrefName);
|
EditorPrefs.DeleteKey(GlobalDotSizePrefName);
|
||||||
EditorPrefs.DeleteKey(GlobalColorPrefName);
|
EditorPrefs.DeleteKey(GlobalColorPrefName);
|
||||||
|
#endif
|
||||||
_dotSizeCache = default;
|
_dotSizeCache = default;
|
||||||
_timeScaleCache = default;
|
_timeScaleCache = default;
|
||||||
_globalColorCache = default;
|
_globalColorCache = default;
|
||||||
InitGlobals();
|
InitGlobals();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
public static void InitGlobals()
|
private static void InitGlobals()
|
||||||
{
|
{
|
||||||
GlobalTimeScale = 1;
|
GlobalTimeScale = 1;
|
||||||
GlobalDotSize = 1;
|
GlobalDotSize = 1;
|
||||||
@ -78,6 +79,5 @@ namespace DCFApixels
|
|||||||
GlobalColor = (Color)(*(Color32*)&colorCode);
|
GlobalColor = (Color)(*(Color32*)&colorCode);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user