Procházet zdrojové kódy

ActorLocationSenderComponent增加两个重载方法,Send跟Call,跟之前的不一样的是
1.发送是不会阻塞发送队列的
2.Send没有返回消息
3.如果目标端NotFoundActor,发送端也不会重试
4.要保证目标端提前注册好了location
5.这两个方法适合用于不会迁移的actorlocation
6.性能会比之前的高,因为它不会等待返回消息

tanghai před 2 roky
rodič
revize
411b3ee252

+ 20 - 38
Unity/Assets/Config/Proto/OuterMessage_C_10001.proto

@@ -20,9 +20,9 @@ message C2M_TestRequest // IActorLocationRequest
 	string request = 2;
 }
 
-message M2C_TestResponse // IActorLocationResponse
+message M2C_TestResponse // IActorResponse
 {
-	int32 RpcId = 1;
+    int32 RpcId = 1;
 	int32 Error = 2;
 	string Message = 3;
 	string response = 4;
@@ -75,29 +75,25 @@ message UnitInfo
 	MoveInfo MoveInfo = 7;
 }
 
-message M2C_CreateUnits // IActorLocationMessage
+message M2C_CreateUnits // IActorMessage
 {
-	int32 RpcId = 1;
-	repeated UnitInfo Units = 2;
+	repeated UnitInfo Units = 1;
 }
 
-message M2C_CreateMyUnit // IActorLocationMessage
+message M2C_CreateMyUnit // IActorMessage
 {
-	int32 RpcId = 1;
-	UnitInfo Unit = 2;
+	UnitInfo Unit = 1;
 }
 
-message M2C_StartSceneChange // IActorLocationMessage
+message M2C_StartSceneChange // IActorMessage
 {
-	int32 RpcId = 1;
-	int64 SceneInstanceId = 2;
-	string SceneName = 3;	
+	int64 SceneInstanceId = 1;
+	string SceneName = 2;	
 }
 
-message M2C_RemoveUnits // IActorLocationMessage
+message M2C_RemoveUnits // IActorMessage
 {
-	int32 RpcId = 1;
-	repeated int64 Units = 2;
+	repeated int64 Units = 1;
 }
 
 message C2M_PathfindingResult // IActorLocationMessage
@@ -111,21 +107,19 @@ message C2M_Stop // IActorLocationMessage
 	int32 RpcId = 1;
 }
 
-message M2C_PathfindingResult // IActorLocationMessage
+message M2C_PathfindingResult // IActorMessage
 {
-	int32 RpcId = 1;
-	int64 Id = 2;
-	Unity.Mathematics.float3 Position = 3;
-	repeated Unity.Mathematics.float3 Points = 4;
+	int64 Id = 1;
+	Unity.Mathematics.float3 Position = 2;
+	repeated Unity.Mathematics.float3 Points = 3;
 }
 
-message M2C_Stop // IActorLocationMessage
+message M2C_Stop // IActorMessage
 {
-	int32 RpcId = 1;
-	int32 Error = 2;
-	int64 Id = 3;
-	Unity.Mathematics.float3 Position = 4;
-	Unity.Mathematics.quaternion Rotation = 5;
+	int32 Error = 1;
+	int64 Id = 2;
+	Unity.Mathematics.float3 Position = 3;
+	Unity.Mathematics.quaternion Rotation = 4;
 }
 
 //ResponseType G2C_Ping
@@ -216,18 +210,6 @@ message M2C_TestRobotCase // IActorLocationResponse
 	int32 N = 4;
 }
 
-message C2M_TestRobotCase2 // IActorLocationMessage
-{
-	int32 RpcId = 1;
-	int32 N = 2;
-}
-
-message M2C_TestRobotCase2 // IActorLocationMessage
-{
-	int32 RpcId = 1;
-	int32 N = 2;
-}
-
 //ResponseType M2C_TransferMap
 message C2M_TransferMap // IActorLocationRequest
 {

+ 7 - 6
Unity/Assets/Scripts/Codes/Hotfix/Server/Demo/Helper/MessageHelper.cs

@@ -9,31 +9,32 @@ namespace ET.Server
     {
         public static void NoticeUnitAdd(Unit unit, Unit sendUnit)
         {
-            M2C_CreateUnits createUnits = new M2C_CreateUnits() { Units = new List<UnitInfo>() };
+            M2C_CreateUnits createUnits = new() { Units = new List<UnitInfo>() };
             createUnits.Units.Add(UnitHelper.CreateUnitInfo(sendUnit));
             MessageHelper.SendToClient(unit, createUnits);
         }
         
         public static void NoticeUnitRemove(Unit unit, Unit sendUnit)
         {
-            M2C_RemoveUnits removeUnits = new M2C_RemoveUnits() {Units = new List<long>()};
+            M2C_RemoveUnits removeUnits = new() {Units = new List<long>()};
             removeUnits.Units.Add(sendUnit.Id);
             MessageHelper.SendToClient(unit, removeUnits);
         }
         
-        public static void Broadcast(Unit unit, IActorLocationMessage message)
+        public static void Broadcast(Unit unit, IActorMessage message)
         {
             Dictionary<long, AOIEntity> dict = unit.GetBeSeePlayers();
             // 网络底层做了优化,同一个消息不会多次序列化
+            ActorLocationSenderOneType oneTypeLocationType = ActorLocationSenderComponent.Instance.Get(LocationType.Player);
             foreach (AOIEntity u in dict.Values)
             {
-                ActorLocationSenderComponent.Instance.Get(LocationType.Player).Send(u.Unit.Id, message);
+                oneTypeLocationType.Send(u.Unit.Id, message);
             }
         }
         
-        public static void SendToClient(Unit unit, IActorLocationMessage message)
+        public static void SendToClient(Unit unit, IActorMessage message)
         {
-            SendToLocationActor(LocationType.Player, unit.Id, message);
+            ActorLocationSenderComponent.Instance.Get(LocationType.Player).Send(unit.Id, message);
         }
         
         

+ 0 - 14
Unity/Assets/Scripts/Codes/Hotfix/Server/Demo/Scenes/Map/C2M_TestRobotCase2Handler.cs

@@ -1,14 +0,0 @@
-using System;
-
-namespace ET.Server
-{
-	[ActorMessageHandler(SceneType.Map)]
-	public class C2M_TestRobotCase2Handler : AMActorLocationHandler<Unit, C2M_TestRobotCase2>
-	{
-		protected override async ETTask Run(Unit unit, C2M_TestRobotCase2 message)
-		{
-			MessageHelper.SendToClient(unit, new M2C_TestRobotCase2() {N = message.N});
-			await ETTask.CompletedTask;
-		}
-	}
-}

+ 0 - 11
Unity/Assets/Scripts/Codes/Hotfix/Server/Demo/Scenes/Map/C2M_TestRobotCase2Handler.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: d0e52442c1b6c4c54b3dbdba68700e05
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 6 - 6
Unity/Assets/Scripts/Codes/Hotfix/Server/Demo/Session/NetServerComponentOnReadEvent.cs

@@ -17,6 +17,12 @@
             // 根据消息接口判断是不是Actor消息,不同的接口做不同的处理,比如需要转发给Chat Scene,可以做一个IChatMessage接口
             switch (message)
             {
+                case IActorLocationMessage actorLocationMessage:
+                {
+                    long unitId = session.GetComponent<SessionPlayerComponent>().Player.Id;
+                    ActorLocationSenderComponent.Instance.Get(LocationType.Unit).Send(unitId, actorLocationMessage);
+                    break;
+                }
                 case IActorLocationRequest actorLocationRequest: // gate session收到actor rpc消息,先向actor 发送rpc请求,再将请求结果返回客户端
                 {
                     long unitId = session.GetComponent<SessionPlayerComponent>().Player.Id;
@@ -31,12 +37,6 @@
                     }
                     break;
                 }
-                case IActorLocationMessage actorLocationMessage:
-                {
-                    long unitId = session.GetComponent<SessionPlayerComponent>().Player.Id;
-                    ActorLocationSenderComponent.Instance.Get(LocationType.Unit).Send(unitId, actorLocationMessage);
-                    break;
-                }
                 case IActorRequest actorRequest:  // 分发IActorRequest消息,目前没有用到,需要的自己添加
                 {
                     break;

+ 4 - 10
Unity/Assets/Scripts/Codes/Hotfix/Server/Module/Actor/ActorHandleHelper.cs

@@ -71,16 +71,6 @@ namespace ET.Server
                     await ActorMessageDispatcherComponent.Instance.Handle(entity, fromProcess, iActorRequest);
                     break;
                 }
-                case MailboxType.GateSession:
-                {
-                    if (entity is Player player)
-                    {
-                        player.GetComponent<SessionInfoComponent>()?.Session?.Send(iActorRequest);
-                    }
-                    IActorResponse response = ActorHelper.CreateResponse(iActorRequest, 0);
-                    Reply(fromProcess, response);
-                    break;
-                }
                 default:
                     throw new Exception($"no mailboxtype: {mailBoxComponent.MailboxType} {iActorRequest}");
             }
@@ -132,6 +122,10 @@ namespace ET.Server
                 }
                 case MailboxType.GateSession:
                 {
+                    if (entity is Player player)
+                    {
+                        player.GetComponent<SessionInfoComponent>()?.Session?.Send(iActorMessage);
+                    }
                     break;
                 }
                 default:

+ 7 - 2
Unity/Assets/Scripts/Codes/Hotfix/Server/Module/Actor/ActorMessageSenderComponentSystem.cs

@@ -103,10 +103,15 @@ namespace ET.Server
             
             ProcessActorId processActorId = new(actorId);
             
-            // 这里做了优化,如果发向同一个进程,则直接处理,不需要通过网络层
+            // 这里做了优化,如果发向同一个进程,则等一帧直接处理,不需要通过网络层
             if (processActorId.Process == Options.Instance.Process)
             {
-                NetInnerComponent.Instance.HandleMessage(actorId, message);
+                async ETTask HandleMessageInNextFrame()
+                {
+                    await TimerComponent.Instance.WaitFrameAsync();
+                    NetInnerComponent.Instance.HandleMessage(actorId, message);    
+                }
+                HandleMessageInNextFrame().Coroutine();
                 return;
             }
             

+ 82 - 4
Unity/Assets/Scripts/Codes/Hotfix/Server/Module/ActorLocation/ActorLocationSenderComponentSystem.cs

@@ -44,8 +44,8 @@ namespace ET.Server
                 TimerComponent.Instance?.Remove(ref self.CheckTimer);
             }
         }
-        
-        public static void Check(this ActorLocationSenderOneType self)
+
+        private static void Check(this ActorLocationSenderOneType self)
         {
             using (ListComponent<long> list = ListComponent<long>.Create())
             {
@@ -92,13 +92,91 @@ namespace ET.Server
 
             actorMessageSender.Dispose();
         }
+        
+        // 发给不会改变位置的actorlocation用这个,这种actor消息不会阻塞发送队列,性能更高
+        // 发送过去找不到actor不会重试,用此方法,你得保证actor提前注册好了location
+        public static void Send(this ActorLocationSenderOneType self, long entityId, IActorMessage message)
+        {
+            self.SendInner(entityId, message).Coroutine();
+        }
+        
+        private static async ETTask SendInner(this ActorLocationSenderOneType self, long entityId, IActorMessage message)
+        {
+            ActorLocationSender actorLocationSender = self.GetOrCreate(entityId);
+
+            if (actorLocationSender.ActorId != 0)
+            {
+                actorLocationSender.LastSendOrRecvTime = TimeHelper.ServerNow();
+                ActorMessageSenderComponent.Instance.Send(actorLocationSender.ActorId, message);
+                return;
+            }
+            
+            long instanceId = actorLocationSender.InstanceId;
+            
+            int coroutineLockType = (self.LocationType << 16) | CoroutineLockType.ActorLocationSender;
+            using (await CoroutineLockComponent.Instance.Wait(coroutineLockType, entityId))
+            {
+                if (actorLocationSender.InstanceId != instanceId)
+                {
+                    throw new RpcException(ErrorCore.ERR_ActorTimeout, $"{message}");
+                }
+                
+                if (actorLocationSender.ActorId == 0)
+                {
+                    actorLocationSender.ActorId = await LocationProxyComponent.Instance.Get(self.LocationType, actorLocationSender.Id);
+                    if (actorLocationSender.InstanceId != instanceId)
+                    {
+                        throw new RpcException(ErrorCore.ERR_ActorLocationSenderTimeout2, $"{message}");
+                    }
+                }
+                
+                actorLocationSender.LastSendOrRecvTime = TimeHelper.ServerNow();
+                ActorMessageSenderComponent.Instance.Send(actorLocationSender.ActorId, message);
+            }
+        }
+
+        // 发给不会改变位置的actorlocation用这个,这种actor消息不会阻塞发送队列,性能更高,发送过去找不到actor不会重试
+        // 发送过去找不到actor不会重试,用此方法,你得保证actor提前注册好了location
+        public static async ETTask<IActorResponse> Call(this ActorLocationSenderOneType self, long entityId, IActorRequest request)
+        {
+            ActorLocationSender actorLocationSender = self.GetOrCreate(entityId);
+
+            if (actorLocationSender.ActorId != 0)
+            {
+                actorLocationSender.LastSendOrRecvTime = TimeHelper.ServerNow();
+                return await ActorMessageSenderComponent.Instance.Call(actorLocationSender.ActorId, request);
+            }
+            
+            long instanceId = actorLocationSender.InstanceId;
+            
+            int coroutineLockType = (self.LocationType << 16) | CoroutineLockType.ActorLocationSender;
+            using (await CoroutineLockComponent.Instance.Wait(coroutineLockType, entityId))
+            {
+                if (actorLocationSender.InstanceId != instanceId)
+                {
+                    throw new RpcException(ErrorCore.ERR_ActorTimeout, $"{request}");
+                }
+
+                if (actorLocationSender.ActorId == 0)
+                {
+                    actorLocationSender.ActorId = await LocationProxyComponent.Instance.Get(self.LocationType, actorLocationSender.Id);
+                    if (actorLocationSender.InstanceId != instanceId)
+                    {
+                        throw new RpcException(ErrorCore.ERR_ActorLocationSenderTimeout2, $"{request}");
+                    }
+                }
+            }
+
+            actorLocationSender.LastSendOrRecvTime = TimeHelper.ServerNow();
+            return await ActorMessageSenderComponent.Instance.Call(actorLocationSender.ActorId, request);
+        }
 
-        public static void Send(this ActorLocationSenderOneType self, long entityId, IActorRequest message)
+        public static void Send(this ActorLocationSenderOneType self, long entityId, IActorLocationMessage message)
         {
             self.Call(entityId, message).Coroutine();
         }
 
-        public static async ETTask<IActorResponse> Call(this ActorLocationSenderOneType self, long entityId, IActorRequest iActorRequest)
+        public static async ETTask<IActorResponse> Call(this ActorLocationSenderOneType self, long entityId, IActorLocationRequest iActorRequest)
         {
             ActorLocationSender actorLocationSender = self.GetOrCreate(entityId);
 

+ 13 - 31
Unity/Assets/Scripts/Codes/Model/Generate/Client/Message/OuterMessage_C_10001.cs

@@ -42,7 +42,7 @@ namespace ET
 
 	[Message(OuterMessage.M2C_TestResponse)]
 	[ProtoContract]
-	public partial class M2C_TestResponse: ProtoObject, IActorLocationResponse
+	public partial class M2C_TestResponse: ProtoObject, IActorResponse
 	{
 		[ProtoMember(1)]
 		public int RpcId { get; set; }
@@ -159,51 +159,39 @@ namespace ET
 
 	[Message(OuterMessage.M2C_CreateUnits)]
 	[ProtoContract]
-	public partial class M2C_CreateUnits: ProtoObject, IActorLocationMessage
+	public partial class M2C_CreateUnits: ProtoObject, IActorMessage
 	{
 		[ProtoMember(1)]
-		public int RpcId { get; set; }
-
-		[ProtoMember(2)]
 		public List<UnitInfo> Units { get; set; }
 
 	}
 
 	[Message(OuterMessage.M2C_CreateMyUnit)]
 	[ProtoContract]
-	public partial class M2C_CreateMyUnit: ProtoObject, IActorLocationMessage
+	public partial class M2C_CreateMyUnit: ProtoObject, IActorMessage
 	{
 		[ProtoMember(1)]
-		public int RpcId { get; set; }
-
-		[ProtoMember(2)]
 		public UnitInfo Unit { get; set; }
 
 	}
 
 	[Message(OuterMessage.M2C_StartSceneChange)]
 	[ProtoContract]
-	public partial class M2C_StartSceneChange: ProtoObject, IActorLocationMessage
+	public partial class M2C_StartSceneChange: ProtoObject, IActorMessage
 	{
 		[ProtoMember(1)]
-		public int RpcId { get; set; }
-
-		[ProtoMember(2)]
 		public long SceneInstanceId { get; set; }
 
-		[ProtoMember(3)]
+		[ProtoMember(2)]
 		public string SceneName { get; set; }
 
 	}
 
 	[Message(OuterMessage.M2C_RemoveUnits)]
 	[ProtoContract]
-	public partial class M2C_RemoveUnits: ProtoObject, IActorLocationMessage
+	public partial class M2C_RemoveUnits: ProtoObject, IActorMessage
 	{
 		[ProtoMember(1)]
-		public int RpcId { get; set; }
-
-		[ProtoMember(2)]
 		public List<long> Units { get; set; }
 
 	}
@@ -231,39 +219,33 @@ namespace ET
 
 	[Message(OuterMessage.M2C_PathfindingResult)]
 	[ProtoContract]
-	public partial class M2C_PathfindingResult: ProtoObject, IActorLocationMessage
+	public partial class M2C_PathfindingResult: ProtoObject, IActorMessage
 	{
 		[ProtoMember(1)]
-		public int RpcId { get; set; }
-
-		[ProtoMember(2)]
 		public long Id { get; set; }
 
-		[ProtoMember(3)]
+		[ProtoMember(2)]
 		public Unity.Mathematics.float3 Position { get; set; }
 
-		[ProtoMember(4)]
+		[ProtoMember(3)]
 		public List<Unity.Mathematics.float3> Points { get; set; }
 
 	}
 
 	[Message(OuterMessage.M2C_Stop)]
 	[ProtoContract]
-	public partial class M2C_Stop: ProtoObject, IActorLocationMessage
+	public partial class M2C_Stop: ProtoObject, IActorMessage
 	{
 		[ProtoMember(1)]
-		public int RpcId { get; set; }
-
-		[ProtoMember(2)]
 		public int Error { get; set; }
 
-		[ProtoMember(3)]
+		[ProtoMember(2)]
 		public long Id { get; set; }
 
-		[ProtoMember(4)]
+		[ProtoMember(3)]
 		public Unity.Mathematics.float3 Position { get; set; }
 
-		[ProtoMember(5)]
+		[ProtoMember(4)]
 		public Unity.Mathematics.quaternion Rotation { get; set; }
 
 	}

+ 13 - 31
Unity/Assets/Scripts/Codes/Model/Generate/ClientServer/Message/OuterMessage_C_10001.cs

@@ -42,7 +42,7 @@ namespace ET
 
 	[Message(OuterMessage.M2C_TestResponse)]
 	[ProtoContract]
-	public partial class M2C_TestResponse: ProtoObject, IActorLocationResponse
+	public partial class M2C_TestResponse: ProtoObject, IActorResponse
 	{
 		[ProtoMember(1)]
 		public int RpcId { get; set; }
@@ -159,51 +159,39 @@ namespace ET
 
 	[Message(OuterMessage.M2C_CreateUnits)]
 	[ProtoContract]
-	public partial class M2C_CreateUnits: ProtoObject, IActorLocationMessage
+	public partial class M2C_CreateUnits: ProtoObject, IActorMessage
 	{
 		[ProtoMember(1)]
-		public int RpcId { get; set; }
-
-		[ProtoMember(2)]
 		public List<UnitInfo> Units { get; set; }
 
 	}
 
 	[Message(OuterMessage.M2C_CreateMyUnit)]
 	[ProtoContract]
-	public partial class M2C_CreateMyUnit: ProtoObject, IActorLocationMessage
+	public partial class M2C_CreateMyUnit: ProtoObject, IActorMessage
 	{
 		[ProtoMember(1)]
-		public int RpcId { get; set; }
-
-		[ProtoMember(2)]
 		public UnitInfo Unit { get; set; }
 
 	}
 
 	[Message(OuterMessage.M2C_StartSceneChange)]
 	[ProtoContract]
-	public partial class M2C_StartSceneChange: ProtoObject, IActorLocationMessage
+	public partial class M2C_StartSceneChange: ProtoObject, IActorMessage
 	{
 		[ProtoMember(1)]
-		public int RpcId { get; set; }
-
-		[ProtoMember(2)]
 		public long SceneInstanceId { get; set; }
 
-		[ProtoMember(3)]
+		[ProtoMember(2)]
 		public string SceneName { get; set; }
 
 	}
 
 	[Message(OuterMessage.M2C_RemoveUnits)]
 	[ProtoContract]
-	public partial class M2C_RemoveUnits: ProtoObject, IActorLocationMessage
+	public partial class M2C_RemoveUnits: ProtoObject, IActorMessage
 	{
 		[ProtoMember(1)]
-		public int RpcId { get; set; }
-
-		[ProtoMember(2)]
 		public List<long> Units { get; set; }
 
 	}
@@ -231,39 +219,33 @@ namespace ET
 
 	[Message(OuterMessage.M2C_PathfindingResult)]
 	[ProtoContract]
-	public partial class M2C_PathfindingResult: ProtoObject, IActorLocationMessage
+	public partial class M2C_PathfindingResult: ProtoObject, IActorMessage
 	{
 		[ProtoMember(1)]
-		public int RpcId { get; set; }
-
-		[ProtoMember(2)]
 		public long Id { get; set; }
 
-		[ProtoMember(3)]
+		[ProtoMember(2)]
 		public Unity.Mathematics.float3 Position { get; set; }
 
-		[ProtoMember(4)]
+		[ProtoMember(3)]
 		public List<Unity.Mathematics.float3> Points { get; set; }
 
 	}
 
 	[Message(OuterMessage.M2C_Stop)]
 	[ProtoContract]
-	public partial class M2C_Stop: ProtoObject, IActorLocationMessage
+	public partial class M2C_Stop: ProtoObject, IActorMessage
 	{
 		[ProtoMember(1)]
-		public int RpcId { get; set; }
-
-		[ProtoMember(2)]
 		public int Error { get; set; }
 
-		[ProtoMember(3)]
+		[ProtoMember(2)]
 		public long Id { get; set; }
 
-		[ProtoMember(4)]
+		[ProtoMember(3)]
 		public Unity.Mathematics.float3 Position { get; set; }
 
-		[ProtoMember(5)]
+		[ProtoMember(4)]
 		public Unity.Mathematics.quaternion Rotation { get; set; }
 
 	}

+ 13 - 31
Unity/Assets/Scripts/Codes/Model/Generate/Server/Message/OuterMessage_C_10001.cs

@@ -42,7 +42,7 @@ namespace ET
 
 	[Message(OuterMessage.M2C_TestResponse)]
 	[ProtoContract]
-	public partial class M2C_TestResponse: ProtoObject, IActorLocationResponse
+	public partial class M2C_TestResponse: ProtoObject, IActorResponse
 	{
 		[ProtoMember(1)]
 		public int RpcId { get; set; }
@@ -159,51 +159,39 @@ namespace ET
 
 	[Message(OuterMessage.M2C_CreateUnits)]
 	[ProtoContract]
-	public partial class M2C_CreateUnits: ProtoObject, IActorLocationMessage
+	public partial class M2C_CreateUnits: ProtoObject, IActorMessage
 	{
 		[ProtoMember(1)]
-		public int RpcId { get; set; }
-
-		[ProtoMember(2)]
 		public List<UnitInfo> Units { get; set; }
 
 	}
 
 	[Message(OuterMessage.M2C_CreateMyUnit)]
 	[ProtoContract]
-	public partial class M2C_CreateMyUnit: ProtoObject, IActorLocationMessage
+	public partial class M2C_CreateMyUnit: ProtoObject, IActorMessage
 	{
 		[ProtoMember(1)]
-		public int RpcId { get; set; }
-
-		[ProtoMember(2)]
 		public UnitInfo Unit { get; set; }
 
 	}
 
 	[Message(OuterMessage.M2C_StartSceneChange)]
 	[ProtoContract]
-	public partial class M2C_StartSceneChange: ProtoObject, IActorLocationMessage
+	public partial class M2C_StartSceneChange: ProtoObject, IActorMessage
 	{
 		[ProtoMember(1)]
-		public int RpcId { get; set; }
-
-		[ProtoMember(2)]
 		public long SceneInstanceId { get; set; }
 
-		[ProtoMember(3)]
+		[ProtoMember(2)]
 		public string SceneName { get; set; }
 
 	}
 
 	[Message(OuterMessage.M2C_RemoveUnits)]
 	[ProtoContract]
-	public partial class M2C_RemoveUnits: ProtoObject, IActorLocationMessage
+	public partial class M2C_RemoveUnits: ProtoObject, IActorMessage
 	{
 		[ProtoMember(1)]
-		public int RpcId { get; set; }
-
-		[ProtoMember(2)]
 		public List<long> Units { get; set; }
 
 	}
@@ -231,39 +219,33 @@ namespace ET
 
 	[Message(OuterMessage.M2C_PathfindingResult)]
 	[ProtoContract]
-	public partial class M2C_PathfindingResult: ProtoObject, IActorLocationMessage
+	public partial class M2C_PathfindingResult: ProtoObject, IActorMessage
 	{
 		[ProtoMember(1)]
-		public int RpcId { get; set; }
-
-		[ProtoMember(2)]
 		public long Id { get; set; }
 
-		[ProtoMember(3)]
+		[ProtoMember(2)]
 		public Unity.Mathematics.float3 Position { get; set; }
 
-		[ProtoMember(4)]
+		[ProtoMember(3)]
 		public List<Unity.Mathematics.float3> Points { get; set; }
 
 	}
 
 	[Message(OuterMessage.M2C_Stop)]
 	[ProtoContract]
-	public partial class M2C_Stop: ProtoObject, IActorLocationMessage
+	public partial class M2C_Stop: ProtoObject, IActorMessage
 	{
 		[ProtoMember(1)]
-		public int RpcId { get; set; }
-
-		[ProtoMember(2)]
 		public int Error { get; set; }
 
-		[ProtoMember(3)]
+		[ProtoMember(2)]
 		public long Id { get; set; }
 
-		[ProtoMember(4)]
+		[ProtoMember(3)]
 		public Unity.Mathematics.float3 Position { get; set; }
 
-		[ProtoMember(5)]
+		[ProtoMember(4)]
 		public Unity.Mathematics.quaternion Rotation { get; set; }
 
 	}

+ 1 - 1
Unity/Assets/Scripts/Codes/Model/Share/Module/ActorLocation/IActorLocationMessage.cs

@@ -1,6 +1,6 @@
 namespace ET
 {
-    public interface IActorLocationMessage: IActorRequest
+    public interface IActorLocationMessage: IActorLocationRequest
     {
     }