diff --git a/Assets/DemoGame/GameScript/Hotfix/Log.meta b/Assets/DemoGame/GameScript/Hotfix/GFLog.meta
similarity index 100%
rename from Assets/DemoGame/GameScript/Hotfix/Log.meta
rename to Assets/DemoGame/GameScript/Hotfix/GFLog.meta
diff --git a/Assets/DemoGame/GameScript/Hotfix/GFLog/GameFrameworkLog.cs b/Assets/DemoGame/GameScript/Hotfix/GFLog/GameFrameworkLog.cs
new file mode 100644
index 0000000..a048831
--- /dev/null
+++ b/Assets/DemoGame/GameScript/Hotfix/GFLog/GameFrameworkLog.cs
@@ -0,0 +1,202 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ZFramework
+{
+ public static partial class GameFrameworkLog
+ {
+ private static ILogHelper s_LogHelper = null;
+
+ ///
+ /// 设置框架日志辅助器
+ ///
+ ///
+ public static void SetLogHelper(ILogHelper logHelper)
+ {
+ s_LogHelper = logHelper;
+ }
+
+ ///
+ /// 打印调试级别日志,用于记录调试类日志信息。
+ ///
+ /// 日志内容。
+ public static void Debug(object message)
+ {
+ if (s_LogHelper == null)
+ {
+ return;
+ }
+ s_LogHelper.Log(GameFrameworkLogLevel.Debug, message);
+ }
+
+ ///
+ /// 打印调试级别日志,用于记录调试类日志信息。
+ ///
+ /// 日志内容。
+ public static void Debug(string message)
+ {
+ if (s_LogHelper == null)
+ {
+ return;
+ }
+ s_LogHelper.Log(GameFrameworkLogLevel.Debug, message);
+ }
+
+ //暂时保留,有需要再来缝补
+ //public static void Debug(string format,T arg)
+ //{
+ // if (s_LogHelper==null)
+ // {
+ // return;
+ // }
+ // s_LogHelper.Log(GameFrameworkLogLevel.Debug, Utility.Text.Format(format, arg));
+ //}
+
+
+
+ ///
+ /// 打印信息级别日志,用于记录程序正常运行日志信息。
+ ///
+ /// 日志内容。
+ public static void Info(object message)
+ {
+ if (s_LogHelper == null)
+ {
+ return;
+ }
+ s_LogHelper.Log(GameFrameworkLogLevel.Info, message);
+ }
+
+ ///
+ /// 打印信息级别日志,用于记录程序正常运行日志信息。
+ ///
+ /// 日志内容。
+ public static void Info(string message)
+ {
+ if (s_LogHelper == null)
+ {
+ return;
+ }
+
+ s_LogHelper.Log(GameFrameworkLogLevel.Info, message);
+ }
+
+ //暂时保留,有需要再来缝补
+ /////
+ ///// 打印信息级别日志,用于记录程序正常运行日志信息。
+ /////
+ ///// 日志参数的类型。
+ ///// 日志格式。
+ ///// 日志参数。
+ //public static void Info(string format, T arg)
+ //{
+ // if (s_LogHelper == null)
+ // {
+ // return;
+ // }
+
+ // s_LogHelper.Log(GameFrameworkLogLevel.Info, Utility.Text.Format(format, arg));
+ //}
+
+
+
+
+
+ ///
+ /// 打印警告级别日志,建议在发生局部功能逻辑错误,但尚不会导致游戏崩溃或异常时使用。
+ ///
+ ///
+ public static void Warning(object message)
+ {
+ if (s_LogHelper == null)
+ {
+ return;
+ }
+ s_LogHelper.Log(GameFrameworkLogLevel.Info, message);
+ }
+
+ ///
+ /// 打印警告级别日志,建议在发生局部功能逻辑错误,但尚不会导致游戏崩溃或异常时使用。
+ ///
+ /// 日志内容。
+ public static void Warning(string message)
+ {
+ if (s_LogHelper == null)
+ {
+ return;
+ }
+
+ s_LogHelper.Log(GameFrameworkLogLevel.Warning, message);
+ }
+
+
+
+
+
+
+ ///
+ /// 打印错误级别日志,建议在发生功能逻辑错误,但尚不会导致游戏崩溃或异常时使用。
+ ///
+ /// 日志内容。
+ public static void Error(object message)
+ {
+ if (s_LogHelper == null)
+ {
+ return;
+ }
+
+ s_LogHelper.Log(GameFrameworkLogLevel.Error, message);
+ }
+ ///
+ /// 打印错误级别日志,建议在发生功能逻辑错误,但尚不会导致游戏崩溃或异常时使用。
+ ///
+ /// 日志内容。
+ public static void Error(string message)
+ {
+ if (s_LogHelper == null)
+ {
+ return;
+ }
+
+ s_LogHelper.Log(GameFrameworkLogLevel.Error, message);
+ }
+
+
+
+
+
+
+
+ ///
+ /// 打印严重错误级别日志,建议在发生严重错误,可能导致游戏崩溃或异常时使用,此时应尝试重启进程或重建游戏框架。
+ ///
+ /// 日志内容。
+ public static void Fatal(object message)
+ {
+ if (s_LogHelper == null)
+ {
+ return;
+ }
+
+ s_LogHelper.Log(GameFrameworkLogLevel.Fatal, message);
+ }
+
+ ///
+ /// 打印严重错误级别日志,建议在发生严重错误,可能导致游戏崩溃或异常时使用,此时应尝试重启进程或重建游戏框架。
+ ///
+ /// 日志内容。
+ public static void Fatal(string message)
+ {
+ if (s_LogHelper == null)
+ {
+ return;
+ }
+
+ s_LogHelper.Log(GameFrameworkLogLevel.Fatal, message);
+ }
+
+ }
+}
diff --git a/Assets/DemoGame/GameScript/Hotfix/GFLog/GameFrameworkLog.cs.meta b/Assets/DemoGame/GameScript/Hotfix/GFLog/GameFrameworkLog.cs.meta
new file mode 100644
index 0000000..dcda3f0
--- /dev/null
+++ b/Assets/DemoGame/GameScript/Hotfix/GFLog/GameFrameworkLog.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 50be90d24e7e7e44c8bed52815de32e1
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/DemoGame/GameScript/Hotfix/GFLog/GameFrameworkLogLevel.cs b/Assets/DemoGame/GameScript/Hotfix/GFLog/GameFrameworkLogLevel.cs
new file mode 100644
index 0000000..716a3a2
--- /dev/null
+++ b/Assets/DemoGame/GameScript/Hotfix/GFLog/GameFrameworkLogLevel.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ZFramework
+{
+ public enum GameFrameworkLogLevel : byte
+ {
+ ///
+ /// 调试。
+ ///
+ Debug = 0,
+
+ ///
+ /// 信息。
+ ///
+ Info,
+
+ ///
+ /// 警告。
+ ///
+ Warning,
+
+ ///
+ /// 错误。
+ ///
+ Error,
+
+ ///
+ /// 严重错误。
+ ///
+ Fatal
+ }
+}
diff --git a/Assets/DemoGame/GameScript/Hotfix/GFLog/GameFrameworkLogLevel.cs.meta b/Assets/DemoGame/GameScript/Hotfix/GFLog/GameFrameworkLogLevel.cs.meta
new file mode 100644
index 0000000..a1c2ce1
--- /dev/null
+++ b/Assets/DemoGame/GameScript/Hotfix/GFLog/GameFrameworkLogLevel.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: dac4ce4d055272846a55b555e1d66530
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/DemoGame/GameScript/Hotfix/GFLog/ILogHelper.cs b/Assets/DemoGame/GameScript/Hotfix/GFLog/ILogHelper.cs
new file mode 100644
index 0000000..4411ab0
--- /dev/null
+++ b/Assets/DemoGame/GameScript/Hotfix/GFLog/ILogHelper.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ZFramework
+{
+ public static partial class GameFrameworkLog
+ {
+ ///
+ /// 框架日志辅助器接口。
+ ///
+ public interface ILogHelper
+ {
+ ///
+ /// 记录日志。
+ ///
+ /// 游戏框架日志等级。
+ /// 日志内容。
+ void Log(GameFrameworkLogLevel level, object message);
+ }
+ }
+}
diff --git a/Assets/DemoGame/GameScript/Hotfix/GFLog/ILogHelper.cs.meta b/Assets/DemoGame/GameScript/Hotfix/GFLog/ILogHelper.cs.meta
new file mode 100644
index 0000000..38a96ba
--- /dev/null
+++ b/Assets/DemoGame/GameScript/Hotfix/GFLog/ILogHelper.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 973fffb170e74df418838cc2b5543f25
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/DemoGame/GameScript/Hotfix/GFLog/Log.cs b/Assets/DemoGame/GameScript/Hotfix/GFLog/Log.cs
new file mode 100644
index 0000000..b7d9e60
--- /dev/null
+++ b/Assets/DemoGame/GameScript/Hotfix/GFLog/Log.cs
@@ -0,0 +1,174 @@
+using System;
+using System.Diagnostics;
+
+namespace ZFramework.Runtime
+{
+ public static class Log
+ {
+ ///
+ /// 打印调试级别日志,用于记录调试类日志信息。
+ ///
+ /// 日志内容。
+ /// 仅在带有 ENABLE_LOG、ENABLE_DEBUG_LOG 或 ENABLE_DEBUG_AND_ABOVE_LOG 预编译选项时生效。
+ [Conditional("ENABLE_LOG")]
+ [Conditional("ENABLE_DEBUG_LOG")]
+ [Conditional("ENABLE_DEBUG_AND_ABOVE_LOG")]
+ public static void Debug(object message)
+ {
+ GameFrameworkLog.Debug(message);
+ }
+
+ ///
+ /// 打印调试级别日志,用于记录调试类日志信息。
+ ///
+ /// 日志内容。
+ /// 仅在带有 ENABLE_LOG、ENABLE_DEBUG_LOG 或 ENABLE_DEBUG_AND_ABOVE_LOG 预编译选项时生效。
+ [Conditional("ENABLE_LOG")]
+ [Conditional("ENABLE_DEBUG_LOG")]
+ [Conditional("ENABLE_DEBUG_AND_ABOVE_LOG")]
+ public static void Debug(string message)
+ {
+ GameFrameworkLog.Debug(message);
+ }
+
+
+
+
+
+ ///
+ /// 打印信息级别日志,用于记录程序正常运行日志信息。
+ ///
+ /// 日志内容。
+ /// 仅在带有 ENABLE_LOG、ENABLE_INFO_LOG、ENABLE_DEBUG_AND_ABOVE_LOG 或 ENABLE_INFO_AND_ABOVE_LOG 预编译选项时生效。
+ [Conditional("ENABLE_LOG")]
+ [Conditional("ENABLE_INFO_LOG")]
+ [Conditional("ENABLE_DEBUG_AND_ABOVE_LOG")]
+ [Conditional("ENABLE_INFO_AND_ABOVE_LOG")]
+ public static void Info(object message)
+ {
+ GameFrameworkLog.Info(message);
+ }
+
+ ///
+ /// 打印信息级别日志,用于记录程序正常运行日志信息。
+ ///
+ /// 日志内容。
+ /// 仅在带有 ENABLE_LOG、ENABLE_INFO_LOG、ENABLE_DEBUG_AND_ABOVE_LOG 或 ENABLE_INFO_AND_ABOVE_LOG 预编译选项时生效。
+ [Conditional("ENABLE_LOG")]
+ [Conditional("ENABLE_INFO_LOG")]
+ [Conditional("ENABLE_DEBUG_AND_ABOVE_LOG")]
+ [Conditional("ENABLE_INFO_AND_ABOVE_LOG")]
+ public static void Info(string message)
+ {
+ GameFrameworkLog.Info(message);
+ }
+
+
+
+
+
+ ///
+ /// 打印警告级别日志,建议在发生局部功能逻辑错误,但尚不会导致游戏崩溃或异常时使用。
+ ///
+ /// 日志内容。
+ /// 仅在带有 ENABLE_LOG、ENABLE_WARNING_LOG、ENABLE_DEBUG_AND_ABOVE_LOG、ENABLE_INFO_AND_ABOVE_LOG 或 ENABLE_WARNING_AND_ABOVE_LOG 预编译选项时生效。
+ [Conditional("ENABLE_LOG")]
+ [Conditional("ENABLE_WARNING_LOG")]
+ [Conditional("ENABLE_DEBUG_AND_ABOVE_LOG")]
+ [Conditional("ENABLE_INFO_AND_ABOVE_LOG")]
+ [Conditional("ENABLE_WARNING_AND_ABOVE_LOG")]
+ public static void Warning(object message)
+ {
+ GameFrameworkLog.Warning(message);
+ }
+
+ ///
+ /// 打印警告级别日志,建议在发生局部功能逻辑错误,但尚不会导致游戏崩溃或异常时使用。
+ ///
+ /// 日志内容。
+ /// 仅在带有 ENABLE_LOG、ENABLE_WARNING_LOG、ENABLE_DEBUG_AND_ABOVE_LOG、ENABLE_INFO_AND_ABOVE_LOG 或 ENABLE_WARNING_AND_ABOVE_LOG 预编译选项时生效。
+ [Conditional("ENABLE_LOG")]
+ [Conditional("ENABLE_WARNING_LOG")]
+ [Conditional("ENABLE_DEBUG_AND_ABOVE_LOG")]
+ [Conditional("ENABLE_INFO_AND_ABOVE_LOG")]
+ [Conditional("ENABLE_WARNING_AND_ABOVE_LOG")]
+ public static void Warning(string message)
+ {
+ GameFrameworkLog.Warning(message);
+ }
+
+
+
+
+
+ ///
+ /// 打印错误级别日志,建议在发生功能逻辑错误,但尚不会导致游戏崩溃或异常时使用。
+ ///
+ /// 日志内容。
+ /// 仅在带有 ENABLE_LOG、ENABLE_ERROR_LOG、ENABLE_DEBUG_AND_ABOVE_LOG、ENABLE_INFO_AND_ABOVE_LOG、ENABLE_WARNING_AND_ABOVE_LOG 或 ENABLE_ERROR_AND_ABOVE_LOG 预编译选项时生效。
+ [Conditional("ENABLE_LOG")]
+ [Conditional("ENABLE_ERROR_LOG")]
+ [Conditional("ENABLE_DEBUG_AND_ABOVE_LOG")]
+ [Conditional("ENABLE_INFO_AND_ABOVE_LOG")]
+ [Conditional("ENABLE_WARNING_AND_ABOVE_LOG")]
+ [Conditional("ENABLE_ERROR_AND_ABOVE_LOG")]
+ public static void Error(object message)
+ {
+ GameFrameworkLog.Error(message);
+ }
+
+ ///
+ /// 打印错误级别日志,建议在发生功能逻辑错误,但尚不会导致游戏崩溃或异常时使用。
+ ///
+ /// 日志内容。
+ /// 仅在带有 ENABLE_LOG、ENABLE_ERROR_LOG、ENABLE_DEBUG_AND_ABOVE_LOG、ENABLE_INFO_AND_ABOVE_LOG、ENABLE_WARNING_AND_ABOVE_LOG 或 ENABLE_ERROR_AND_ABOVE_LOG 预编译选项时生效。
+ [Conditional("ENABLE_LOG")]
+ [Conditional("ENABLE_ERROR_LOG")]
+ [Conditional("ENABLE_DEBUG_AND_ABOVE_LOG")]
+ [Conditional("ENABLE_INFO_AND_ABOVE_LOG")]
+ [Conditional("ENABLE_WARNING_AND_ABOVE_LOG")]
+ [Conditional("ENABLE_ERROR_AND_ABOVE_LOG")]
+ public static void Error(string message)
+ {
+ GameFrameworkLog.Error(message);
+ }
+
+
+
+
+
+ ///
+ /// 打印严重错误级别日志,建议在发生严重错误,可能导致游戏崩溃或异常时使用,此时应尝试重启进程或重建游戏框架。
+ ///
+ /// 日志内容。
+ /// 仅在带有 ENABLE_LOG、ENABLE_FATAL_LOG、ENABLE_DEBUG_AND_ABOVE_LOG、ENABLE_INFO_AND_ABOVE_LOG、ENABLE_WARNING_AND_ABOVE_LOG、ENABLE_ERROR_AND_ABOVE_LOG 或 ENABLE_FATAL_AND_ABOVE_LOG 预编译选项时生效。
+ [Conditional("ENABLE_LOG")]
+ [Conditional("ENABLE_FATAL_LOG")]
+ [Conditional("ENABLE_DEBUG_AND_ABOVE_LOG")]
+ [Conditional("ENABLE_INFO_AND_ABOVE_LOG")]
+ [Conditional("ENABLE_WARNING_AND_ABOVE_LOG")]
+ [Conditional("ENABLE_ERROR_AND_ABOVE_LOG")]
+ [Conditional("ENABLE_FATAL_AND_ABOVE_LOG")]
+ public static void Fatal(object message)
+ {
+ GameFrameworkLog.Fatal(message);
+ }
+
+ ///
+ /// 打印严重错误级别日志,建议在发生严重错误,可能导致游戏崩溃或异常时使用,此时应尝试重启进程或重建游戏框架。
+ ///
+ /// 日志内容。
+ /// 仅在带有 ENABLE_LOG、ENABLE_FATAL_LOG、ENABLE_DEBUG_AND_ABOVE_LOG、ENABLE_INFO_AND_ABOVE_LOG、ENABLE_WARNING_AND_ABOVE_LOG、ENABLE_ERROR_AND_ABOVE_LOG 或 ENABLE_FATAL_AND_ABOVE_LOG 预编译选项时生效。
+ [Conditional("ENABLE_LOG")]
+ [Conditional("ENABLE_FATAL_LOG")]
+ [Conditional("ENABLE_DEBUG_AND_ABOVE_LOG")]
+ [Conditional("ENABLE_INFO_AND_ABOVE_LOG")]
+ [Conditional("ENABLE_WARNING_AND_ABOVE_LOG")]
+ [Conditional("ENABLE_ERROR_AND_ABOVE_LOG")]
+ [Conditional("ENABLE_FATAL_AND_ABOVE_LOG")]
+ public static void Fatal(string message)
+ {
+ GameFrameworkLog.Fatal(message);
+ }
+ }
+}
diff --git a/Assets/DemoGame/GameScript/Hotfix/GFLog/Log.cs.meta b/Assets/DemoGame/GameScript/Hotfix/GFLog/Log.cs.meta
new file mode 100644
index 0000000..ada6e65
--- /dev/null
+++ b/Assets/DemoGame/GameScript/Hotfix/GFLog/Log.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: fc22ee3dac7343c4b930dd13598d98de
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant: