Просмотр исходного кода

Actor消息Rpc返回的消息之前没有判断是否是同一进程,这次补上

tanghai 3 лет назад
Родитель
Сommit
7ec0dbf55f

+ 7 - 0
Unity/Assets/Scripts/Codes/Hotfix/Server/Demo/Session/NetInnerComponentOnReadEvent.cs

@@ -30,6 +30,13 @@ namespace ET.Server
                     {
                         void Reply(IActorResponse response)
                         {
+                            if (fromProcess == Options.Instance.Process) // 返回消息是同一个进程
+                            {
+                                // NetInnerComponent.Instance.HandleMessage(realActorId, response); 等同于直接调用下面这句
+                                ActorMessageSenderComponent.Instance.RunMessage(realActorId, response);
+                                return;
+                            }
+                            
                             Session replySession = NetInnerComponent.Instance.Get(fromProcess);
                             // 发回真实的actorId 做查问题使用
                             replySession.Send(realActorId, response);

+ 34 - 7
Unity/Packages/packages-lock.json

@@ -7,14 +7,14 @@
       "dependencies": {
         "com.unity.mathematics": "1.2.1"
       },
-      "url": "https://packages.unity.cn"
+      "url": "https://packages.unity.com"
     },
     "com.unity.ext.nunit": {
       "version": "1.0.6",
       "depth": 1,
       "source": "registry",
       "dependencies": {},
-      "url": "https://packages.unity.cn"
+      "url": "https://packages.unity.com"
     },
     "com.unity.ide.rider": {
       "version": "3.0.15",
@@ -23,14 +23,30 @@
       "dependencies": {
         "com.unity.ext.nunit": "1.0.6"
       },
-      "url": "https://packages.unity.cn"
+      "url": "https://packages.unity.com"
+    },
+    "com.unity.ide.visualstudio": {
+      "version": "2.0.16",
+      "depth": 0,
+      "source": "registry",
+      "dependencies": {
+        "com.unity.test-framework": "1.1.9"
+      },
+      "url": "https://packages.unity.com"
+    },
+    "com.unity.ide.vscode": {
+      "version": "1.2.5",
+      "depth": 0,
+      "source": "registry",
+      "dependencies": {},
+      "url": "https://packages.unity.com"
     },
     "com.unity.mathematics": {
       "version": "1.2.6",
       "depth": 1,
       "source": "registry",
       "dependencies": {},
-      "url": "https://packages.unity.cn"
+      "url": "https://packages.unity.com"
     },
     "com.unity.render-pipelines.core": {
       "version": "12.1.7",
@@ -58,7 +74,7 @@
       "depth": 2,
       "source": "registry",
       "dependencies": {},
-      "url": "https://packages.unity.cn"
+      "url": "https://packages.unity.com"
     },
     "com.unity.shadergraph": {
       "version": "12.1.7",
@@ -69,6 +85,17 @@
         "com.unity.searcher": "4.9.1"
       }
     },
+    "com.unity.test-framework": {
+      "version": "1.1.31",
+      "depth": 1,
+      "source": "registry",
+      "dependencies": {
+        "com.unity.ext.nunit": "1.0.6",
+        "com.unity.modules.imgui": "1.0.0",
+        "com.unity.modules.jsonserialize": "1.0.0"
+      },
+      "url": "https://packages.unity.com"
+    },
     "com.unity.textmeshpro": {
       "version": "3.0.6",
       "depth": 0,
@@ -76,7 +103,7 @@
       "dependencies": {
         "com.unity.ugui": "1.0.0"
       },
-      "url": "https://packages.unity.cn"
+      "url": "https://packages.unity.com"
     },
     "com.unity.timeline": {
       "version": "1.7.1",
@@ -88,7 +115,7 @@
         "com.unity.modules.audio": "1.0.0",
         "com.unity.modules.particlesystem": "1.0.0"
       },
-      "url": "https://packages.unity.cn"
+      "url": "https://packages.unity.com"
     },
     "com.unity.ugui": {
       "version": "1.0.0",

+ 3 - 3
Unity/ProjectSettings/PackageManagerSettings.asset

@@ -21,7 +21,7 @@ MonoBehaviour:
   m_Registries:
   - m_Id: main
     m_Name: 
-    m_Url: https://packages.unity.cn
+    m_Url: https://packages.unity.com
     m_Scopes: []
     m_IsDefault: 1
     m_Capabilities: 7
@@ -30,6 +30,6 @@ MonoBehaviour:
   m_RegistryInfoDraft:
     m_Modified: 0
     m_ErrorMessage: 
-    m_UserModificationsInstanceId: -846
-    m_OriginalInstanceId: -848
+    m_UserModificationsInstanceId: -824
+    m_OriginalInstanceId: -826
   m_LoadAssets: 0

+ 2 - 2
Unity/ProjectSettings/ProjectVersion.txt

@@ -1,2 +1,2 @@
-m_EditorVersion: 2021.3.6f1c1
-m_EditorVersionWithRevision: 2021.3.6f1c1 (07401303b748)
+m_EditorVersion: 2021.3.6f1
+m_EditorVersionWithRevision: 2021.3.6f1 (7da38d85baf6)