فهرست منبع

修复协议生成工具命名空间错误

tanghai 8 سال پیش
والد
کامیت
bec9e51481

+ 1 - 0
Server/Model/Module/Message/InnerMessage.cs

@@ -1,4 +1,5 @@
 using ProtoBuf;
+using ETModel;
 using System.Collections.Generic;
 using MongoDB.Bson.Serialization.Attributes;
 namespace ETModel

+ 3 - 3
Unity/Assets/Editor/Proto2CsEditor/Proto2CSEditor.cs

@@ -42,7 +42,7 @@ namespace MyEditor
 			GenerateOpcode("InnerOpcode", innerOutPath);
 
 			msgOpcode.Clear();
-			Proto2CS("Hotfix", "HotfixMessage.proto", hotfixOutPath, "HotfixOpcode", 10000, HeadFlag.Bson);
+			Proto2CS("ETHotfix", "HotfixMessage.proto", hotfixOutPath, "HotfixOpcode", 10000, HeadFlag.Bson);
 			GenerateOpcode("HotfixOpcode", hotfixOutPath);
 			
 			AssetDatabase.Refresh();
@@ -60,9 +60,9 @@ namespace MyEditor
 			StringBuilder sb = new StringBuilder();
 			sb.Append("using ProtoBuf;\n");
 			sb.Append("using ETModel;\n");
-			if (ns == "Hotfix")
+			if (ns == "ETHotfix")
 			{
-				sb.Append("using Hotfix;\n");
+				sb.Append("using ETHotfix;\n");
 			}
 
 			sb.Append("using System.Collections.Generic;\n");

+ 1 - 1
Unity/Assets/Scripts/Module/Message/AMHandler.cs

@@ -2,7 +2,7 @@
 
 namespace ETModel
 {
-	public abstract class AMHandler<Message> : IMHandler where Message : MessageObject
+	public abstract class AMHandler<Message> : IMHandler where Message: class
 	{
 		protected abstract void Run(Session session, Message message);