Procházet zdrojové kódy

增加测试用例框架,使用方法:
1.启动服务器: dotnet Server.dll --AppType=Server --Console=1
2.启动机器人: dotnet Robot.dll --AppType=Robot --Console=1
3.输入Robot回车,进入测试用例模式
4.Run 1 回车,执行1这个测试用例. RunAll指令依次执行所有测试用例

tanghai před 4 roky
rodič
revize
b82d7bfbf1
33 změnil soubory, kde provedl 649 přidání a 153 odebrání
  1. 2 0
      Client-Server.sln.DotSettings
  2. 16 0
      Proto/OuterMessage.proto
  3. 12 0
      Robot/App/Robot.App.csproj
  4. 2 0
      Robot/Hotfix/AppStart_Init.cs
  5. 38 0
      Robot/Hotfix/Module/RobotCase/RobotCaseComponentSystem.cs
  6. 80 0
      Robot/Hotfix/Module/RobotCase/RobotCaseDispatcherComponentSystem.cs
  7. 100 0
      Robot/Hotfix/Module/RobotCase/RobotCaseSystem.cs
  8. 62 0
      Robot/Hotfix/Module/RobotCase/RobotConsoleHandler.cs
  9. 26 0
      Robot/Hotfix/Robot/Case/RobotCase_FirstCase.cs
  10. 0 7
      Robot/Hotfix/Robot/RobotManagerComponentSystem.cs
  11. 7 0
      Robot/Model/Module/RobotCase/IRobotCase.cs
  12. 10 0
      Robot/Model/Module/RobotCase/RobotCase.cs
  13. 14 0
      Robot/Model/Module/RobotCase/RobotCaseAttribute.cs
  14. 11 0
      Robot/Model/Module/RobotCase/RobotCaseComponent.cs
  15. 11 0
      Robot/Model/Module/RobotCase/RobotCaseDispatcherComponent.cs
  16. 26 0
      Robot/Model/Module/RobotCase/RobotLog.cs
  17. 9 0
      Robot/Model/Robot/RobotCaseType.cs
  18. 1 1
      Server/App/NLog.config
  19. 14 0
      Server/Hotfix/Demo/C2M_TestRobotCaseHandler.cs
  20. 3 3
      Server/Model/Demo/RecastNav/RecastPathComponent.cs
  21. 34 0
      Server/Model/Generate/Message/OuterMessage.cs
  22. 2 0
      Server/Model/Generate/Message/OuterOpcode.cs
  23. 1 0
      Server/Model/Module/Console/ConsoleComponent.cs
  24. 4 4
      Unity/Assets/Editor/BuildEditor/BuildHelper.cs
  25. 1 1
      Unity/Assets/Editor/RecastNavDataExporter/NavMeshExporter.cs
  26. 1 1
      Unity/Assets/Editor/RsyncEditor/RsyncEditor.cs
  27. 1 1
      Unity/Assets/Hotfix/Demo/Login/LoginHelper.cs
  28. 34 0
      Unity/Assets/Model/Generate/Message/OuterMessage.cs
  29. 2 0
      Unity/Assets/Model/Generate/Message/OuterOpcode.cs
  30. 1 1
      Unity/Assets/ModelView/Demo/Resource/ResourcesComponent.cs
  31. 21 22
      Unity/Assets/Plugins/Android/libs/x86/libkcp.so.meta
  32. 98 110
      Unity/Assets/Plugins/x86/kcp.dll.meta
  33. 5 2
      Unity/Assets/Plugins/x86_64/kcp.dll.meta

+ 2 - 0
Client-Server.sln.DotSettings

@@ -423,6 +423,7 @@ II.2.12 <HandlesEvent />
 	<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002EJavaScript_002ECodeStyle_002ESettingsUpgrade_002EJsParsFormattingSettingsUpgrader/@EntryIndexedValue">True</s:Boolean>
 	<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002EJavaScript_002ECodeStyle_002ESettingsUpgrade_002EJsWrapperSettingsUpgrader/@EntryIndexedValue">True</s:Boolean>
 	<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002EXml_002ECodeStyle_002EFormatSettingsUpgrade_002EXmlMoveToCommonFormatterSettingsUpgrade/@EntryIndexedValue">True</s:Boolean>
+	<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002ERider_002EBackend_002EFeatures_002EDebugger_002ESettings_002EMigration_002ERiderSymbolServersSettingsUpgrade/@EntryIndexedValue">True</s:Boolean>
 	<s:Boolean x:Key="/Default/Environment/TextControl/HighlightCurrentLine/@EntryValue">True</s:Boolean>
 	<s:Boolean x:Key="/Default/Environment/UnitTesting/MsTestProvider/UseTestRunConfigFromMetadataFile/@EntryValue">False</s:Boolean>
 	<s:Boolean x:Key="/Default/Environment/UpdatesManger/IsDownloadUpdateDataAllowed/@EntryValue">False</s:Boolean>
@@ -1005,6 +1006,7 @@ II.2.12 &lt;HandlesEvent /&gt;&#xD;
 	<s:Boolean x:Key="/Default/Housekeeping/VsActionManager/KeyboardShortcutToVsCommand/=Subtract/@KeyIndexDefined">True</s:Boolean>
 	<s:Boolean x:Key="/Default/Housekeeping/VsActionManager/KeyboardShortcutToVsCommand/=Tab/@KeyIndexDefined">True</s:Boolean>
 	<s:Boolean x:Key="/Default/Housekeeping/VsActionManager/KeyboardShortcutToVsCommand/=Up/@KeyIndexDefined">True</s:Boolean>
+	<s:Boolean x:Key="/Default/RiderDebugger/RiderRestoreDecompile/RestoreDecompileSetting/@EntryValue">False</s:Boolean>
 	<s:String x:Key="/Default/SnapshotsStore/CurrentStore/@EntryValue">C:\Users\USER-PC\AppData\Local\JetBrains\Shared\vAny\Sessions</s:String>
 	<s:Boolean x:Key="/Default/SymbolServers/RestoreDecompileSetting/@EntryValue">False</s:Boolean>
 	<s:Double x:Key="/Default/TimelineLayout/MethodsPanelHeight/@EntryValue">366</s:Double></wpf:ResourceDictionary>

+ 16 - 0
Proto/OuterMessage.proto

@@ -186,3 +186,19 @@ message G2C_TestHotfixMessage // IMessage
 {
 	string Info = 1;
 }
+
+//ResponseType M2C_TestRobotCase
+message C2M_TestRobotCase // IActorLocationRequest
+{
+	int32 RpcId = 90;
+	int64 ActorId = 93;
+	int32 N = 1;
+}
+
+message M2C_TestRobotCase // IActorLocationResponse
+{
+	int32 RpcId = 90;
+	int32 Error = 91;
+	string Message = 92;
+	int32 N = 1;
+}

+ 12 - 0
Robot/App/Robot.App.csproj

@@ -26,4 +26,16 @@
       <ProjectReference Include="..\Model\Robot.Model.csproj" />
     </ItemGroup>
 
+    <ItemGroup>
+      <None Include="..\..\Server\App\NLog.config">
+        <Link>NLog.config</Link>
+      </None>
+    </ItemGroup>
+
+    <ItemGroup>
+      <Content Include="..\..\Server\App\NLog.xsd">
+        <Link>NLog.xsd</Link>
+      </Content>
+    </ItemGroup>
+
 </Project>

+ 2 - 0
Robot/Hotfix/AppStart_Init.cs

@@ -16,6 +16,8 @@ namespace ET
             Game.Scene.AddComponent<NetThreadComponent>();
             Game.Scene.AddComponent<ZoneSceneManagerComponent>();
             Game.Scene.AddComponent<AIDispatcherComponent>();
+            Game.Scene.AddComponent<RobotCaseDispatcherComponent>();
+            Game.Scene.AddComponent<RobotCaseComponent>();
             
             var processScenes = StartSceneConfigCategory.Instance.GetByProcess(Game.Options.Process);
             foreach (StartSceneConfig startConfig in processScenes)

+ 38 - 0
Robot/Hotfix/Module/RobotCase/RobotCaseComponentSystem.cs

@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+
+namespace ET
+{
+    [ObjectSystem]
+    public class RobotCaseComponentAwakeSystem: AwakeSystem<RobotCaseComponent>
+    {
+        public override void Awake(RobotCaseComponent self)
+        {
+            RobotCaseComponent.Instance = self;
+        }
+    }
+
+    [ObjectSystem]
+    public class RobotCaseComponentDestroySystem: DestroySystem<RobotCaseComponent>
+    {
+        public override void Destroy(RobotCaseComponent self)
+        {
+            RobotCaseComponent.Instance = null;
+        }
+    }
+    
+    public static class RobotCaseComponentSystem
+    {
+        public static int GetN(this RobotCaseComponent self)
+        {
+            return ++self.N;
+        }
+        
+        public static async ETTask<RobotCase> New(this RobotCaseComponent self)
+        {
+            await ETTask.CompletedTask;
+            RobotCase robotCase = EntityFactory.CreateWithParent<RobotCase>(self);
+            return robotCase;
+        }
+    }
+}

+ 80 - 0
Robot/Hotfix/Module/RobotCase/RobotCaseDispatcherComponentSystem.cs

@@ -0,0 +1,80 @@
+using System;
+using System.Collections.Generic;
+
+namespace ET
+{
+    [ObjectSystem]
+    public class RobotCaseDispatcherComponentAwakeSystem: AwakeSystem<RobotCaseDispatcherComponent>
+    {
+        public override void Awake(RobotCaseDispatcherComponent self)
+        {
+            RobotCaseDispatcherComponent.Instance = self;
+            self.Load();
+        }
+    }
+
+    [ObjectSystem]
+    public class RobotCaseDispatcherComponentLoadSystem: LoadSystem<RobotCaseDispatcherComponent>
+    {
+        public override void Load(RobotCaseDispatcherComponent self)
+        {
+            self.Load();
+        }
+    }
+    
+    public static class RobotCaseDispatcherComponentSystem
+    {
+        public static void Load(this RobotCaseDispatcherComponent self)
+        {
+            self.Dictionary.Clear();
+
+            HashSet<Type> types = Game.EventSystem.GetTypes(typeof(RobotCaseAttribute));
+
+            foreach (Type type in types)
+            {
+                object[] attrs = type.GetCustomAttributes(typeof(RobotCaseAttribute), false);
+                if (attrs.Length == 0)
+                {
+                    continue;
+                }
+                
+                RobotCaseAttribute attr = attrs[0] as RobotCaseAttribute;
+                if (attr == null)
+                {
+                    continue;
+                }
+                
+                IRobotCase robotCase = Activator.CreateInstance(type) as IRobotCase;
+                if (robotCase == null)
+                {
+                    Log.Error($"RobotCase handle {type.Name} 需要继承 IRobotCase");
+                    continue;
+                }
+                
+                self.Dictionary.Add(attr.CaseType, robotCase);
+            }
+        }
+        
+        public static async ETTask Run(this RobotCaseDispatcherComponent self, int caseType, string line)
+        {
+            if (!self.Dictionary.TryGetValue(caseType, out IRobotCase iRobotCase))
+            {
+                return;
+            }
+
+            try
+            {
+                using (RobotCase robotCase = await RobotCaseComponent.Instance.New())
+                {
+                    robotCase.CommandLine = line;
+                    await iRobotCase.Run(robotCase);
+                }
+            }
+            catch (Exception e)
+            {
+                Log.Error($"{self.DomainZone()} {e}");
+                RobotLog.Console($"RobotCase Error {caseType}:\n\t{e}");
+            }
+        }
+    }
+}

+ 100 - 0
Robot/Hotfix/Module/RobotCase/RobotCaseSystem.cs

@@ -0,0 +1,100 @@
+using System;
+using System.Collections.Generic;
+
+namespace ET
+{
+    public static class RobotCaseSystem
+    {
+        // 创建机器人,生命周期是RobotCase
+        public static async ETTask NewRobot(this RobotCase self, int count, List<Scene> scenes)
+        {
+            ETTask[] tasks = new ETTask[count];
+            for (int i = 0; i < count; ++i)
+            {
+                tasks[i] = self.NewRobot(scenes);
+            }
+
+            await ETTaskHelper.WaitAll(tasks);
+        }
+
+        private static async ETTask NewRobot(this RobotCase self, List<Scene> scenes)
+        {
+            try
+            {
+                scenes.Add(await self.NewRobot());
+            }
+            catch (Exception e)
+            {
+                Log.Error(e);
+            }
+        }
+
+        // 创建机器人,生命周期是RobotCase
+        public static async ETTask NewZoneRobot(this RobotCase self, int zone, int count, List<Scene> scenes)
+        {
+            ETTask[] tasks = new ETTask[count];
+            for (int i = 0; i < count; ++i)
+            {
+                tasks[i] = self.NewZoneRobot(zone + i, scenes);
+            }
+
+            await ETTaskHelper.WaitAll(tasks);
+        }
+
+        // 这个方法创建的是进程所属的机器人,建议使用RobotCase.NewRobot来创建
+        private static async ETTask NewZoneRobot(this RobotCase self, int zone, List<Scene> scenes)
+        {
+            try
+            {
+                scenes.Add(await self.NewRobot(zone));
+            }
+            catch (Exception e)
+            {
+                Log.Error(e);
+            }
+        }
+
+        public static async ETTask<Scene> NewRobot(this RobotCase self, int zone)
+        {
+            return await self.NewRobot(zone, $"Robot_{zone}");
+        }
+
+        public static async ETTask<Scene> NewRobot(this RobotCase self, int zone, string name)
+        {
+            Scene zoneScene = null;
+            try
+            {
+                zoneScene = await SceneFactory.CreateZoneScene(zone, name, self);
+                await LoginHelper.Login(zoneScene, ConstValue.LoginAddress, zone.ToString(), zone.ToString());
+                await EnterMapHelper.EnterMapAsync(zoneScene);
+                Log.Debug($"create robot ok: {zone}");
+                return zoneScene;
+            }
+            catch (Exception e)
+            {
+                zoneScene?.Dispose();
+                throw new Exception($"RobotCase create robot fail, zone: {zone}", e);
+            }
+        }
+
+        private static async ETTask<Scene> NewRobot(this RobotCase self)
+        {
+            int zone = self.GetParent<RobotCaseComponent>().GetN();
+            Scene zoneScene = null;
+
+            try
+            {
+                zoneScene = await SceneFactory.CreateZoneScene(zone, $"Robot_{zone}", self);
+                await LoginHelper.Login(zoneScene, ConstValue.LoginAddress, zone.ToString(), zone.ToString());
+                await EnterMapHelper.EnterMapAsync(zoneScene);
+                Log.Debug($"create robot ok: {zone}");
+                return zoneScene;
+            }
+            catch (Exception e)
+            {
+                zoneScene?.Dispose();
+                throw new Exception($"RobotCase create robot fail, zone: {zone}", e);
+            }
+        }
+    }
+}

+ 62 - 0
Robot/Hotfix/Module/RobotCase/RobotConsoleHandler.cs

@@ -0,0 +1,62 @@
+using System;
+using System.Reflection;
+
+namespace ET
+{
+    [ConsoleHandler(ConsoleMode.Robot)]
+    public class RobotConsoleHandler: IConsoleHandler
+    {
+        public async ETTask Run(ModeContex contex, string content)
+        {
+            string[] ss = content.Split(" ");
+            switch (ss[0])
+            {
+                case ConsoleMode.Robot:
+                    break;
+
+                case "Run":
+                {
+                    int caseType = int.Parse(ss[1]);
+
+                    try
+                    {
+                        RobotLog.Debug($"run case start: {caseType}");
+                        await RobotCaseDispatcherComponent.Instance.Run(caseType, content);
+                        RobotLog.Debug($"run case finish: {caseType}");
+                    }
+                    catch (Exception e)
+                    {
+                        RobotLog.Debug($"run case error: {caseType}\n{e}");
+                    }
+                    break;
+                }
+                case "RunAll":
+                {
+                    FieldInfo[] fieldInfos = typeof (RobotCaseType).GetFields();
+                    foreach (FieldInfo fieldInfo in fieldInfos)
+                    {
+                        int caseType = (int)fieldInfo.GetValue(null);
+                        if (caseType > RobotCaseType.MaxCaseType)
+                        {
+                            RobotLog.Debug($"case > {RobotCaseType.MaxCaseType}: {caseType}");
+                            break;
+                        }
+                        try
+                        {
+                            RobotLog.Debug($"run case start: {caseType}");
+                            await RobotCaseDispatcherComponent.Instance.Run(caseType, content);
+                            RobotLog.Debug($"---------run case finish: {caseType}");
+                        }
+                        catch (Exception e)
+                        {
+                            RobotLog.Debug($"run case error: {caseType}\n{e}");
+                            break;
+                        }
+                    }
+                    break;
+                }
+            }
+            await ETTask.CompletedTask;
+        }
+    }
+}

+ 26 - 0
Robot/Hotfix/Robot/Case/RobotCase_FirstCase.cs

@@ -0,0 +1,26 @@
+using System;
+
+namespace ET
+{
+    [RobotCase(RobotCaseType.FirstCase)]
+    public class RobotCase_FirstCase: IRobotCase
+    {
+        public async ETTask Run(RobotCase robotCase)
+        {
+            using ListComponent<Scene> robots = ListComponent<Scene>.Create();
+            
+            // 创建了两个机器人,生命周期是RobotCase,RobotCase_FirstCase.Run执行结束,机器人就会删除
+            await robotCase.NewRobot(2, robots.List);
+
+            foreach (Scene robotScene in robots.List)
+            {
+                M2C_TestRobotCase response = await robotScene.GetComponent<SessionComponent>().Session.Call(new C2M_TestRobotCase() {N = robotScene.Zone}) as M2C_TestRobotCase;
+                if (response.N != robotScene.Zone)
+                {
+                    // 跟预期不一致就抛异常,外层会catch住在控制台上打印
+                    throw new Exception($"robot case: {RobotCaseType.FirstCase} run fail!");
+                }
+            }
+        }
+    }
+}

+ 0 - 7
Robot/Hotfix/Robot/RobotManagerComponentSystem.cs

@@ -3,13 +3,6 @@ using System.Linq;
 
 namespace ET
 {
-    public class RobotManagerComponentAwakeSystem: AwakeSystem<RobotManagerComponent>
-    {
-        public override void Awake(RobotManagerComponent self)
-        {
-        }
-    }
-
     public static class RobotManagerComponentSystem
     {
         public static async ETTask<Scene> NewRobot(this RobotManagerComponent self, int zone)

+ 7 - 0
Robot/Model/Module/RobotCase/IRobotCase.cs

@@ -0,0 +1,7 @@
+namespace ET
+{
+    public interface IRobotCase
+    {
+        ETTask Run(RobotCase robotCase);
+    }
+}

+ 10 - 0
Robot/Model/Module/RobotCase/RobotCase.cs

@@ -0,0 +1,10 @@
+using System.Collections.Generic;
+
+namespace ET
+{
+    public class RobotCase: Entity
+    {
+        public ETCancellationToken CancellationToken;
+        public string CommandLine;
+    }
+}

+ 14 - 0
Robot/Model/Module/RobotCase/RobotCaseAttribute.cs

@@ -0,0 +1,14 @@
+using System;
+
+namespace ET
+{
+    public class RobotCaseAttribute: BaseAttribute
+    {
+        public int CaseType { get; }
+
+        public RobotCaseAttribute(int caseType)
+        {
+            this.CaseType = caseType;
+        }
+    }
+}

+ 11 - 0
Robot/Model/Module/RobotCase/RobotCaseComponent.cs

@@ -0,0 +1,11 @@
+using System.Collections.Generic;
+
+namespace ET
+{
+    public class RobotCaseComponent: Entity
+    {
+        public static RobotCaseComponent Instance;
+        public Dictionary<int, RobotCase> RobotCases = new Dictionary<int, RobotCase>();
+        public int N = 10000;
+    }
+}

+ 11 - 0
Robot/Model/Module/RobotCase/RobotCaseDispatcherComponent.cs

@@ -0,0 +1,11 @@
+using System.Collections.Generic;
+
+namespace ET
+{
+    public class RobotCaseDispatcherComponent: Entity
+    {
+        public static RobotCaseDispatcherComponent Instance;
+        
+        public Dictionary<int, IRobotCase> Dictionary = new Dictionary<int, IRobotCase>();
+    }
+}

+ 26 - 0
Robot/Model/Module/RobotCase/RobotLog.cs

@@ -0,0 +1,26 @@
+using DnsClient.Internal;
+
+namespace ET
+{
+	public static class RobotLog
+	{
+		private static readonly ILog logger = new NLogger("RobotConsole");
+		
+		public static void Debug(string msg)
+		{
+			Log.Info(msg);
+			logger.Info(msg);
+		}
+		
+		public static void Debug(string msg, params object[] args)
+		{
+			Log.Info(msg);
+			logger.Info(msg, args);
+		}
+
+		public static void Console(string msg)
+		{
+			logger.Info(msg);
+		}
+	}
+}

+ 9 - 0
Robot/Model/Robot/RobotCaseType.cs

@@ -0,0 +1,9 @@
+namespace ET
+{
+    public static class RobotCaseType
+    {
+        public const int FirstCase = 1;
+
+        public const int MaxCaseType = 10000;
+    }
+}

+ 1 - 1
Server/App/NLog.config

@@ -136,7 +136,7 @@
 		<logger ruleName="RobotInfo" name="Robot" minlevel="Trace" maxlevel="Error" writeTo="RobotInfo" />
 		<logger ruleName="RobotWarn" name="Robot" minlevel="Warn" maxlevel="Warn" writeTo="RobotWarn" />
 		<logger ruleName="RobotError" name="Robot" minlevel="Error" maxlevel="Error" writeTo="RobotError" />
-		<logger ruleName="RobotConsole" name="Robot" minlevel="Warn" maxlevel="Error" writeTo="RobotConsole" />
+		<logger ruleName="RobotConsole" name="Robot" minlevel="Info" maxlevel="Error" writeTo="RobotConsole" />
 		<logger ruleName="Watcher" name="Watcher" minlevel="Trace" maxlevel="Error" writeTo="Watcher" />
 	</rules>
 </nlog>

+ 14 - 0
Server/Hotfix/Demo/C2M_TestRobotCaseHandler.cs

@@ -0,0 +1,14 @@
+using System;
+
+namespace ET
+{
+	public class C2M_TestRobotCaseHandler : AMActorLocationRpcHandler<Unit, C2M_TestRobotCase, M2C_TestRobotCase>
+	{
+		protected override async ETTask Run(Unit unit, C2M_TestRobotCase request, M2C_TestRobotCase response, Action reply)
+		{
+			response.N = request.N;
+			reply();
+			await ETTask.CompletedTask;
+		}
+	}
+}

+ 3 - 3
Server/Model/Demo/RecastNav/RecastPathComponent.cs

@@ -74,7 +74,7 @@ namespace ET
                 RecastPathProcessor recastPathProcessor = EntityFactory.Create<RecastPathProcessor>(this.domain);
                 recastPathProcessor.MapId = mapId;
                 m_RecastPathProcessorDic[mapId] = recastPathProcessor;
-                Log.Info($"加载Id为{mapId}的地图Nav数据成功!");
+                Log.Debug($"加载Id为{mapId}的地图Nav数据成功!");
             }
         }
 
@@ -94,11 +94,11 @@ namespace ET
             m_RecastPathProcessorDic.Remove(mapId);
             if (RecastInterface.FreeMap(mapId))
             {
-                Log.Info($"地图: {mapId}  释放成功");
+                Log.Debug($"地图: {mapId}  释放成功");
             }
             else
             {
-                Log.Info($"地图: {mapId}  释放失败");
+                Log.Debug($"地图: {mapId}  释放失败");
             }
         }
 

+ 34 - 0
Server/Model/Generate/Message/OuterMessage.cs

@@ -389,4 +389,38 @@ namespace ET
 
 	}
 
+	[ResponseType(typeof(M2C_TestRobotCase))]
+	[Message(OuterOpcode.C2M_TestRobotCase)]
+	[ProtoContract]
+	public partial class C2M_TestRobotCase: Object, IActorLocationRequest
+	{
+		[ProtoMember(90)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(93)]
+		public long ActorId { get; set; }
+
+		[ProtoMember(1)]
+		public int N { get; set; }
+
+	}
+
+	[Message(OuterOpcode.M2C_TestRobotCase)]
+	[ProtoContract]
+	public partial class M2C_TestRobotCase: Object, IActorLocationResponse
+	{
+		[ProtoMember(90)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(91)]
+		public int Error { get; set; }
+
+		[ProtoMember(92)]
+		public string Message { get; set; }
+
+		[ProtoMember(1)]
+		public int N { get; set; }
+
+	}
+
 }

+ 2 - 0
Server/Model/Generate/Message/OuterOpcode.cs

@@ -24,5 +24,7 @@ namespace ET
 		 public const ushort C2G_LoginGate = 20020;
 		 public const ushort G2C_LoginGate = 20021;
 		 public const ushort G2C_TestHotfixMessage = 20022;
+		 public const ushort C2M_TestRobotCase = 20023;
+		 public const ushort M2C_TestRobotCase = 20024;
 	}
 }

+ 1 - 0
Server/Model/Module/Console/ConsoleComponent.cs

@@ -11,6 +11,7 @@ namespace ET
         public const string Repl = "Repl";
         public const string Debugger = "Debugger";
         public const string CreateRobot = "CreateRobot";
+        public const string Robot = "Robot";
     }
 
     public class ConsoleComponent: Entity

+ 4 - 4
Unity/Assets/Editor/BuildEditor/BuildHelper.cs

@@ -51,10 +51,10 @@ namespace ET
                 Directory.CreateDirectory(fold);
             }
 
-            Log.Info("开始资源打包");
+            Log.Debug("开始资源打包");
             BuildPipeline.BuildAssetBundles(fold, buildAssetBundleOptions, buildTarget);
 
-            Log.Info("完成资源打包");
+            Log.Debug("完成资源打包");
 
             if (isContainAB)
             {
@@ -68,9 +68,9 @@ namespace ET
                 string[] levels = {
                     "Assets/Scenes/Init.unity",
                 };
-                Log.Info("开始EXE打包");
+                Log.Debug("开始EXE打包");
                 BuildPipeline.BuildPlayer(levels, $"{relativeDirPrefix}/{exeName}", buildTarget, buildOptions);
-                Log.Info("完成exe打包");
+                Log.Debug("完成exe打包");
             }
         }
     }

+ 1 - 1
Unity/Assets/Editor/RecastNavDataExporter/NavMeshExporter.cs

@@ -739,7 +739,7 @@ namespace ETEditor
                     {
                         string dest = System.IO.Path.Combine(outputServerFolder, name);
                         System.IO.File.Copy(file, dest, true); //复制文件
-                        Log.Info($"Recast:从{file}复制obj文件到{dest}成功");
+                        Log.Debug($"Recast:从{file}复制obj文件到{dest}成功");
                     }
                 }
             }

+ 1 - 1
Unity/Assets/Editor/RsyncEditor/RsyncEditor.cs

@@ -83,7 +83,7 @@ namespace ET
 				string arguments =
 						$"-vzrtopg --password-file=./Tools/cwRsync/Config/rsync.secrets --exclude-from=./Tools/cwRsync/Config/exclude.txt --delete ./ {this.rsyncConfig.Account}@{this.rsyncConfig.Host}::Upload/{this.rsyncConfig.RelativePath} --chmod=ugo=rwX";
 				ProcessHelper.Run(@"./Tools/cwRsync/rsync.exe", arguments, @"..\");
-				Log.Info("同步完成!");
+				Log.Debug("同步完成!");
 			}
 		}
 	}

+ 1 - 1
Unity/Assets/Hotfix/Demo/Login/LoginHelper.cs

@@ -24,7 +24,7 @@ namespace ET
                 G2C_LoginGate g2CLoginGate = (G2C_LoginGate)await gateSession.Call(
                     new C2G_LoginGate() { Key = r2CLogin.Key, GateId = r2CLogin.GateId});
 
-                Log.Info("登陆gate成功!");
+                Log.Debug("登陆gate成功!");
 
                 await Game.EventSystem.Publish(new EventType.LoginFinish() {ZoneScene = zoneScene});
             }

+ 34 - 0
Unity/Assets/Model/Generate/Message/OuterMessage.cs

@@ -389,4 +389,38 @@ namespace ET
 
 	}
 
+	[ResponseType(typeof(M2C_TestRobotCase))]
+	[Message(OuterOpcode.C2M_TestRobotCase)]
+	[ProtoContract]
+	public partial class C2M_TestRobotCase: Object, IActorLocationRequest
+	{
+		[ProtoMember(90)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(93)]
+		public long ActorId { get; set; }
+
+		[ProtoMember(1)]
+		public int N { get; set; }
+
+	}
+
+	[Message(OuterOpcode.M2C_TestRobotCase)]
+	[ProtoContract]
+	public partial class M2C_TestRobotCase: Object, IActorLocationResponse
+	{
+		[ProtoMember(90)]
+		public int RpcId { get; set; }
+
+		[ProtoMember(91)]
+		public int Error { get; set; }
+
+		[ProtoMember(92)]
+		public string Message { get; set; }
+
+		[ProtoMember(1)]
+		public int N { get; set; }
+
+	}
+
 }

+ 2 - 0
Unity/Assets/Model/Generate/Message/OuterOpcode.cs

@@ -24,5 +24,7 @@ namespace ET
 		 public const ushort C2G_LoginGate = 20020;
 		 public const ushort G2C_LoginGate = 20021;
 		 public const ushort G2C_TestHotfixMessage = 20022;
+		 public const ushort C2M_TestRobotCase = 20023;
+		 public const ushort M2C_TestRobotCase = 20024;
 	}
 }

+ 1 - 1
Unity/Assets/ModelView/Demo/Resource/ResourcesComponent.cs

@@ -543,7 +543,7 @@ namespace ET
                 p = Path.Combine(PathHelper.AppResPath, assetBundleName);
             }
 
-            Log.Info("Async load bundle BundleName : " + p);
+            Log.Debug("Async load bundle BundleName : " + p);
 
             // if (!File.Exists(p))
             // {

+ 21 - 22
Unity/Assets/Plugins/Android/libs/x86/libkcp.so.meta

@@ -1,34 +1,33 @@
 fileFormatVersion: 2
 guid: 3869fe202d9b7494cbf94cbd4c9ae4c5
-timeCreated: 1530266298
-licenseType: Pro
 PluginImporter:
+  externalObjects: {}
   serializedVersion: 2
   iconMap: {}
   executionOrder: {}
+  defineConstraints: []
   isPreloaded: 0
   isOverridable: 0
+  isExplicitlyReferenced: 0
+  validateReferences: 1
   platformData:
-    data:
-      first:
-        Android: Android
-      second:
-        enabled: 1
-        settings:
-          CPU: x86
-    data:
-      first:
-        Any: 
-      second:
-        enabled: 0
-        settings: {}
-    data:
-      first:
-        Editor: Editor
-      second:
-        enabled: 0
-        settings:
-          DefaultValueInitialized: true
+  - first:
+      Android: Android
+    second:
+      enabled: 1
+      settings:
+        CPU: x86
+  - first:
+      Any: 
+    second:
+      enabled: 0
+      settings: {}
+  - first:
+      Editor: Editor
+    second:
+      enabled: 0
+      settings:
+        DefaultValueInitialized: true
   userData: 
   assetBundleName: 
   assetBundleVariant: 

+ 98 - 110
Unity/Assets/Plugins/x86/kcp.dll.meta

@@ -1,122 +1,110 @@
 fileFormatVersion: 2
 guid: 5163e0119c1604a43adbc28ec6fb277e
-timeCreated: 1530266315
-licenseType: Pro
 PluginImporter:
+  externalObjects: {}
   serializedVersion: 2
   iconMap: {}
   executionOrder: {}
+  defineConstraints: []
   isPreloaded: 0
   isOverridable: 0
+  isExplicitlyReferenced: 0
+  validateReferences: 1
   platformData:
-    data:
-      first:
-        '': Any
-      second:
-        enabled: 0
-        settings:
-          Exclude Android: 1
-          Exclude Editor: 1
-          Exclude Linux: 0
-          Exclude Linux64: 0
-          Exclude LinuxUniversal: 0
-          Exclude OSXIntel: 0
-          Exclude OSXIntel64: 0
-          Exclude OSXUniversal: 0
-          Exclude Win: 0
-          Exclude Win64: 1
-    data:
-      first:
-        Android: Android
-      second:
-        enabled: 0
-        settings:
-          CPU: ARMv7
-    data:
-      first:
-        Any: 
-      second:
-        enabled: 0
-        settings: {}
-    data:
-      first:
-        Editor: Editor
-      second:
-        enabled: 0
-        settings:
-          CPU: x86
-          DefaultValueInitialized: true
-          OS: AnyOS
-    data:
-      first:
-        Facebook: Win
-      second:
-        enabled: 1
-        settings:
-          CPU: AnyCPU
-    data:
-      first:
-        Facebook: Win64
-      second:
-        enabled: 0
-        settings:
-          CPU: None
-    data:
-      first:
-        Standalone: Linux
-      second:
-        enabled: 1
-        settings:
-          CPU: x86
-    data:
-      first:
-        Standalone: Linux64
-      second:
-        enabled: 1
-        settings:
-          CPU: None
-    data:
-      first:
-        Standalone: LinuxUniversal
-      second:
-        enabled: 1
-        settings:
-          CPU: AnyCPU
-    data:
-      first:
-        Standalone: OSXIntel
-      second:
-        enabled: 1
-        settings:
-          CPU: AnyCPU
-    data:
-      first:
-        Standalone: OSXIntel64
-      second:
-        enabled: 1
-        settings:
-          CPU: None
-    data:
-      first:
-        Standalone: OSXUniversal
-      second:
-        enabled: 1
-        settings:
-          CPU: AnyCPU
-    data:
-      first:
-        Standalone: Win
-      second:
-        enabled: 1
-        settings:
-          CPU: AnyCPU
-    data:
-      first:
-        Standalone: Win64
-      second:
-        enabled: 0
-        settings:
-          CPU: None
+  - first:
+      : Any
+    second:
+      enabled: 0
+      settings:
+        Exclude Android: 1
+        Exclude Editor: 1
+        Exclude Linux: 0
+        Exclude Linux64: 0
+        Exclude LinuxUniversal: 0
+        Exclude OSXIntel: 0
+        Exclude OSXIntel64: 0
+        Exclude OSXUniversal: 0
+        Exclude Win: 0
+        Exclude Win64: 1
+  - first:
+      Android: Android
+    second:
+      enabled: 0
+      settings:
+        CPU: ARMv7
+  - first:
+      Any: 
+    second:
+      enabled: 0
+      settings: {}
+  - first:
+      Editor: Editor
+    second:
+      enabled: 0
+      settings:
+        CPU: x86
+        DefaultValueInitialized: true
+        OS: AnyOS
+  - first:
+      Facebook: Win
+    second:
+      enabled: 1
+      settings:
+        CPU: AnyCPU
+  - first:
+      Facebook: Win64
+    second:
+      enabled: 0
+      settings:
+        CPU: None
+  - first:
+      Standalone: Linux
+    second:
+      enabled: 1
+      settings:
+        CPU: x86
+  - first:
+      Standalone: Linux64
+    second:
+      enabled: 1
+      settings:
+        CPU: None
+  - first:
+      Standalone: LinuxUniversal
+    second:
+      enabled: 1
+      settings:
+        CPU: AnyCPU
+  - first:
+      Standalone: OSXIntel
+    second:
+      enabled: 1
+      settings:
+        CPU: AnyCPU
+  - first:
+      Standalone: OSXIntel64
+    second:
+      enabled: 1
+      settings:
+        CPU: None
+  - first:
+      Standalone: OSXUniversal
+    second:
+      enabled: 1
+      settings:
+        CPU: AnyCPU
+  - first:
+      Standalone: Win
+    second:
+      enabled: 1
+      settings:
+        CPU: AnyCPU
+  - first:
+      Standalone: Win64
+    second:
+      enabled: 0
+      settings:
+        CPU: None
   userData: 
   assetBundleName: 
   assetBundleVariant: 

+ 5 - 2
Unity/Assets/Plugins/x86_64/kcp.dll.meta

@@ -5,11 +5,14 @@ PluginImporter:
   serializedVersion: 2
   iconMap: {}
   executionOrder: {}
+  defineConstraints: []
   isPreloaded: 0
   isOverridable: 0
+  isExplicitlyReferenced: 0
+  validateReferences: 1
   platformData:
   - first:
-      '': Any
+      : Any
     second:
       enabled: 0
       settings:
@@ -65,7 +68,7 @@ PluginImporter:
     second:
       enabled: 1
       settings:
-        CPU: x86_64
+        CPU: AnyCPU
   - first:
       Standalone: LinuxUniversal
     second: