Преглед изворни кода

消息增加一个Create静态方法,从对象池中获取,增加Dispose方法,回收到对象池

tanghai пре 2 година
родитељ
комит
531a5235fe
18 измењених фајлова са 832 додато и 14 уклоњено
  1. 7 2
      Share/Tool/Proto2CS/Proto2CS.cs
  2. 1 1
      Share/Tool/Share.Tool.csproj
  3. 5 1
      Unity/Assets/Scripts/Core/Object/MessageObject.cs
  4. 2 5
      Unity/Assets/Scripts/Hotfix/Client/Demo/Ping/PingComponentSystem.cs
  5. 1 1
      Unity/Assets/Scripts/Hotfix/Client/LockStep/LSClientHelper.cs
  6. 1 1
      Unity/Assets/Scripts/Hotfix/Client/LockStep/LSClientUpdaterSystem.cs
  7. 2 2
      Unity/Assets/Scripts/Hotfix/Client/LockStep/OneFrameInputsHandler.cs
  8. 5 1
      Unity/Assets/Scripts/Hotfix/Server/Demo/Scenes/Gate/SessionPlayerComponentSystem.cs
  9. 48 0
      Unity/Assets/Scripts/Model/Generate/Client/Message/LockStepOuter_C_11001.cs
  10. 144 0
      Unity/Assets/Scripts/Model/Generate/Client/Message/OuterMessage_C_10001.cs
  11. 92 0
      Unity/Assets/Scripts/Model/Generate/ClientServer/Message/InnerMessage_S_20001.cs
  12. 24 0
      Unity/Assets/Scripts/Model/Generate/ClientServer/Message/LockStepInner_S_21001.cs
  13. 48 0
      Unity/Assets/Scripts/Model/Generate/ClientServer/Message/LockStepOuter_C_11001.cs
  14. 144 0
      Unity/Assets/Scripts/Model/Generate/ClientServer/Message/OuterMessage_C_10001.cs
  15. 92 0
      Unity/Assets/Scripts/Model/Generate/Server/Message/InnerMessage_S_20001.cs
  16. 24 0
      Unity/Assets/Scripts/Model/Generate/Server/Message/LockStepInner_S_21001.cs
  17. 48 0
      Unity/Assets/Scripts/Model/Generate/Server/Message/LockStepOuter_C_11001.cs
  18. 144 0
      Unity/Assets/Scripts/Model/Generate/Server/Message/OuterMessage_C_10001.cs

+ 7 - 2
Share/Tool/Proto2CS/Proto2CS.cs

@@ -81,10 +81,11 @@ namespace ET
             sb.Append("{\n");
             
             bool isMsgStart = false;
+            string msgName = "";
             foreach (string line in s.Split('\n'))
             {
                 string newline = line.Trim();
-
+                
                 if (newline == "")
                 {
                     continue;
@@ -107,7 +108,7 @@ namespace ET
                 {
                     string parentClass = "";
                     isMsgStart = true;
-                    string msgName = newline.Split(splitChars, StringSplitOptions.RemoveEmptyEntries)[1];
+                    msgName = newline.Split(splitChars, StringSplitOptions.RemoveEmptyEntries)[1];
                     string[] ss = newline.Split(new[] { "//" }, StringSplitOptions.RemoveEmptyEntries);
 
                     if (ss.Length == 2)
@@ -120,6 +121,7 @@ namespace ET
                     sb.Append($"\t[Message({protoName}.{msgName})]\n");
                     sb.Append($"\t[MemoryPackable]\n");
                     sb.Append($"\tpublic partial class {msgName}: MessageObject");
+
                     if (parentClass == "IActorMessage" || parentClass == "IActorRequest" || parentClass == "IActorResponse")
                     {
                         sb.Append($", {parentClass}\n");
@@ -141,6 +143,9 @@ namespace ET
                     if (newline == "{")
                     {
                         sb.Append("\t{\n");
+                        
+                        sb.Append($"\t\tpublic static {msgName} Create(bool isFromPool = false) {{ return !isFromPool? new {msgName}() : NetServices.Instance.FetchMessage(typeof({msgName})) as {msgName}; }}\n\n");
+                        sb.Append($"\t\tpublic override void Dispose() {{ NetServices.Instance.RecycleMessage(this); }}\n\n");
                         continue;
                     }
 

+ 1 - 1
Share/Tool/Share.Tool.csproj

@@ -6,7 +6,7 @@
         <ImplicitUsings>false</ImplicitUsings>
         <Nullable>disable</Nullable>
         <RootNamespace>ET</RootNamespace>
-        <LangVersion>10</LangVersion>
+        <LangVersion>11</LangVersion>
         <PackageId>Apps.Tool</PackageId>
         <AssemblyName>Tool</AssemblyName>
     </PropertyGroup>

+ 5 - 1
Unity/Assets/Scripts/Core/Object/MessageObject.cs

@@ -4,9 +4,13 @@ using MongoDB.Bson.Serialization.Attributes;
 
 namespace ET
 {
-    public abstract class MessageObject: ProtoObject
+    public abstract class MessageObject: ProtoObject, IDisposable
     {
         [BsonIgnore]
         public bool IsFromPool;
+
+        public virtual void Dispose()
+        {
+        }
     }
 }

+ 2 - 5
Unity/Assets/Scripts/Hotfix/Client/Demo/Ping/PingComponentSystem.cs

@@ -31,9 +31,8 @@ namespace ET.Client
                 long time1 = TimeHelper.ClientNow();
                 try
                 {
-                    C2G_Ping c2GPing = NetServices.Instance.FetchMessage<C2G_Ping>();
-                    G2C_Ping response = await session.Call(c2GPing) as G2C_Ping;
-                    NetServices.Instance.RecycleMessage(response);
+                    C2G_Ping c2GPing = C2G_Ping.Create(true);
+                    using G2C_Ping response = await session.Call(c2GPing) as G2C_Ping;
 
                     if (self.InstanceId != instanceId)
                     {
@@ -44,8 +43,6 @@ namespace ET.Client
                     self.Ping = time2 - time1;
                     
                     TimeInfo.Instance.ServerMinusClientTime = response.Time + (time2 - time1) / 2 - time2;
-
-                    NetServices.Instance.RecycleMessage(response);
                     
                     await TimerComponent.Instance.WaitAsync(2000);
                 }

+ 1 - 1
Unity/Assets/Scripts/Hotfix/Client/LockStep/LSClientHelper.cs

@@ -63,7 +63,7 @@ namespace ET
                 return;
             }
             long hash = self.FrameBuffer.GetHash(frame);
-            C2Room_CheckHash c2RoomCheckHash = NetServices.Instance.FetchMessage<C2Room_CheckHash>();
+            C2Room_CheckHash c2RoomCheckHash = C2Room_CheckHash.Create();
             c2RoomCheckHash.Frame = frame;
             c2RoomCheckHash.Hash = hash;
             self.GetParent<Scene>().GetComponent<SessionComponent>().Session.Send(c2RoomCheckHash);

+ 1 - 1
Unity/Assets/Scripts/Hotfix/Client/LockStep/LSClientUpdaterSystem.cs

@@ -42,7 +42,7 @@ namespace ET.Client
                 
                 room.SpeedMultiply = ++i;
 
-                FrameMessage frameMessage = NetServices.Instance.FetchMessage<FrameMessage>();
+                FrameMessage frameMessage = FrameMessage.Create(true);
                 frameMessage.Frame = room.PredictionFrame;
                 frameMessage.Input = self.Input;
                 clientScene.GetComponent<SessionComponent>().Session.Send(frameMessage);

+ 2 - 2
Unity/Assets/Scripts/Hotfix/Client/LockStep/OneFrameInputsHandler.cs

@@ -7,6 +7,8 @@ namespace ET.Client
     {
         protected override async ETTask Run(Session session, OneFrameInputs input)
         {
+            using var _ = input ; // 方法结束时回收消息
+            
             Room room = session.DomainScene().GetComponent<Room>();
             
             Log.Debug($"OneFrameInputs: {room.AuthorityFrame + 1} {input.ToJson()}");
@@ -42,8 +44,6 @@ namespace ET.Client
                     room.SendHash(room.AuthorityFrame);
                 }
             }
-            // 回收消息,减少GC
-            NetServices.Instance.RecycleMessage(input);
             await ETTask.CompletedTask;
         }
     }

+ 5 - 1
Unity/Assets/Scripts/Hotfix/Server/Demo/Scenes/Gate/SessionPlayerComponentSystem.cs

@@ -5,8 +5,12 @@
         [EntitySystem]
         private static void Destroy(this SessionPlayerComponent self)
         {
+            if (ActorLocationSenderComponent.Instance.IsDisposed)
+            {
+                return;
+            }
             // 发送断线消息
-            ActorLocationSenderComponent.Instance?.Get(LocationType.Unit)?.Send(self.Player.Id, new G2M_SessionDisconnect());
+            ActorLocationSenderComponent.Instance.Get(LocationType.Unit).Send(self.Player.Id, new G2M_SessionDisconnect());
         }
     }
 }

+ 48 - 0
Unity/Assets/Scripts/Model/Generate/Client/Message/LockStepOuter_C_11001.cs

@@ -8,6 +8,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2G_Match: MessageObject, IRequest
 	{
+		public static C2G_Match Create(bool isFromPool = false) { return !isFromPool? new C2G_Match() : NetServices.Instance.FetchMessage(typeof(C2G_Match)) as C2G_Match; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -17,6 +21,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2C_Match: MessageObject, IResponse
 	{
+		public static G2C_Match Create(bool isFromPool = false) { return !isFromPool? new G2C_Match() : NetServices.Instance.FetchMessage(typeof(G2C_Match)) as G2C_Match; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -33,6 +41,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class Match2G_NotifyMatchSuccess: MessageObject, IActorMessage
 	{
+		public static Match2G_NotifyMatchSuccess Create(bool isFromPool = false) { return !isFromPool? new Match2G_NotifyMatchSuccess() : NetServices.Instance.FetchMessage(typeof(Match2G_NotifyMatchSuccess)) as Match2G_NotifyMatchSuccess; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -47,6 +59,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2Room_ChangeSceneFinish: MessageObject, IActorRoom
 	{
+		public static C2Room_ChangeSceneFinish Create(bool isFromPool = false) { return !isFromPool? new C2Room_ChangeSceneFinish() : NetServices.Instance.FetchMessage(typeof(C2Room_ChangeSceneFinish)) as C2Room_ChangeSceneFinish; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public long PlayerId { get; set; }
 
@@ -56,6 +72,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class LockStepUnitInfo: MessageObject
 	{
+		public static LockStepUnitInfo Create(bool isFromPool = false) { return !isFromPool? new LockStepUnitInfo() : NetServices.Instance.FetchMessage(typeof(LockStepUnitInfo)) as LockStepUnitInfo; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public long PlayerId { get; set; }
 
@@ -72,6 +92,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class Room2C_Start: MessageObject, IActorMessage
 	{
+		public static Room2C_Start Create(bool isFromPool = false) { return !isFromPool? new Room2C_Start() : NetServices.Instance.FetchMessage(typeof(Room2C_Start)) as Room2C_Start; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public long StartTime { get; set; }
 
@@ -84,6 +108,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class FrameMessage: MessageObject, IActorMessage
 	{
+		public static FrameMessage Create(bool isFromPool = false) { return !isFromPool? new FrameMessage() : NetServices.Instance.FetchMessage(typeof(FrameMessage)) as FrameMessage; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int Frame { get; set; }
 
@@ -99,6 +127,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class OneFrameInputs: MessageObject, IActorMessage
 	{
+		public static OneFrameInputs Create(bool isFromPool = false) { return !isFromPool? new OneFrameInputs() : NetServices.Instance.FetchMessage(typeof(OneFrameInputs)) as OneFrameInputs; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MongoDB.Bson.Serialization.Attributes.BsonDictionaryOptions(MongoDB.Bson.Serialization.Options.DictionaryRepresentation.ArrayOfArrays)]
 		[MemoryPackOrder(1)]
 		public Dictionary<long, LSInput> Inputs { get; set; }
@@ -108,6 +140,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class Room2C_AdjustUpdateTime: MessageObject, IActorMessage
 	{
+		public static Room2C_AdjustUpdateTime Create(bool isFromPool = false) { return !isFromPool? new Room2C_AdjustUpdateTime() : NetServices.Instance.FetchMessage(typeof(Room2C_AdjustUpdateTime)) as Room2C_AdjustUpdateTime; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int DiffTime { get; set; }
 
@@ -117,6 +153,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2Room_CheckHash: MessageObject, IActorRoom
 	{
+		public static C2Room_CheckHash Create(bool isFromPool = false) { return !isFromPool? new C2Room_CheckHash() : NetServices.Instance.FetchMessage(typeof(C2Room_CheckHash)) as C2Room_CheckHash; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public long PlayerId { get; set; }
 
@@ -132,6 +172,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class Room2C_CheckHashFail: MessageObject, IActorMessage
 	{
+		public static Room2C_CheckHashFail Create(bool isFromPool = false) { return !isFromPool? new Room2C_CheckHashFail() : NetServices.Instance.FetchMessage(typeof(Room2C_CheckHashFail)) as Room2C_CheckHashFail; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int Frame { get; set; }
 
@@ -144,6 +188,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2C_Reconnect: MessageObject, IActorMessage
 	{
+		public static G2C_Reconnect Create(bool isFromPool = false) { return !isFromPool? new G2C_Reconnect() : NetServices.Instance.FetchMessage(typeof(G2C_Reconnect)) as G2C_Reconnect; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public long StartTime { get; set; }
 

+ 144 - 0
Unity/Assets/Scripts/Model/Generate/Client/Message/OuterMessage_C_10001.cs

@@ -7,6 +7,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class HttpGetRouterResponse: MessageObject
 	{
+		public static HttpGetRouterResponse Create(bool isFromPool = false) { return !isFromPool? new HttpGetRouterResponse() : NetServices.Instance.FetchMessage(typeof(HttpGetRouterResponse)) as HttpGetRouterResponse; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public List<string> Realms { get; set; }
 
@@ -19,6 +23,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class RouterSync: MessageObject
 	{
+		public static RouterSync Create(bool isFromPool = false) { return !isFromPool? new RouterSync() : NetServices.Instance.FetchMessage(typeof(RouterSync)) as RouterSync; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public uint ConnectId { get; set; }
 
@@ -32,6 +40,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2M_TestRequest: MessageObject, IActorLocationRequest
 	{
+		public static C2M_TestRequest Create(bool isFromPool = false) { return !isFromPool? new C2M_TestRequest() : NetServices.Instance.FetchMessage(typeof(C2M_TestRequest)) as C2M_TestRequest; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -44,6 +56,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_TestResponse: MessageObject, IActorResponse
 	{
+		public static M2C_TestResponse Create(bool isFromPool = false) { return !isFromPool? new M2C_TestResponse() : NetServices.Instance.FetchMessage(typeof(M2C_TestResponse)) as M2C_TestResponse; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -63,6 +79,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class Actor_TransferRequest: MessageObject, IActorLocationRequest
 	{
+		public static Actor_TransferRequest Create(bool isFromPool = false) { return !isFromPool? new Actor_TransferRequest() : NetServices.Instance.FetchMessage(typeof(Actor_TransferRequest)) as Actor_TransferRequest; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -75,6 +95,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class Actor_TransferResponse: MessageObject, IActorLocationResponse
 	{
+		public static Actor_TransferResponse Create(bool isFromPool = false) { return !isFromPool? new Actor_TransferResponse() : NetServices.Instance.FetchMessage(typeof(Actor_TransferResponse)) as Actor_TransferResponse; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -91,6 +115,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2G_EnterMap: MessageObject, IRequest
 	{
+		public static C2G_EnterMap Create(bool isFromPool = false) { return !isFromPool? new C2G_EnterMap() : NetServices.Instance.FetchMessage(typeof(C2G_EnterMap)) as C2G_EnterMap; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -100,6 +128,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2C_EnterMap: MessageObject, IResponse
 	{
+		public static G2C_EnterMap Create(bool isFromPool = false) { return !isFromPool? new G2C_EnterMap() : NetServices.Instance.FetchMessage(typeof(G2C_EnterMap)) as G2C_EnterMap; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -119,6 +151,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class MoveInfo: MessageObject
 	{
+		public static MoveInfo Create(bool isFromPool = false) { return !isFromPool? new MoveInfo() : NetServices.Instance.FetchMessage(typeof(MoveInfo)) as MoveInfo; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public List<Unity.Mathematics.float3> Points { get; set; }
 
@@ -134,6 +170,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class UnitInfo: MessageObject
 	{
+		public static UnitInfo Create(bool isFromPool = false) { return !isFromPool? new UnitInfo() : NetServices.Instance.FetchMessage(typeof(UnitInfo)) as UnitInfo; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public long UnitId { get; set; }
 
@@ -161,6 +201,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_CreateUnits: MessageObject, IActorMessage
 	{
+		public static M2C_CreateUnits Create(bool isFromPool = false) { return !isFromPool? new M2C_CreateUnits() : NetServices.Instance.FetchMessage(typeof(M2C_CreateUnits)) as M2C_CreateUnits; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public List<UnitInfo> Units { get; set; }
 
@@ -170,6 +214,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_CreateMyUnit: MessageObject, IActorMessage
 	{
+		public static M2C_CreateMyUnit Create(bool isFromPool = false) { return !isFromPool? new M2C_CreateMyUnit() : NetServices.Instance.FetchMessage(typeof(M2C_CreateMyUnit)) as M2C_CreateMyUnit; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public UnitInfo Unit { get; set; }
 
@@ -179,6 +227,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_StartSceneChange: MessageObject, IActorMessage
 	{
+		public static M2C_StartSceneChange Create(bool isFromPool = false) { return !isFromPool? new M2C_StartSceneChange() : NetServices.Instance.FetchMessage(typeof(M2C_StartSceneChange)) as M2C_StartSceneChange; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public long SceneInstanceId { get; set; }
 
@@ -191,6 +243,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_RemoveUnits: MessageObject, IActorMessage
 	{
+		public static M2C_RemoveUnits Create(bool isFromPool = false) { return !isFromPool? new M2C_RemoveUnits() : NetServices.Instance.FetchMessage(typeof(M2C_RemoveUnits)) as M2C_RemoveUnits; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public List<long> Units { get; set; }
 
@@ -200,6 +256,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2M_PathfindingResult: MessageObject, IActorLocationMessage
 	{
+		public static C2M_PathfindingResult Create(bool isFromPool = false) { return !isFromPool? new C2M_PathfindingResult() : NetServices.Instance.FetchMessage(typeof(C2M_PathfindingResult)) as C2M_PathfindingResult; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -212,6 +272,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2M_Stop: MessageObject, IActorLocationMessage
 	{
+		public static C2M_Stop Create(bool isFromPool = false) { return !isFromPool? new C2M_Stop() : NetServices.Instance.FetchMessage(typeof(C2M_Stop)) as C2M_Stop; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -221,6 +285,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_PathfindingResult: MessageObject, IActorMessage
 	{
+		public static M2C_PathfindingResult Create(bool isFromPool = false) { return !isFromPool? new M2C_PathfindingResult() : NetServices.Instance.FetchMessage(typeof(M2C_PathfindingResult)) as M2C_PathfindingResult; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public long Id { get; set; }
 
@@ -236,6 +304,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_Stop: MessageObject, IActorMessage
 	{
+		public static M2C_Stop Create(bool isFromPool = false) { return !isFromPool? new M2C_Stop() : NetServices.Instance.FetchMessage(typeof(M2C_Stop)) as M2C_Stop; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int Error { get; set; }
 
@@ -255,6 +327,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2G_Ping: MessageObject, IRequest
 	{
+		public static C2G_Ping Create(bool isFromPool = false) { return !isFromPool? new C2G_Ping() : NetServices.Instance.FetchMessage(typeof(C2G_Ping)) as C2G_Ping; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -264,6 +340,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2C_Ping: MessageObject, IResponse
 	{
+		public static G2C_Ping Create(bool isFromPool = false) { return !isFromPool? new G2C_Ping() : NetServices.Instance.FetchMessage(typeof(G2C_Ping)) as G2C_Ping; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -282,6 +362,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2C_Test: MessageObject, IMessage
 	{
+		public static G2C_Test Create(bool isFromPool = false) { return !isFromPool? new G2C_Test() : NetServices.Instance.FetchMessage(typeof(G2C_Test)) as G2C_Test; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 	}
 
 	[ResponseType(nameof(M2C_Reload))]
@@ -289,6 +373,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2M_Reload: MessageObject, IRequest
 	{
+		public static C2M_Reload Create(bool isFromPool = false) { return !isFromPool? new C2M_Reload() : NetServices.Instance.FetchMessage(typeof(C2M_Reload)) as C2M_Reload; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -304,6 +392,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_Reload: MessageObject, IResponse
 	{
+		public static M2C_Reload Create(bool isFromPool = false) { return !isFromPool? new M2C_Reload() : NetServices.Instance.FetchMessage(typeof(M2C_Reload)) as M2C_Reload; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -320,6 +412,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2R_Login: MessageObject, IRequest
 	{
+		public static C2R_Login Create(bool isFromPool = false) { return !isFromPool? new C2R_Login() : NetServices.Instance.FetchMessage(typeof(C2R_Login)) as C2R_Login; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -335,6 +431,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class R2C_Login: MessageObject, IResponse
 	{
+		public static R2C_Login Create(bool isFromPool = false) { return !isFromPool? new R2C_Login() : NetServices.Instance.FetchMessage(typeof(R2C_Login)) as R2C_Login; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -360,6 +460,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2G_LoginGate: MessageObject, IRequest
 	{
+		public static C2G_LoginGate Create(bool isFromPool = false) { return !isFromPool? new C2G_LoginGate() : NetServices.Instance.FetchMessage(typeof(C2G_LoginGate)) as C2G_LoginGate; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -375,6 +479,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2C_LoginGate: MessageObject, IResponse
 	{
+		public static G2C_LoginGate Create(bool isFromPool = false) { return !isFromPool? new G2C_LoginGate() : NetServices.Instance.FetchMessage(typeof(G2C_LoginGate)) as G2C_LoginGate; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -393,6 +501,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2C_TestHotfixMessage: MessageObject, IMessage
 	{
+		public static G2C_TestHotfixMessage Create(bool isFromPool = false) { return !isFromPool? new G2C_TestHotfixMessage() : NetServices.Instance.FetchMessage(typeof(G2C_TestHotfixMessage)) as G2C_TestHotfixMessage; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public string Info { get; set; }
 
@@ -403,6 +515,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2M_TestRobotCase: MessageObject, IActorLocationRequest
 	{
+		public static C2M_TestRobotCase Create(bool isFromPool = false) { return !isFromPool? new C2M_TestRobotCase() : NetServices.Instance.FetchMessage(typeof(C2M_TestRobotCase)) as C2M_TestRobotCase; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -415,6 +531,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_TestRobotCase: MessageObject, IActorLocationResponse
 	{
+		public static M2C_TestRobotCase Create(bool isFromPool = false) { return !isFromPool? new M2C_TestRobotCase() : NetServices.Instance.FetchMessage(typeof(M2C_TestRobotCase)) as M2C_TestRobotCase; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -433,6 +553,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2M_TestRobotCase2: MessageObject, IActorLocationMessage
 	{
+		public static C2M_TestRobotCase2 Create(bool isFromPool = false) { return !isFromPool? new C2M_TestRobotCase2() : NetServices.Instance.FetchMessage(typeof(C2M_TestRobotCase2)) as C2M_TestRobotCase2; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -445,6 +569,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_TestRobotCase2: MessageObject, IActorLocationMessage
 	{
+		public static M2C_TestRobotCase2 Create(bool isFromPool = false) { return !isFromPool? new M2C_TestRobotCase2() : NetServices.Instance.FetchMessage(typeof(M2C_TestRobotCase2)) as M2C_TestRobotCase2; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -458,6 +586,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2M_TransferMap: MessageObject, IActorLocationRequest
 	{
+		public static C2M_TransferMap Create(bool isFromPool = false) { return !isFromPool? new C2M_TransferMap() : NetServices.Instance.FetchMessage(typeof(C2M_TransferMap)) as C2M_TransferMap; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -467,6 +599,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_TransferMap: MessageObject, IActorLocationResponse
 	{
+		public static M2C_TransferMap Create(bool isFromPool = false) { return !isFromPool? new M2C_TransferMap() : NetServices.Instance.FetchMessage(typeof(M2C_TransferMap)) as M2C_TransferMap; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -483,6 +619,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2G_Benchmark: MessageObject, IRequest
 	{
+		public static C2G_Benchmark Create(bool isFromPool = false) { return !isFromPool? new C2G_Benchmark() : NetServices.Instance.FetchMessage(typeof(C2G_Benchmark)) as C2G_Benchmark; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -492,6 +632,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2C_Benchmark: MessageObject, IResponse
 	{
+		public static G2C_Benchmark Create(bool isFromPool = false) { return !isFromPool? new G2C_Benchmark() : NetServices.Instance.FetchMessage(typeof(G2C_Benchmark)) as G2C_Benchmark; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 

+ 92 - 0
Unity/Assets/Scripts/Model/Generate/ClientServer/Message/InnerMessage_S_20001.cs

@@ -9,6 +9,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class ObjectQueryRequest: MessageObject, IActorRequest
 	{
+		public static ObjectQueryRequest Create(bool isFromPool = false) { return !isFromPool? new ObjectQueryRequest() : NetServices.Instance.FetchMessage(typeof(ObjectQueryRequest)) as ObjectQueryRequest; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -25,6 +29,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2A_Reload: MessageObject, IActorRequest
 	{
+		public static M2A_Reload Create(bool isFromPool = false) { return !isFromPool? new M2A_Reload() : NetServices.Instance.FetchMessage(typeof(M2A_Reload)) as M2A_Reload; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -34,6 +42,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class A2M_Reload: MessageObject, IActorResponse
 	{
+		public static A2M_Reload Create(bool isFromPool = false) { return !isFromPool? new A2M_Reload() : NetServices.Instance.FetchMessage(typeof(A2M_Reload)) as A2M_Reload; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -50,6 +62,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2G_LockRequest: MessageObject, IActorRequest
 	{
+		public static G2G_LockRequest Create(bool isFromPool = false) { return !isFromPool? new G2G_LockRequest() : NetServices.Instance.FetchMessage(typeof(G2G_LockRequest)) as G2G_LockRequest; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -65,6 +81,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2G_LockResponse: MessageObject, IActorResponse
 	{
+		public static G2G_LockResponse Create(bool isFromPool = false) { return !isFromPool? new G2G_LockResponse() : NetServices.Instance.FetchMessage(typeof(G2G_LockResponse)) as G2G_LockResponse; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -81,6 +101,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2G_LockReleaseRequest: MessageObject, IActorRequest
 	{
+		public static G2G_LockReleaseRequest Create(bool isFromPool = false) { return !isFromPool? new G2G_LockReleaseRequest() : NetServices.Instance.FetchMessage(typeof(G2G_LockReleaseRequest)) as G2G_LockReleaseRequest; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -96,6 +120,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2G_LockReleaseResponse: MessageObject, IActorResponse
 	{
+		public static G2G_LockReleaseResponse Create(bool isFromPool = false) { return !isFromPool? new G2G_LockReleaseResponse() : NetServices.Instance.FetchMessage(typeof(G2G_LockReleaseResponse)) as G2G_LockReleaseResponse; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -112,6 +140,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class ObjectAddRequest: MessageObject, IActorRequest
 	{
+		public static ObjectAddRequest Create(bool isFromPool = false) { return !isFromPool? new ObjectAddRequest() : NetServices.Instance.FetchMessage(typeof(ObjectAddRequest)) as ObjectAddRequest; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -130,6 +162,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class ObjectAddResponse: MessageObject, IActorResponse
 	{
+		public static ObjectAddResponse Create(bool isFromPool = false) { return !isFromPool? new ObjectAddResponse() : NetServices.Instance.FetchMessage(typeof(ObjectAddResponse)) as ObjectAddResponse; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -146,6 +182,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class ObjectLockRequest: MessageObject, IActorRequest
 	{
+		public static ObjectLockRequest Create(bool isFromPool = false) { return !isFromPool? new ObjectLockRequest() : NetServices.Instance.FetchMessage(typeof(ObjectLockRequest)) as ObjectLockRequest; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -167,6 +207,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class ObjectLockResponse: MessageObject, IActorResponse
 	{
+		public static ObjectLockResponse Create(bool isFromPool = false) { return !isFromPool? new ObjectLockResponse() : NetServices.Instance.FetchMessage(typeof(ObjectLockResponse)) as ObjectLockResponse; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -183,6 +227,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class ObjectUnLockRequest: MessageObject, IActorRequest
 	{
+		public static ObjectUnLockRequest Create(bool isFromPool = false) { return !isFromPool? new ObjectUnLockRequest() : NetServices.Instance.FetchMessage(typeof(ObjectUnLockRequest)) as ObjectUnLockRequest; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -204,6 +252,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class ObjectUnLockResponse: MessageObject, IActorResponse
 	{
+		public static ObjectUnLockResponse Create(bool isFromPool = false) { return !isFromPool? new ObjectUnLockResponse() : NetServices.Instance.FetchMessage(typeof(ObjectUnLockResponse)) as ObjectUnLockResponse; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -220,6 +272,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class ObjectRemoveRequest: MessageObject, IActorRequest
 	{
+		public static ObjectRemoveRequest Create(bool isFromPool = false) { return !isFromPool? new ObjectRemoveRequest() : NetServices.Instance.FetchMessage(typeof(ObjectRemoveRequest)) as ObjectRemoveRequest; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -235,6 +291,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class ObjectRemoveResponse: MessageObject, IActorResponse
 	{
+		public static ObjectRemoveResponse Create(bool isFromPool = false) { return !isFromPool? new ObjectRemoveResponse() : NetServices.Instance.FetchMessage(typeof(ObjectRemoveResponse)) as ObjectRemoveResponse; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -251,6 +311,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class ObjectGetRequest: MessageObject, IActorRequest
 	{
+		public static ObjectGetRequest Create(bool isFromPool = false) { return !isFromPool? new ObjectGetRequest() : NetServices.Instance.FetchMessage(typeof(ObjectGetRequest)) as ObjectGetRequest; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -266,6 +330,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class ObjectGetResponse: MessageObject, IActorResponse
 	{
+		public static ObjectGetResponse Create(bool isFromPool = false) { return !isFromPool? new ObjectGetResponse() : NetServices.Instance.FetchMessage(typeof(ObjectGetResponse)) as ObjectGetResponse; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -288,6 +356,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class R2G_GetLoginKey: MessageObject, IActorRequest
 	{
+		public static R2G_GetLoginKey Create(bool isFromPool = false) { return !isFromPool? new R2G_GetLoginKey() : NetServices.Instance.FetchMessage(typeof(R2G_GetLoginKey)) as R2G_GetLoginKey; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -300,6 +372,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2R_GetLoginKey: MessageObject, IActorResponse
 	{
+		public static G2R_GetLoginKey Create(bool isFromPool = false) { return !isFromPool? new G2R_GetLoginKey() : NetServices.Instance.FetchMessage(typeof(G2R_GetLoginKey)) as G2R_GetLoginKey; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -321,6 +397,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2M_SessionDisconnect: MessageObject, IActorLocationMessage
 	{
+		public static G2M_SessionDisconnect Create(bool isFromPool = false) { return !isFromPool? new G2M_SessionDisconnect() : NetServices.Instance.FetchMessage(typeof(G2M_SessionDisconnect)) as G2M_SessionDisconnect; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -330,6 +410,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class ObjectQueryResponse: MessageObject, IActorResponse
 	{
+		public static ObjectQueryResponse Create(bool isFromPool = false) { return !isFromPool? new ObjectQueryResponse() : NetServices.Instance.FetchMessage(typeof(ObjectQueryResponse)) as ObjectQueryResponse; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -349,6 +433,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2M_UnitTransferRequest: MessageObject, IActorRequest
 	{
+		public static M2M_UnitTransferRequest Create(bool isFromPool = false) { return !isFromPool? new M2M_UnitTransferRequest() : NetServices.Instance.FetchMessage(typeof(M2M_UnitTransferRequest)) as M2M_UnitTransferRequest; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -367,6 +455,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2M_UnitTransferResponse: MessageObject, IActorResponse
 	{
+		public static M2M_UnitTransferResponse Create(bool isFromPool = false) { return !isFromPool? new M2M_UnitTransferResponse() : NetServices.Instance.FetchMessage(typeof(M2M_UnitTransferResponse)) as M2M_UnitTransferResponse; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 

+ 24 - 0
Unity/Assets/Scripts/Model/Generate/ClientServer/Message/LockStepInner_S_21001.cs

@@ -9,6 +9,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2Match_Match: MessageObject, IActorRequest
 	{
+		public static G2Match_Match Create(bool isFromPool = false) { return !isFromPool? new G2Match_Match() : NetServices.Instance.FetchMessage(typeof(G2Match_Match)) as G2Match_Match; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -21,6 +25,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class Match2G_Match: MessageObject, IActorResponse
 	{
+		public static Match2G_Match Create(bool isFromPool = false) { return !isFromPool? new Match2G_Match() : NetServices.Instance.FetchMessage(typeof(Match2G_Match)) as Match2G_Match; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -37,6 +45,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class Match2Map_GetRoom: MessageObject, IActorRequest
 	{
+		public static Match2Map_GetRoom Create(bool isFromPool = false) { return !isFromPool? new Match2Map_GetRoom() : NetServices.Instance.FetchMessage(typeof(Match2Map_GetRoom)) as Match2Map_GetRoom; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -49,6 +61,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class Map2Match_GetRoom: MessageObject, IActorResponse
 	{
+		public static Map2Match_GetRoom Create(bool isFromPool = false) { return !isFromPool? new Map2Match_GetRoom() : NetServices.Instance.FetchMessage(typeof(Map2Match_GetRoom)) as Map2Match_GetRoom; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -69,6 +85,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2Room_Reconnect: MessageObject, IActorRequest
 	{
+		public static G2Room_Reconnect Create(bool isFromPool = false) { return !isFromPool? new G2Room_Reconnect() : NetServices.Instance.FetchMessage(typeof(G2Room_Reconnect)) as G2Room_Reconnect; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -81,6 +101,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class Room2G_Reconnect: MessageObject, IActorResponse
 	{
+		public static Room2G_Reconnect Create(bool isFromPool = false) { return !isFromPool? new Room2G_Reconnect() : NetServices.Instance.FetchMessage(typeof(Room2G_Reconnect)) as Room2G_Reconnect; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 

+ 48 - 0
Unity/Assets/Scripts/Model/Generate/ClientServer/Message/LockStepOuter_C_11001.cs

@@ -8,6 +8,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2G_Match: MessageObject, IRequest
 	{
+		public static C2G_Match Create(bool isFromPool = false) { return !isFromPool? new C2G_Match() : NetServices.Instance.FetchMessage(typeof(C2G_Match)) as C2G_Match; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -17,6 +21,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2C_Match: MessageObject, IResponse
 	{
+		public static G2C_Match Create(bool isFromPool = false) { return !isFromPool? new G2C_Match() : NetServices.Instance.FetchMessage(typeof(G2C_Match)) as G2C_Match; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -33,6 +41,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class Match2G_NotifyMatchSuccess: MessageObject, IActorMessage
 	{
+		public static Match2G_NotifyMatchSuccess Create(bool isFromPool = false) { return !isFromPool? new Match2G_NotifyMatchSuccess() : NetServices.Instance.FetchMessage(typeof(Match2G_NotifyMatchSuccess)) as Match2G_NotifyMatchSuccess; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -47,6 +59,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2Room_ChangeSceneFinish: MessageObject, IActorRoom
 	{
+		public static C2Room_ChangeSceneFinish Create(bool isFromPool = false) { return !isFromPool? new C2Room_ChangeSceneFinish() : NetServices.Instance.FetchMessage(typeof(C2Room_ChangeSceneFinish)) as C2Room_ChangeSceneFinish; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public long PlayerId { get; set; }
 
@@ -56,6 +72,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class LockStepUnitInfo: MessageObject
 	{
+		public static LockStepUnitInfo Create(bool isFromPool = false) { return !isFromPool? new LockStepUnitInfo() : NetServices.Instance.FetchMessage(typeof(LockStepUnitInfo)) as LockStepUnitInfo; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public long PlayerId { get; set; }
 
@@ -72,6 +92,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class Room2C_Start: MessageObject, IActorMessage
 	{
+		public static Room2C_Start Create(bool isFromPool = false) { return !isFromPool? new Room2C_Start() : NetServices.Instance.FetchMessage(typeof(Room2C_Start)) as Room2C_Start; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public long StartTime { get; set; }
 
@@ -84,6 +108,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class FrameMessage: MessageObject, IActorMessage
 	{
+		public static FrameMessage Create(bool isFromPool = false) { return !isFromPool? new FrameMessage() : NetServices.Instance.FetchMessage(typeof(FrameMessage)) as FrameMessage; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int Frame { get; set; }
 
@@ -99,6 +127,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class OneFrameInputs: MessageObject, IActorMessage
 	{
+		public static OneFrameInputs Create(bool isFromPool = false) { return !isFromPool? new OneFrameInputs() : NetServices.Instance.FetchMessage(typeof(OneFrameInputs)) as OneFrameInputs; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MongoDB.Bson.Serialization.Attributes.BsonDictionaryOptions(MongoDB.Bson.Serialization.Options.DictionaryRepresentation.ArrayOfArrays)]
 		[MemoryPackOrder(1)]
 		public Dictionary<long, LSInput> Inputs { get; set; }
@@ -108,6 +140,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class Room2C_AdjustUpdateTime: MessageObject, IActorMessage
 	{
+		public static Room2C_AdjustUpdateTime Create(bool isFromPool = false) { return !isFromPool? new Room2C_AdjustUpdateTime() : NetServices.Instance.FetchMessage(typeof(Room2C_AdjustUpdateTime)) as Room2C_AdjustUpdateTime; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int DiffTime { get; set; }
 
@@ -117,6 +153,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2Room_CheckHash: MessageObject, IActorRoom
 	{
+		public static C2Room_CheckHash Create(bool isFromPool = false) { return !isFromPool? new C2Room_CheckHash() : NetServices.Instance.FetchMessage(typeof(C2Room_CheckHash)) as C2Room_CheckHash; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public long PlayerId { get; set; }
 
@@ -132,6 +172,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class Room2C_CheckHashFail: MessageObject, IActorMessage
 	{
+		public static Room2C_CheckHashFail Create(bool isFromPool = false) { return !isFromPool? new Room2C_CheckHashFail() : NetServices.Instance.FetchMessage(typeof(Room2C_CheckHashFail)) as Room2C_CheckHashFail; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int Frame { get; set; }
 
@@ -144,6 +188,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2C_Reconnect: MessageObject, IActorMessage
 	{
+		public static G2C_Reconnect Create(bool isFromPool = false) { return !isFromPool? new G2C_Reconnect() : NetServices.Instance.FetchMessage(typeof(G2C_Reconnect)) as G2C_Reconnect; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public long StartTime { get; set; }
 

+ 144 - 0
Unity/Assets/Scripts/Model/Generate/ClientServer/Message/OuterMessage_C_10001.cs

@@ -7,6 +7,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class HttpGetRouterResponse: MessageObject
 	{
+		public static HttpGetRouterResponse Create(bool isFromPool = false) { return !isFromPool? new HttpGetRouterResponse() : NetServices.Instance.FetchMessage(typeof(HttpGetRouterResponse)) as HttpGetRouterResponse; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public List<string> Realms { get; set; }
 
@@ -19,6 +23,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class RouterSync: MessageObject
 	{
+		public static RouterSync Create(bool isFromPool = false) { return !isFromPool? new RouterSync() : NetServices.Instance.FetchMessage(typeof(RouterSync)) as RouterSync; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public uint ConnectId { get; set; }
 
@@ -32,6 +40,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2M_TestRequest: MessageObject, IActorLocationRequest
 	{
+		public static C2M_TestRequest Create(bool isFromPool = false) { return !isFromPool? new C2M_TestRequest() : NetServices.Instance.FetchMessage(typeof(C2M_TestRequest)) as C2M_TestRequest; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -44,6 +56,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_TestResponse: MessageObject, IActorResponse
 	{
+		public static M2C_TestResponse Create(bool isFromPool = false) { return !isFromPool? new M2C_TestResponse() : NetServices.Instance.FetchMessage(typeof(M2C_TestResponse)) as M2C_TestResponse; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -63,6 +79,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class Actor_TransferRequest: MessageObject, IActorLocationRequest
 	{
+		public static Actor_TransferRequest Create(bool isFromPool = false) { return !isFromPool? new Actor_TransferRequest() : NetServices.Instance.FetchMessage(typeof(Actor_TransferRequest)) as Actor_TransferRequest; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -75,6 +95,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class Actor_TransferResponse: MessageObject, IActorLocationResponse
 	{
+		public static Actor_TransferResponse Create(bool isFromPool = false) { return !isFromPool? new Actor_TransferResponse() : NetServices.Instance.FetchMessage(typeof(Actor_TransferResponse)) as Actor_TransferResponse; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -91,6 +115,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2G_EnterMap: MessageObject, IRequest
 	{
+		public static C2G_EnterMap Create(bool isFromPool = false) { return !isFromPool? new C2G_EnterMap() : NetServices.Instance.FetchMessage(typeof(C2G_EnterMap)) as C2G_EnterMap; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -100,6 +128,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2C_EnterMap: MessageObject, IResponse
 	{
+		public static G2C_EnterMap Create(bool isFromPool = false) { return !isFromPool? new G2C_EnterMap() : NetServices.Instance.FetchMessage(typeof(G2C_EnterMap)) as G2C_EnterMap; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -119,6 +151,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class MoveInfo: MessageObject
 	{
+		public static MoveInfo Create(bool isFromPool = false) { return !isFromPool? new MoveInfo() : NetServices.Instance.FetchMessage(typeof(MoveInfo)) as MoveInfo; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public List<Unity.Mathematics.float3> Points { get; set; }
 
@@ -134,6 +170,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class UnitInfo: MessageObject
 	{
+		public static UnitInfo Create(bool isFromPool = false) { return !isFromPool? new UnitInfo() : NetServices.Instance.FetchMessage(typeof(UnitInfo)) as UnitInfo; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public long UnitId { get; set; }
 
@@ -161,6 +201,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_CreateUnits: MessageObject, IActorMessage
 	{
+		public static M2C_CreateUnits Create(bool isFromPool = false) { return !isFromPool? new M2C_CreateUnits() : NetServices.Instance.FetchMessage(typeof(M2C_CreateUnits)) as M2C_CreateUnits; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public List<UnitInfo> Units { get; set; }
 
@@ -170,6 +214,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_CreateMyUnit: MessageObject, IActorMessage
 	{
+		public static M2C_CreateMyUnit Create(bool isFromPool = false) { return !isFromPool? new M2C_CreateMyUnit() : NetServices.Instance.FetchMessage(typeof(M2C_CreateMyUnit)) as M2C_CreateMyUnit; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public UnitInfo Unit { get; set; }
 
@@ -179,6 +227,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_StartSceneChange: MessageObject, IActorMessage
 	{
+		public static M2C_StartSceneChange Create(bool isFromPool = false) { return !isFromPool? new M2C_StartSceneChange() : NetServices.Instance.FetchMessage(typeof(M2C_StartSceneChange)) as M2C_StartSceneChange; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public long SceneInstanceId { get; set; }
 
@@ -191,6 +243,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_RemoveUnits: MessageObject, IActorMessage
 	{
+		public static M2C_RemoveUnits Create(bool isFromPool = false) { return !isFromPool? new M2C_RemoveUnits() : NetServices.Instance.FetchMessage(typeof(M2C_RemoveUnits)) as M2C_RemoveUnits; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public List<long> Units { get; set; }
 
@@ -200,6 +256,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2M_PathfindingResult: MessageObject, IActorLocationMessage
 	{
+		public static C2M_PathfindingResult Create(bool isFromPool = false) { return !isFromPool? new C2M_PathfindingResult() : NetServices.Instance.FetchMessage(typeof(C2M_PathfindingResult)) as C2M_PathfindingResult; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -212,6 +272,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2M_Stop: MessageObject, IActorLocationMessage
 	{
+		public static C2M_Stop Create(bool isFromPool = false) { return !isFromPool? new C2M_Stop() : NetServices.Instance.FetchMessage(typeof(C2M_Stop)) as C2M_Stop; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -221,6 +285,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_PathfindingResult: MessageObject, IActorMessage
 	{
+		public static M2C_PathfindingResult Create(bool isFromPool = false) { return !isFromPool? new M2C_PathfindingResult() : NetServices.Instance.FetchMessage(typeof(M2C_PathfindingResult)) as M2C_PathfindingResult; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public long Id { get; set; }
 
@@ -236,6 +304,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_Stop: MessageObject, IActorMessage
 	{
+		public static M2C_Stop Create(bool isFromPool = false) { return !isFromPool? new M2C_Stop() : NetServices.Instance.FetchMessage(typeof(M2C_Stop)) as M2C_Stop; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int Error { get; set; }
 
@@ -255,6 +327,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2G_Ping: MessageObject, IRequest
 	{
+		public static C2G_Ping Create(bool isFromPool = false) { return !isFromPool? new C2G_Ping() : NetServices.Instance.FetchMessage(typeof(C2G_Ping)) as C2G_Ping; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -264,6 +340,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2C_Ping: MessageObject, IResponse
 	{
+		public static G2C_Ping Create(bool isFromPool = false) { return !isFromPool? new G2C_Ping() : NetServices.Instance.FetchMessage(typeof(G2C_Ping)) as G2C_Ping; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -282,6 +362,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2C_Test: MessageObject, IMessage
 	{
+		public static G2C_Test Create(bool isFromPool = false) { return !isFromPool? new G2C_Test() : NetServices.Instance.FetchMessage(typeof(G2C_Test)) as G2C_Test; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 	}
 
 	[ResponseType(nameof(M2C_Reload))]
@@ -289,6 +373,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2M_Reload: MessageObject, IRequest
 	{
+		public static C2M_Reload Create(bool isFromPool = false) { return !isFromPool? new C2M_Reload() : NetServices.Instance.FetchMessage(typeof(C2M_Reload)) as C2M_Reload; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -304,6 +392,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_Reload: MessageObject, IResponse
 	{
+		public static M2C_Reload Create(bool isFromPool = false) { return !isFromPool? new M2C_Reload() : NetServices.Instance.FetchMessage(typeof(M2C_Reload)) as M2C_Reload; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -320,6 +412,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2R_Login: MessageObject, IRequest
 	{
+		public static C2R_Login Create(bool isFromPool = false) { return !isFromPool? new C2R_Login() : NetServices.Instance.FetchMessage(typeof(C2R_Login)) as C2R_Login; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -335,6 +431,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class R2C_Login: MessageObject, IResponse
 	{
+		public static R2C_Login Create(bool isFromPool = false) { return !isFromPool? new R2C_Login() : NetServices.Instance.FetchMessage(typeof(R2C_Login)) as R2C_Login; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -360,6 +460,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2G_LoginGate: MessageObject, IRequest
 	{
+		public static C2G_LoginGate Create(bool isFromPool = false) { return !isFromPool? new C2G_LoginGate() : NetServices.Instance.FetchMessage(typeof(C2G_LoginGate)) as C2G_LoginGate; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -375,6 +479,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2C_LoginGate: MessageObject, IResponse
 	{
+		public static G2C_LoginGate Create(bool isFromPool = false) { return !isFromPool? new G2C_LoginGate() : NetServices.Instance.FetchMessage(typeof(G2C_LoginGate)) as G2C_LoginGate; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -393,6 +501,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2C_TestHotfixMessage: MessageObject, IMessage
 	{
+		public static G2C_TestHotfixMessage Create(bool isFromPool = false) { return !isFromPool? new G2C_TestHotfixMessage() : NetServices.Instance.FetchMessage(typeof(G2C_TestHotfixMessage)) as G2C_TestHotfixMessage; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public string Info { get; set; }
 
@@ -403,6 +515,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2M_TestRobotCase: MessageObject, IActorLocationRequest
 	{
+		public static C2M_TestRobotCase Create(bool isFromPool = false) { return !isFromPool? new C2M_TestRobotCase() : NetServices.Instance.FetchMessage(typeof(C2M_TestRobotCase)) as C2M_TestRobotCase; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -415,6 +531,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_TestRobotCase: MessageObject, IActorLocationResponse
 	{
+		public static M2C_TestRobotCase Create(bool isFromPool = false) { return !isFromPool? new M2C_TestRobotCase() : NetServices.Instance.FetchMessage(typeof(M2C_TestRobotCase)) as M2C_TestRobotCase; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -433,6 +553,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2M_TestRobotCase2: MessageObject, IActorLocationMessage
 	{
+		public static C2M_TestRobotCase2 Create(bool isFromPool = false) { return !isFromPool? new C2M_TestRobotCase2() : NetServices.Instance.FetchMessage(typeof(C2M_TestRobotCase2)) as C2M_TestRobotCase2; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -445,6 +569,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_TestRobotCase2: MessageObject, IActorLocationMessage
 	{
+		public static M2C_TestRobotCase2 Create(bool isFromPool = false) { return !isFromPool? new M2C_TestRobotCase2() : NetServices.Instance.FetchMessage(typeof(M2C_TestRobotCase2)) as M2C_TestRobotCase2; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -458,6 +586,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2M_TransferMap: MessageObject, IActorLocationRequest
 	{
+		public static C2M_TransferMap Create(bool isFromPool = false) { return !isFromPool? new C2M_TransferMap() : NetServices.Instance.FetchMessage(typeof(C2M_TransferMap)) as C2M_TransferMap; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -467,6 +599,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_TransferMap: MessageObject, IActorLocationResponse
 	{
+		public static M2C_TransferMap Create(bool isFromPool = false) { return !isFromPool? new M2C_TransferMap() : NetServices.Instance.FetchMessage(typeof(M2C_TransferMap)) as M2C_TransferMap; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -483,6 +619,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2G_Benchmark: MessageObject, IRequest
 	{
+		public static C2G_Benchmark Create(bool isFromPool = false) { return !isFromPool? new C2G_Benchmark() : NetServices.Instance.FetchMessage(typeof(C2G_Benchmark)) as C2G_Benchmark; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -492,6 +632,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2C_Benchmark: MessageObject, IResponse
 	{
+		public static G2C_Benchmark Create(bool isFromPool = false) { return !isFromPool? new G2C_Benchmark() : NetServices.Instance.FetchMessage(typeof(G2C_Benchmark)) as G2C_Benchmark; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 

+ 92 - 0
Unity/Assets/Scripts/Model/Generate/Server/Message/InnerMessage_S_20001.cs

@@ -9,6 +9,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class ObjectQueryRequest: MessageObject, IActorRequest
 	{
+		public static ObjectQueryRequest Create(bool isFromPool = false) { return !isFromPool? new ObjectQueryRequest() : NetServices.Instance.FetchMessage(typeof(ObjectQueryRequest)) as ObjectQueryRequest; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -25,6 +29,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2A_Reload: MessageObject, IActorRequest
 	{
+		public static M2A_Reload Create(bool isFromPool = false) { return !isFromPool? new M2A_Reload() : NetServices.Instance.FetchMessage(typeof(M2A_Reload)) as M2A_Reload; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -34,6 +42,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class A2M_Reload: MessageObject, IActorResponse
 	{
+		public static A2M_Reload Create(bool isFromPool = false) { return !isFromPool? new A2M_Reload() : NetServices.Instance.FetchMessage(typeof(A2M_Reload)) as A2M_Reload; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -50,6 +62,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2G_LockRequest: MessageObject, IActorRequest
 	{
+		public static G2G_LockRequest Create(bool isFromPool = false) { return !isFromPool? new G2G_LockRequest() : NetServices.Instance.FetchMessage(typeof(G2G_LockRequest)) as G2G_LockRequest; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -65,6 +81,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2G_LockResponse: MessageObject, IActorResponse
 	{
+		public static G2G_LockResponse Create(bool isFromPool = false) { return !isFromPool? new G2G_LockResponse() : NetServices.Instance.FetchMessage(typeof(G2G_LockResponse)) as G2G_LockResponse; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -81,6 +101,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2G_LockReleaseRequest: MessageObject, IActorRequest
 	{
+		public static G2G_LockReleaseRequest Create(bool isFromPool = false) { return !isFromPool? new G2G_LockReleaseRequest() : NetServices.Instance.FetchMessage(typeof(G2G_LockReleaseRequest)) as G2G_LockReleaseRequest; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -96,6 +120,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2G_LockReleaseResponse: MessageObject, IActorResponse
 	{
+		public static G2G_LockReleaseResponse Create(bool isFromPool = false) { return !isFromPool? new G2G_LockReleaseResponse() : NetServices.Instance.FetchMessage(typeof(G2G_LockReleaseResponse)) as G2G_LockReleaseResponse; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -112,6 +140,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class ObjectAddRequest: MessageObject, IActorRequest
 	{
+		public static ObjectAddRequest Create(bool isFromPool = false) { return !isFromPool? new ObjectAddRequest() : NetServices.Instance.FetchMessage(typeof(ObjectAddRequest)) as ObjectAddRequest; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -130,6 +162,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class ObjectAddResponse: MessageObject, IActorResponse
 	{
+		public static ObjectAddResponse Create(bool isFromPool = false) { return !isFromPool? new ObjectAddResponse() : NetServices.Instance.FetchMessage(typeof(ObjectAddResponse)) as ObjectAddResponse; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -146,6 +182,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class ObjectLockRequest: MessageObject, IActorRequest
 	{
+		public static ObjectLockRequest Create(bool isFromPool = false) { return !isFromPool? new ObjectLockRequest() : NetServices.Instance.FetchMessage(typeof(ObjectLockRequest)) as ObjectLockRequest; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -167,6 +207,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class ObjectLockResponse: MessageObject, IActorResponse
 	{
+		public static ObjectLockResponse Create(bool isFromPool = false) { return !isFromPool? new ObjectLockResponse() : NetServices.Instance.FetchMessage(typeof(ObjectLockResponse)) as ObjectLockResponse; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -183,6 +227,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class ObjectUnLockRequest: MessageObject, IActorRequest
 	{
+		public static ObjectUnLockRequest Create(bool isFromPool = false) { return !isFromPool? new ObjectUnLockRequest() : NetServices.Instance.FetchMessage(typeof(ObjectUnLockRequest)) as ObjectUnLockRequest; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -204,6 +252,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class ObjectUnLockResponse: MessageObject, IActorResponse
 	{
+		public static ObjectUnLockResponse Create(bool isFromPool = false) { return !isFromPool? new ObjectUnLockResponse() : NetServices.Instance.FetchMessage(typeof(ObjectUnLockResponse)) as ObjectUnLockResponse; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -220,6 +272,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class ObjectRemoveRequest: MessageObject, IActorRequest
 	{
+		public static ObjectRemoveRequest Create(bool isFromPool = false) { return !isFromPool? new ObjectRemoveRequest() : NetServices.Instance.FetchMessage(typeof(ObjectRemoveRequest)) as ObjectRemoveRequest; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -235,6 +291,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class ObjectRemoveResponse: MessageObject, IActorResponse
 	{
+		public static ObjectRemoveResponse Create(bool isFromPool = false) { return !isFromPool? new ObjectRemoveResponse() : NetServices.Instance.FetchMessage(typeof(ObjectRemoveResponse)) as ObjectRemoveResponse; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -251,6 +311,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class ObjectGetRequest: MessageObject, IActorRequest
 	{
+		public static ObjectGetRequest Create(bool isFromPool = false) { return !isFromPool? new ObjectGetRequest() : NetServices.Instance.FetchMessage(typeof(ObjectGetRequest)) as ObjectGetRequest; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -266,6 +330,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class ObjectGetResponse: MessageObject, IActorResponse
 	{
+		public static ObjectGetResponse Create(bool isFromPool = false) { return !isFromPool? new ObjectGetResponse() : NetServices.Instance.FetchMessage(typeof(ObjectGetResponse)) as ObjectGetResponse; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -288,6 +356,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class R2G_GetLoginKey: MessageObject, IActorRequest
 	{
+		public static R2G_GetLoginKey Create(bool isFromPool = false) { return !isFromPool? new R2G_GetLoginKey() : NetServices.Instance.FetchMessage(typeof(R2G_GetLoginKey)) as R2G_GetLoginKey; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -300,6 +372,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2R_GetLoginKey: MessageObject, IActorResponse
 	{
+		public static G2R_GetLoginKey Create(bool isFromPool = false) { return !isFromPool? new G2R_GetLoginKey() : NetServices.Instance.FetchMessage(typeof(G2R_GetLoginKey)) as G2R_GetLoginKey; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -321,6 +397,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2M_SessionDisconnect: MessageObject, IActorLocationMessage
 	{
+		public static G2M_SessionDisconnect Create(bool isFromPool = false) { return !isFromPool? new G2M_SessionDisconnect() : NetServices.Instance.FetchMessage(typeof(G2M_SessionDisconnect)) as G2M_SessionDisconnect; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -330,6 +410,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class ObjectQueryResponse: MessageObject, IActorResponse
 	{
+		public static ObjectQueryResponse Create(bool isFromPool = false) { return !isFromPool? new ObjectQueryResponse() : NetServices.Instance.FetchMessage(typeof(ObjectQueryResponse)) as ObjectQueryResponse; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -349,6 +433,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2M_UnitTransferRequest: MessageObject, IActorRequest
 	{
+		public static M2M_UnitTransferRequest Create(bool isFromPool = false) { return !isFromPool? new M2M_UnitTransferRequest() : NetServices.Instance.FetchMessage(typeof(M2M_UnitTransferRequest)) as M2M_UnitTransferRequest; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -367,6 +455,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2M_UnitTransferResponse: MessageObject, IActorResponse
 	{
+		public static M2M_UnitTransferResponse Create(bool isFromPool = false) { return !isFromPool? new M2M_UnitTransferResponse() : NetServices.Instance.FetchMessage(typeof(M2M_UnitTransferResponse)) as M2M_UnitTransferResponse; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 

+ 24 - 0
Unity/Assets/Scripts/Model/Generate/Server/Message/LockStepInner_S_21001.cs

@@ -9,6 +9,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2Match_Match: MessageObject, IActorRequest
 	{
+		public static G2Match_Match Create(bool isFromPool = false) { return !isFromPool? new G2Match_Match() : NetServices.Instance.FetchMessage(typeof(G2Match_Match)) as G2Match_Match; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -21,6 +25,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class Match2G_Match: MessageObject, IActorResponse
 	{
+		public static Match2G_Match Create(bool isFromPool = false) { return !isFromPool? new Match2G_Match() : NetServices.Instance.FetchMessage(typeof(Match2G_Match)) as Match2G_Match; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -37,6 +45,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class Match2Map_GetRoom: MessageObject, IActorRequest
 	{
+		public static Match2Map_GetRoom Create(bool isFromPool = false) { return !isFromPool? new Match2Map_GetRoom() : NetServices.Instance.FetchMessage(typeof(Match2Map_GetRoom)) as Match2Map_GetRoom; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -49,6 +61,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class Map2Match_GetRoom: MessageObject, IActorResponse
 	{
+		public static Map2Match_GetRoom Create(bool isFromPool = false) { return !isFromPool? new Map2Match_GetRoom() : NetServices.Instance.FetchMessage(typeof(Map2Match_GetRoom)) as Map2Match_GetRoom; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -69,6 +85,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2Room_Reconnect: MessageObject, IActorRequest
 	{
+		public static G2Room_Reconnect Create(bool isFromPool = false) { return !isFromPool? new G2Room_Reconnect() : NetServices.Instance.FetchMessage(typeof(G2Room_Reconnect)) as G2Room_Reconnect; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -81,6 +101,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class Room2G_Reconnect: MessageObject, IActorResponse
 	{
+		public static Room2G_Reconnect Create(bool isFromPool = false) { return !isFromPool? new Room2G_Reconnect() : NetServices.Instance.FetchMessage(typeof(Room2G_Reconnect)) as Room2G_Reconnect; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 

+ 48 - 0
Unity/Assets/Scripts/Model/Generate/Server/Message/LockStepOuter_C_11001.cs

@@ -8,6 +8,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2G_Match: MessageObject, IRequest
 	{
+		public static C2G_Match Create(bool isFromPool = false) { return !isFromPool? new C2G_Match() : NetServices.Instance.FetchMessage(typeof(C2G_Match)) as C2G_Match; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -17,6 +21,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2C_Match: MessageObject, IResponse
 	{
+		public static G2C_Match Create(bool isFromPool = false) { return !isFromPool? new G2C_Match() : NetServices.Instance.FetchMessage(typeof(G2C_Match)) as G2C_Match; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -33,6 +41,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class Match2G_NotifyMatchSuccess: MessageObject, IActorMessage
 	{
+		public static Match2G_NotifyMatchSuccess Create(bool isFromPool = false) { return !isFromPool? new Match2G_NotifyMatchSuccess() : NetServices.Instance.FetchMessage(typeof(Match2G_NotifyMatchSuccess)) as Match2G_NotifyMatchSuccess; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -47,6 +59,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2Room_ChangeSceneFinish: MessageObject, IActorRoom
 	{
+		public static C2Room_ChangeSceneFinish Create(bool isFromPool = false) { return !isFromPool? new C2Room_ChangeSceneFinish() : NetServices.Instance.FetchMessage(typeof(C2Room_ChangeSceneFinish)) as C2Room_ChangeSceneFinish; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public long PlayerId { get; set; }
 
@@ -56,6 +72,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class LockStepUnitInfo: MessageObject
 	{
+		public static LockStepUnitInfo Create(bool isFromPool = false) { return !isFromPool? new LockStepUnitInfo() : NetServices.Instance.FetchMessage(typeof(LockStepUnitInfo)) as LockStepUnitInfo; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public long PlayerId { get; set; }
 
@@ -72,6 +92,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class Room2C_Start: MessageObject, IActorMessage
 	{
+		public static Room2C_Start Create(bool isFromPool = false) { return !isFromPool? new Room2C_Start() : NetServices.Instance.FetchMessage(typeof(Room2C_Start)) as Room2C_Start; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public long StartTime { get; set; }
 
@@ -84,6 +108,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class FrameMessage: MessageObject, IActorMessage
 	{
+		public static FrameMessage Create(bool isFromPool = false) { return !isFromPool? new FrameMessage() : NetServices.Instance.FetchMessage(typeof(FrameMessage)) as FrameMessage; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int Frame { get; set; }
 
@@ -99,6 +127,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class OneFrameInputs: MessageObject, IActorMessage
 	{
+		public static OneFrameInputs Create(bool isFromPool = false) { return !isFromPool? new OneFrameInputs() : NetServices.Instance.FetchMessage(typeof(OneFrameInputs)) as OneFrameInputs; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MongoDB.Bson.Serialization.Attributes.BsonDictionaryOptions(MongoDB.Bson.Serialization.Options.DictionaryRepresentation.ArrayOfArrays)]
 		[MemoryPackOrder(1)]
 		public Dictionary<long, LSInput> Inputs { get; set; }
@@ -108,6 +140,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class Room2C_AdjustUpdateTime: MessageObject, IActorMessage
 	{
+		public static Room2C_AdjustUpdateTime Create(bool isFromPool = false) { return !isFromPool? new Room2C_AdjustUpdateTime() : NetServices.Instance.FetchMessage(typeof(Room2C_AdjustUpdateTime)) as Room2C_AdjustUpdateTime; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int DiffTime { get; set; }
 
@@ -117,6 +153,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2Room_CheckHash: MessageObject, IActorRoom
 	{
+		public static C2Room_CheckHash Create(bool isFromPool = false) { return !isFromPool? new C2Room_CheckHash() : NetServices.Instance.FetchMessage(typeof(C2Room_CheckHash)) as C2Room_CheckHash; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public long PlayerId { get; set; }
 
@@ -132,6 +172,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class Room2C_CheckHashFail: MessageObject, IActorMessage
 	{
+		public static Room2C_CheckHashFail Create(bool isFromPool = false) { return !isFromPool? new Room2C_CheckHashFail() : NetServices.Instance.FetchMessage(typeof(Room2C_CheckHashFail)) as Room2C_CheckHashFail; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int Frame { get; set; }
 
@@ -144,6 +188,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2C_Reconnect: MessageObject, IActorMessage
 	{
+		public static G2C_Reconnect Create(bool isFromPool = false) { return !isFromPool? new G2C_Reconnect() : NetServices.Instance.FetchMessage(typeof(G2C_Reconnect)) as G2C_Reconnect; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public long StartTime { get; set; }
 

+ 144 - 0
Unity/Assets/Scripts/Model/Generate/Server/Message/OuterMessage_C_10001.cs

@@ -7,6 +7,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class HttpGetRouterResponse: MessageObject
 	{
+		public static HttpGetRouterResponse Create(bool isFromPool = false) { return !isFromPool? new HttpGetRouterResponse() : NetServices.Instance.FetchMessage(typeof(HttpGetRouterResponse)) as HttpGetRouterResponse; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public List<string> Realms { get; set; }
 
@@ -19,6 +23,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class RouterSync: MessageObject
 	{
+		public static RouterSync Create(bool isFromPool = false) { return !isFromPool? new RouterSync() : NetServices.Instance.FetchMessage(typeof(RouterSync)) as RouterSync; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public uint ConnectId { get; set; }
 
@@ -32,6 +40,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2M_TestRequest: MessageObject, IActorLocationRequest
 	{
+		public static C2M_TestRequest Create(bool isFromPool = false) { return !isFromPool? new C2M_TestRequest() : NetServices.Instance.FetchMessage(typeof(C2M_TestRequest)) as C2M_TestRequest; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -44,6 +56,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_TestResponse: MessageObject, IActorResponse
 	{
+		public static M2C_TestResponse Create(bool isFromPool = false) { return !isFromPool? new M2C_TestResponse() : NetServices.Instance.FetchMessage(typeof(M2C_TestResponse)) as M2C_TestResponse; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -63,6 +79,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class Actor_TransferRequest: MessageObject, IActorLocationRequest
 	{
+		public static Actor_TransferRequest Create(bool isFromPool = false) { return !isFromPool? new Actor_TransferRequest() : NetServices.Instance.FetchMessage(typeof(Actor_TransferRequest)) as Actor_TransferRequest; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -75,6 +95,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class Actor_TransferResponse: MessageObject, IActorLocationResponse
 	{
+		public static Actor_TransferResponse Create(bool isFromPool = false) { return !isFromPool? new Actor_TransferResponse() : NetServices.Instance.FetchMessage(typeof(Actor_TransferResponse)) as Actor_TransferResponse; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -91,6 +115,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2G_EnterMap: MessageObject, IRequest
 	{
+		public static C2G_EnterMap Create(bool isFromPool = false) { return !isFromPool? new C2G_EnterMap() : NetServices.Instance.FetchMessage(typeof(C2G_EnterMap)) as C2G_EnterMap; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -100,6 +128,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2C_EnterMap: MessageObject, IResponse
 	{
+		public static G2C_EnterMap Create(bool isFromPool = false) { return !isFromPool? new G2C_EnterMap() : NetServices.Instance.FetchMessage(typeof(G2C_EnterMap)) as G2C_EnterMap; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -119,6 +151,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class MoveInfo: MessageObject
 	{
+		public static MoveInfo Create(bool isFromPool = false) { return !isFromPool? new MoveInfo() : NetServices.Instance.FetchMessage(typeof(MoveInfo)) as MoveInfo; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public List<Unity.Mathematics.float3> Points { get; set; }
 
@@ -134,6 +170,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class UnitInfo: MessageObject
 	{
+		public static UnitInfo Create(bool isFromPool = false) { return !isFromPool? new UnitInfo() : NetServices.Instance.FetchMessage(typeof(UnitInfo)) as UnitInfo; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public long UnitId { get; set; }
 
@@ -161,6 +201,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_CreateUnits: MessageObject, IActorMessage
 	{
+		public static M2C_CreateUnits Create(bool isFromPool = false) { return !isFromPool? new M2C_CreateUnits() : NetServices.Instance.FetchMessage(typeof(M2C_CreateUnits)) as M2C_CreateUnits; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public List<UnitInfo> Units { get; set; }
 
@@ -170,6 +214,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_CreateMyUnit: MessageObject, IActorMessage
 	{
+		public static M2C_CreateMyUnit Create(bool isFromPool = false) { return !isFromPool? new M2C_CreateMyUnit() : NetServices.Instance.FetchMessage(typeof(M2C_CreateMyUnit)) as M2C_CreateMyUnit; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public UnitInfo Unit { get; set; }
 
@@ -179,6 +227,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_StartSceneChange: MessageObject, IActorMessage
 	{
+		public static M2C_StartSceneChange Create(bool isFromPool = false) { return !isFromPool? new M2C_StartSceneChange() : NetServices.Instance.FetchMessage(typeof(M2C_StartSceneChange)) as M2C_StartSceneChange; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public long SceneInstanceId { get; set; }
 
@@ -191,6 +243,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_RemoveUnits: MessageObject, IActorMessage
 	{
+		public static M2C_RemoveUnits Create(bool isFromPool = false) { return !isFromPool? new M2C_RemoveUnits() : NetServices.Instance.FetchMessage(typeof(M2C_RemoveUnits)) as M2C_RemoveUnits; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public List<long> Units { get; set; }
 
@@ -200,6 +256,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2M_PathfindingResult: MessageObject, IActorLocationMessage
 	{
+		public static C2M_PathfindingResult Create(bool isFromPool = false) { return !isFromPool? new C2M_PathfindingResult() : NetServices.Instance.FetchMessage(typeof(C2M_PathfindingResult)) as C2M_PathfindingResult; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -212,6 +272,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2M_Stop: MessageObject, IActorLocationMessage
 	{
+		public static C2M_Stop Create(bool isFromPool = false) { return !isFromPool? new C2M_Stop() : NetServices.Instance.FetchMessage(typeof(C2M_Stop)) as C2M_Stop; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -221,6 +285,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_PathfindingResult: MessageObject, IActorMessage
 	{
+		public static M2C_PathfindingResult Create(bool isFromPool = false) { return !isFromPool? new M2C_PathfindingResult() : NetServices.Instance.FetchMessage(typeof(M2C_PathfindingResult)) as M2C_PathfindingResult; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public long Id { get; set; }
 
@@ -236,6 +304,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_Stop: MessageObject, IActorMessage
 	{
+		public static M2C_Stop Create(bool isFromPool = false) { return !isFromPool? new M2C_Stop() : NetServices.Instance.FetchMessage(typeof(M2C_Stop)) as M2C_Stop; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int Error { get; set; }
 
@@ -255,6 +327,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2G_Ping: MessageObject, IRequest
 	{
+		public static C2G_Ping Create(bool isFromPool = false) { return !isFromPool? new C2G_Ping() : NetServices.Instance.FetchMessage(typeof(C2G_Ping)) as C2G_Ping; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -264,6 +340,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2C_Ping: MessageObject, IResponse
 	{
+		public static G2C_Ping Create(bool isFromPool = false) { return !isFromPool? new G2C_Ping() : NetServices.Instance.FetchMessage(typeof(G2C_Ping)) as G2C_Ping; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -282,6 +362,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2C_Test: MessageObject, IMessage
 	{
+		public static G2C_Test Create(bool isFromPool = false) { return !isFromPool? new G2C_Test() : NetServices.Instance.FetchMessage(typeof(G2C_Test)) as G2C_Test; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 	}
 
 	[ResponseType(nameof(M2C_Reload))]
@@ -289,6 +373,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2M_Reload: MessageObject, IRequest
 	{
+		public static C2M_Reload Create(bool isFromPool = false) { return !isFromPool? new C2M_Reload() : NetServices.Instance.FetchMessage(typeof(C2M_Reload)) as C2M_Reload; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -304,6 +392,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_Reload: MessageObject, IResponse
 	{
+		public static M2C_Reload Create(bool isFromPool = false) { return !isFromPool? new M2C_Reload() : NetServices.Instance.FetchMessage(typeof(M2C_Reload)) as M2C_Reload; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -320,6 +412,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2R_Login: MessageObject, IRequest
 	{
+		public static C2R_Login Create(bool isFromPool = false) { return !isFromPool? new C2R_Login() : NetServices.Instance.FetchMessage(typeof(C2R_Login)) as C2R_Login; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -335,6 +431,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class R2C_Login: MessageObject, IResponse
 	{
+		public static R2C_Login Create(bool isFromPool = false) { return !isFromPool? new R2C_Login() : NetServices.Instance.FetchMessage(typeof(R2C_Login)) as R2C_Login; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -360,6 +460,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2G_LoginGate: MessageObject, IRequest
 	{
+		public static C2G_LoginGate Create(bool isFromPool = false) { return !isFromPool? new C2G_LoginGate() : NetServices.Instance.FetchMessage(typeof(C2G_LoginGate)) as C2G_LoginGate; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -375,6 +479,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2C_LoginGate: MessageObject, IResponse
 	{
+		public static G2C_LoginGate Create(bool isFromPool = false) { return !isFromPool? new G2C_LoginGate() : NetServices.Instance.FetchMessage(typeof(G2C_LoginGate)) as G2C_LoginGate; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -393,6 +501,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2C_TestHotfixMessage: MessageObject, IMessage
 	{
+		public static G2C_TestHotfixMessage Create(bool isFromPool = false) { return !isFromPool? new G2C_TestHotfixMessage() : NetServices.Instance.FetchMessage(typeof(G2C_TestHotfixMessage)) as G2C_TestHotfixMessage; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public string Info { get; set; }
 
@@ -403,6 +515,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2M_TestRobotCase: MessageObject, IActorLocationRequest
 	{
+		public static C2M_TestRobotCase Create(bool isFromPool = false) { return !isFromPool? new C2M_TestRobotCase() : NetServices.Instance.FetchMessage(typeof(C2M_TestRobotCase)) as C2M_TestRobotCase; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -415,6 +531,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_TestRobotCase: MessageObject, IActorLocationResponse
 	{
+		public static M2C_TestRobotCase Create(bool isFromPool = false) { return !isFromPool? new M2C_TestRobotCase() : NetServices.Instance.FetchMessage(typeof(M2C_TestRobotCase)) as M2C_TestRobotCase; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -433,6 +553,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2M_TestRobotCase2: MessageObject, IActorLocationMessage
 	{
+		public static C2M_TestRobotCase2 Create(bool isFromPool = false) { return !isFromPool? new C2M_TestRobotCase2() : NetServices.Instance.FetchMessage(typeof(C2M_TestRobotCase2)) as C2M_TestRobotCase2; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -445,6 +569,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_TestRobotCase2: MessageObject, IActorLocationMessage
 	{
+		public static M2C_TestRobotCase2 Create(bool isFromPool = false) { return !isFromPool? new M2C_TestRobotCase2() : NetServices.Instance.FetchMessage(typeof(M2C_TestRobotCase2)) as M2C_TestRobotCase2; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -458,6 +586,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2M_TransferMap: MessageObject, IActorLocationRequest
 	{
+		public static C2M_TransferMap Create(bool isFromPool = false) { return !isFromPool? new C2M_TransferMap() : NetServices.Instance.FetchMessage(typeof(C2M_TransferMap)) as C2M_TransferMap; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -467,6 +599,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class M2C_TransferMap: MessageObject, IActorLocationResponse
 	{
+		public static M2C_TransferMap Create(bool isFromPool = false) { return !isFromPool? new M2C_TransferMap() : NetServices.Instance.FetchMessage(typeof(M2C_TransferMap)) as M2C_TransferMap; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -483,6 +619,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class C2G_Benchmark: MessageObject, IRequest
 	{
+		public static C2G_Benchmark Create(bool isFromPool = false) { return !isFromPool? new C2G_Benchmark() : NetServices.Instance.FetchMessage(typeof(C2G_Benchmark)) as C2G_Benchmark; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }
 
@@ -492,6 +632,10 @@ namespace ET
 	[MemoryPackable]
 	public partial class G2C_Benchmark: MessageObject, IResponse
 	{
+		public static G2C_Benchmark Create(bool isFromPool = false) { return !isFromPool? new G2C_Benchmark() : NetServices.Instance.FetchMessage(typeof(G2C_Benchmark)) as G2C_Benchmark; }
+
+		public override void Dispose() { NetServices.Instance.RecycleMessage(this); }
+
 		[MemoryPackOrder(0)]
 		public int RpcId { get; set; }