From fbb26ea9ea3b85e7e873153f4e6ab8fbe7e2c9d0 Mon Sep 17 00:00:00 2001 From: ALEXTANG <574809918@qq.com> Date: Thu, 13 Jul 2023 18:20:39 +0800 Subject: [PATCH] Update Update --- Assets/GameScripts/DotNet/Core/Log/Log.cs | 4 ++++ .../DotNet/Core/Singleton/Singleton.cs | 20 +++++++++++++++++++ .../HotFix/GameProto/GameProto.asmdef | 5 ++++- DotNet/App/TEngineSettings.json | 20 +++++++++---------- 4 files changed, 38 insertions(+), 11 deletions(-) diff --git a/Assets/GameScripts/DotNet/Core/Log/Log.cs b/Assets/GameScripts/DotNet/Core/Log/Log.cs index c8246aa1..3d4e6f37 100644 --- a/Assets/GameScripts/DotNet/Core/Log/Log.cs +++ b/Assets/GameScripts/DotNet/Core/Log/Log.cs @@ -5,6 +5,10 @@ namespace TEngine { static Log() { + if (LogCore.Instance == null) + { + LogCore.TempInstance = new LogCore(); + } LogCore.Instance.ILog = new NLog("Server"); } diff --git a/Assets/GameScripts/DotNet/Core/Singleton/Singleton.cs b/Assets/GameScripts/DotNet/Core/Singleton/Singleton.cs index 8f8b5c48..b8439c6c 100644 --- a/Assets/GameScripts/DotNet/Core/Singleton/Singleton.cs +++ b/Assets/GameScripts/DotNet/Core/Singleton/Singleton.cs @@ -17,6 +17,26 @@ namespace TEngine.Core AssemblyManager.OnUnLoadAssemblyEvent += OnUnLoad; } + /// + /// 特殊情况调用设置。 + /// + public static T TempInstance + { + get + { + return Instance; + } + set + { + if (Instance != null) + { + return; + } + + Instance = value; + } + } + public virtual Task Initialize() { return Task.CompletedTask; diff --git a/Assets/GameScripts/HotFix/GameProto/GameProto.asmdef b/Assets/GameScripts/HotFix/GameProto/GameProto.asmdef index 8cc30356..06eb4083 100644 --- a/Assets/GameScripts/HotFix/GameProto/GameProto.asmdef +++ b/Assets/GameScripts/HotFix/GameProto/GameProto.asmdef @@ -3,7 +3,10 @@ "rootNamespace": "", "references": [ "GUID:08c3762f54316454ca6b6fbcb22b40e5", - "GUID:aa06d4cc755c979489c256c1bcca1dfb" + "GUID:aa06d4cc755c979489c256c1bcca1dfb", + "GUID:d020df1f2b63b444e8ca93c0d88597e2", + "GUID:ecba4a58c7f7a4842b72ce2c77aecf9b", + "GUID:d8b63aba1907145bea998dd612889d6b" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/DotNet/App/TEngineSettings.json b/DotNet/App/TEngineSettings.json index 8994754d..f0ec0faa 100644 --- a/DotNet/App/TEngineSettings.json +++ b/DotNet/App/TEngineSettings.json @@ -1,27 +1,27 @@ { "Export": { "ProtoBufTemplatePath": { - "Value": "../Config/Template/ProtoTemplate.txt", + "Value": "../../../Config/Template/ProtoTemplate.txt", "Comment": "ProtoBuf生成代码模板的位置" }, "ProtoBufDirectory": { - "Value": "../Config/ProtoBuf/", + "Value": "../../../Config/ProtoBuf/", "Comment": "ProtoBuf文件所在的位置文件夹位置" }, "ProtoBufServerDirectory": { - "Value": "../../Assets/GameScripts/DotNet/Logic/Generate~/NetworkProtocol/", + "Value": "../../../../Assets/GameScripts/DotNet/Logic/Generate~/NetworkProtocol/", "Comment": "ProtoBuf生成到服务端的文件夹位置" }, "ProtoBufClientDirectory": { - "Value": "../../Assets/GameScripts/HotFix/GameProto/GameProtocol/", + "Value": "../../../../Assets/GameScripts/HotFix/GameProto/GameProtocol/", "Comment": "ProtoBuf生成到客户端的文件夹位置" }, "ExcelProgramPath": { - "Value": "../Config/Excel/", + "Value": "../../../Config/Excel/", "Comment": "Excel配置文件根目录" }, "ExcelVersionFile": { - "Value": ".../Config/Excel/Version.txt", + "Value": ".../../../Config/Excel/Version.txt", "Comment": "Excel版本文件的位置" }, "ExcelServerFileDirectory": { @@ -33,7 +33,7 @@ "Comment": "Excel生成客户端代码文件夹位置" }, "ExcelServerBinaryDirectory": { - "Value": "../Config/Binary/", + "Value": "../../../Config/Binary/", "Comment": "Excel生成服务器二进制数据文件夹位置" }, "ExcelClientBinaryDirectory": { @@ -41,15 +41,15 @@ "Comment": "Excel生成客户端二进制数据文件夹位置" }, "ExcelServerJsonDirectory": { - "Value": "../Config/Json/Server/", + "Value": "../../../Config/Json/Server/", "Comment": "Excel生成服务器Json数据文件夹位置" }, "ExcelClientJsonDirectory": { - "Value": "../Config/Json/Client/", + "Value": "../../../Config/Json/Client/", "Comment": "Excel生成客户端Json数据文件夹位置" }, "ExcelTemplatePath": { - "Value": "../Config/Template/ExcelTemplate.txt", + "Value": "../../../Config/Template/ExcelTemplate.txt", "Comment": "Excel生成代码模板的位置" }, "ServerCustomExportDirectory": {