This commit is contained in:
CortexCore
2024-06-20 17:28:56 +08:00
parent 554af9ca4e
commit 0423dc7c48
6 changed files with 213 additions and 73 deletions

View File

@@ -20,8 +20,11 @@ namespace BITKit
}
#endif
public static event Action<string> OnLog;
public static event Action<string,Type> OnLogCallback;
public static event Action<Exception> OnException;
public static event Action<Exception,Type> OnExceptionCallback;
public static event Action<string> OnWarning;
public static event Action<string,Type> OnWarningCallback;
public static event Action<ConsoleColor> OnSetConsoleColor;
public static event Action OnNextLine;
private static Type currentType;
@@ -32,6 +35,7 @@ namespace BITKit
{
OnSetConsoleColor?.Invoke(color);
OnLog?.Invoke(x?.ToString());
OnLogCallback?.Invoke(x?.ToString(),currentType);
}
#if UNITY_5_3_OR_NEWER
[HideInCallstack]