From 47e4af5e4e5fb1b3470adf522ef75362c86c4d08 Mon Sep 17 00:00:00 2001 From: FirstGearGames Date: Fri, 24 Nov 2023 09:37:52 -0500 Subject: [PATCH] 4.0.4 - Fixed BadImageFormat regression from 3.11.8/4.0.3. - Fixed UpgradeFromV3ToV4Menu blocking builds due to incorrect end define placement. --- .../Extension/TypeReferenceExtensions.cs | 14 -------------- .../Processing/NetworkBehaviourProcessor.cs | 2 +- .../Editor/Upgrading/UpgradeFromV3ToV4Menu.cs | 2 +- Assets/FishNet/VERSION.txt | 2 +- Assets/FishNet/package.json | 2 +- 5 files changed, 4 insertions(+), 18 deletions(-) diff --git a/Assets/FishNet/CodeGenerating/Extension/TypeReferenceExtensions.cs b/Assets/FishNet/CodeGenerating/Extension/TypeReferenceExtensions.cs index fdbb202f..2a36063a 100644 --- a/Assets/FishNet/CodeGenerating/Extension/TypeReferenceExtensions.cs +++ b/Assets/FishNet/CodeGenerating/Extension/TypeReferenceExtensions.cs @@ -33,20 +33,6 @@ public static string GetFullnameWithoutBrackets(this TypeReference tr) return str; } - /// - /// Returns a method in the next base class. - /// - public static MethodDefinition GetMethodInBase(this TypeReference tr, CodegenSession session, string methodName) - { - TypeDefinition td = tr.CachedResolve(session); - if (td.BaseType == null) - return null; - - td = td.BaseType.CachedResolve(session); - return td.GetMethod(methodName); - } - - /// /// Makes a GenericInstanceType. diff --git a/Assets/FishNet/CodeGenerating/Processing/NetworkBehaviourProcessor.cs b/Assets/FishNet/CodeGenerating/Processing/NetworkBehaviourProcessor.cs index da3199dd..ef2e79da 100644 --- a/Assets/FishNet/CodeGenerating/Processing/NetworkBehaviourProcessor.cs +++ b/Assets/FishNet/CodeGenerating/Processing/NetworkBehaviourProcessor.cs @@ -221,7 +221,7 @@ private void CallBaseAwake(TypeDefinition td) return; //Base Awake. - MethodReference baseAwakeMr = td.GetMethodInBase(base.Session, NetworkBehaviourHelper.AWAKE_METHOD_NAME); + MethodReference baseAwakeMr = td.GetMethodReferenceInBase(base.Session, NetworkBehaviourHelper.AWAKE_METHOD_NAME); //This Awake. MethodDefinition tdAwakeMd = td.GetMethod(NetworkBehaviourHelper.AWAKE_METHOD_NAME); diff --git a/Assets/FishNet/Runtime/Editor/Upgrading/UpgradeFromV3ToV4Menu.cs b/Assets/FishNet/Runtime/Editor/Upgrading/UpgradeFromV3ToV4Menu.cs index 56e03724..69458d40 100644 --- a/Assets/FishNet/Runtime/Editor/Upgrading/UpgradeFromV3ToV4Menu.cs +++ b/Assets/FishNet/Runtime/Editor/Upgrading/UpgradeFromV3ToV4Menu.cs @@ -68,5 +68,5 @@ private static bool RemoveOrAddDefine(string define, bool removeDefine) } -#endif } +#endif diff --git a/Assets/FishNet/VERSION.txt b/Assets/FishNet/VERSION.txt index aa31e71b..7d666cb2 100644 --- a/Assets/FishNet/VERSION.txt +++ b/Assets/FishNet/VERSION.txt @@ -1 +1 @@ -4.0.3 \ No newline at end of file +4.0.4 \ No newline at end of file diff --git a/Assets/FishNet/package.json b/Assets/FishNet/package.json index 9b70beb5..abb901bc 100644 --- a/Assets/FishNet/package.json +++ b/Assets/FishNet/package.json @@ -1,6 +1,6 @@ { "name": "com.firstgeargames.fishnet", - "version": "4.0.3", + "version": "4.0.4", "displayName": "FishNet: Networking Evolved", "description": "A feature-rich Unity networking solution aimed towards reliability, ease of use, efficiency, and flexibility.", "unity": "2021.3",