From 0d385c9cb82fee37735372f358e64e01cbceb52f Mon Sep 17 00:00:00 2001 From: Sinai Date: Thu, 22 Apr 2021 19:12:16 +1000 Subject: [PATCH] Update ExplorerCore.cs --- src/ExplorerCore.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/ExplorerCore.cs b/src/ExplorerCore.cs index 7a7ecd0..ff69a01 100644 --- a/src/ExplorerCore.cs +++ b/src/ExplorerCore.cs @@ -84,19 +84,24 @@ namespace UnityExplorer #region LOGGING public static void Log(object message) - => Log(message, LogType.Log, false); + => Log(message, LogType.Log); public static void LogWarning(object message) - => Log(message, LogType.Warning, false); + => Log(message, LogType.Warning); public static void LogError(object message) - => Log(message, LogType.Error, false); + => Log(message, LogType.Error); - internal static void Log(object message, LogType logType, bool isFromUnity = false) + public static void LogUnity(object message, LogType logType) { - if (isFromUnity && !ConfigManager.Log_Unity_Debug.Value) + if (!ConfigManager.Log_Unity_Debug.Value) return; + Log($"[Unity] {message}", logType); + } + + private static void Log(object message, LogType logType) + { string log = message?.ToString() ?? ""; switch (logType)