93 lines
2.3 KiB
C#
93 lines
2.3 KiB
C#
using System;
|
|
using System.Diagnostics;
|
|
using Debug = UnityEngine.Debug;
|
|
|
|
public static class CDebug
|
|
{
|
|
public static bool isDebugBuild => Debug.isDebugBuild;
|
|
|
|
[Conditional("ENABLE_LOG_INFO")]
|
|
public static void Log(object message)
|
|
{
|
|
Debug.Log(message);
|
|
}
|
|
|
|
[Conditional("ENABLE_LOG_INFO")]
|
|
public static void Log(object message, UnityEngine.Object context)
|
|
{
|
|
Debug.Log(message, context);
|
|
}
|
|
|
|
[Conditional("ENABLE_LOG_INFO")]
|
|
public static void LogWarning(object message)
|
|
{
|
|
Debug.LogWarning(message);
|
|
}
|
|
|
|
[Conditional("ENABLE_LOG_INFO")]
|
|
public static void LogWarning(object message, UnityEngine.Object context)
|
|
{
|
|
Debug.LogWarning(message, context);
|
|
}
|
|
|
|
[Conditional("ENABLE_LOG_ERROR")]
|
|
public static void LogError(object message)
|
|
{
|
|
Debug.LogError(message);
|
|
}
|
|
|
|
[Conditional("ENABLE_LOG_ERROR")]
|
|
public static void LogError(object message, UnityEngine.Object context)
|
|
{
|
|
Debug.LogError(message);
|
|
}
|
|
|
|
[Conditional("ENABLE_LOG_ERROR")]
|
|
public static void Assert(bool conditional)
|
|
{
|
|
Debug.Assert(conditional);
|
|
}
|
|
|
|
[Conditional("ENABLE_LOG_ERROR")]
|
|
public static void Assert(bool conditional, object message)
|
|
{
|
|
Debug.Assert(conditional, message);
|
|
}
|
|
|
|
[Conditional("ENABLE_LOG_ERROR")]
|
|
public static void Assert(bool conditional, string message)
|
|
{
|
|
Debug.Assert(conditional, message);
|
|
}
|
|
|
|
[Conditional("ENABLE_LOG_ERROR")]
|
|
public static void Assert(bool conditional, UnityEngine.Object context)
|
|
{
|
|
Debug.Assert(conditional, context);
|
|
}
|
|
|
|
[Conditional("ENABLE_LOG_ERROR")]
|
|
public static void Assert(bool conditional, object message, UnityEngine.Object context)
|
|
{
|
|
Debug.Assert(conditional, message, context);
|
|
}
|
|
|
|
[Conditional("ENABLE_LOG_ERROR")]
|
|
public static void Assert(bool conditional, string message, UnityEngine.Object context)
|
|
{
|
|
Debug.Assert(conditional, message, context);
|
|
}
|
|
|
|
[Conditional("ENABLE_LOG_ERROR")]
|
|
public static void LogException(Exception exception)
|
|
{
|
|
Debug.LogException(exception);
|
|
}
|
|
|
|
[Conditional("ENABLE_LOG_ERROR")]
|
|
public static void LogException(Exception exception, UnityEngine.Object context)
|
|
{
|
|
Debug.LogException(exception, context);
|
|
}
|
|
}
|