1
This commit is contained in:
@@ -26,9 +26,9 @@ namespace BITKit
|
||||
public static event Action OnNextLine;
|
||||
private static Type currentType;
|
||||
#if UNITY_64
|
||||
[HideInCallstack]
|
||||
//[HideInCallstack]
|
||||
#endif
|
||||
public static void Log(object x, int debugLevel = 0, ConsoleColor color = ConsoleColor.White)
|
||||
public static void Log(object x, ConsoleColor color = ConsoleColor.White)
|
||||
{
|
||||
OnSetConsoleColor?.Invoke(color);
|
||||
OnLog?.Invoke(x?.ToString());
|
||||
@@ -36,16 +36,16 @@ namespace BITKit
|
||||
#if UNITY_64
|
||||
[HideInCallstack]
|
||||
#endif
|
||||
public static void Log<T>(object x, int debugLevel = 0, ConsoleColor color = ConsoleColor.White)
|
||||
public static void Log<T>(object x, ConsoleColor color = ConsoleColor.White)
|
||||
{
|
||||
if (currentType != typeof(T))
|
||||
{
|
||||
OnNextLine?.Invoke();
|
||||
}
|
||||
#if NET5_0_OR_GREATER
|
||||
Log($"[{DateTime.Now}]{typeof(T).Name}:{x}", debugLevel);
|
||||
Log($"[{DateTime.Now}]{typeof(T).Name}:{x}");
|
||||
#else
|
||||
Log($"{typeof(T).Name}:{x}", debugLevel);
|
||||
Log($"{typeof(T).Name}:{x}");
|
||||
#endif
|
||||
|
||||
currentType = typeof(T);
|
||||
@@ -60,16 +60,16 @@ namespace BITKit
|
||||
#if UNITY_64
|
||||
[HideInCallstack]
|
||||
#endif
|
||||
public static void Warning(object x, int debugLevel = 0)
|
||||
public static void Warning(object x)
|
||||
{
|
||||
OnWarning?.Invoke(x.ToString());
|
||||
}
|
||||
#if UNITY_64
|
||||
[HideInCallstack]
|
||||
#endif
|
||||
public static void Warning<T>(object x, int debugLevel = 0)
|
||||
public static void Warning<T>(object x)
|
||||
{
|
||||
Warning($"{typeof(T).Name}:{x}", debugLevel);
|
||||
Warning($"{typeof(T).Name}:{x}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user