Created
December 11, 2019 15:05
-
-
Save WikkidEdd/3379578b12b5eb3b313c396298268be8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
#if DISABLE_DEBUG_LOG | |
public static class Debug | |
{ | |
public static new void Log(object message) | |
{ | |
#if !DISABLE_DEBUG_LOG | |
UnityEngine.Debug.Log(message); | |
#endif | |
} | |
public static new void Log(object message, Object context) | |
{ | |
#if !DISABLE_DEBUG_LOG | |
UnityEngine.Debug.Log(message, context); | |
#endif | |
} | |
public static new void LogError(object message) | |
{ | |
#if !DISABLE_DEBUG_LOG | |
UnityEngine.Debug.LogError(message); | |
#endif | |
} | |
public static new void LogError(object message, Object context) | |
{ | |
#if !DISABLE_DEBUG_LOG | |
UnityEngine.Debug.LogError(message, context); | |
#endif | |
} | |
public static new void LogWarning(object message) | |
{ | |
#if !DISABLE_DEBUG_LOG | |
UnityEngine.Debug.LogWarning(message); | |
#endif | |
} | |
public static new void LogWarning(object message, Object context) | |
{ | |
#if !DISABLE_DEBUG_LOG | |
UnityEngine.Debug.LogWarning(message, context); | |
#endif | |
} | |
static public void DrawLine (Vector3 start, Vector3 end, Color color, float duration = 0.0F, bool depthTest = true) | |
{ | |
#if !DISABLE_DEBUG_LOG | |
UnityEngine.Debug.DrawLine(start, end, color, duration, depthTest); | |
#endif | |
} | |
static public void LogException (System.Exception exception) | |
{ | |
#if !DISABLE_DEBUG_LOG | |
UnityEngine.Debug.LogException(exception); | |
#endif | |
} | |
public static void DrawRay (Vector3 start, Vector3 dir, Color color, float duration, bool depthTest) | |
{ | |
#if !DISABLE_DEBUG_LOG | |
Debug.DrawLine (start, start + dir, color, duration, depthTest); | |
#endif | |
} | |
static public void DrawRay (Vector3 start, Vector3 dir, Color color, float duration) | |
{ | |
#if !DISABLE_DEBUG_LOG | |
bool depthTest = true; | |
Debug.DrawRay (start, dir, color, duration, depthTest); | |
#endif | |
} | |
static public void DrawRay (Vector3 start, Vector3 dir, Color color) | |
{ | |
#if !DISABLE_DEBUG_LOG | |
bool depthTest = true; | |
float duration = 0f; | |
Debug.DrawRay (start, dir, color, duration, depthTest); | |
#endif | |
} | |
static public void DrawRay (Vector3 start, Vector3 dir) | |
{ | |
#if !DISABLE_DEBUG_LOG | |
bool depthTest = true; | |
float duration = 0f; | |
Color white = Color.white; | |
Debug.DrawRay (start, dir, white, duration, depthTest); | |
#endif | |
} | |
static public void Break () | |
{ | |
UnityEngine.Debug.Break (); | |
} | |
} | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment