From 8439e4176d1429f3610770b0e7b6ed379f2278a3 Mon Sep 17 00:00:00 2001 From: walon Date: Sat, 3 Jun 2023 19:42:56 +0800 Subject: [PATCH] =?UTF-8?q?[new]=20=E6=96=B0=E5=A2=9E=E5=AF=B9Unity=202020?= =?UTF-8?q?=E7=9A=84=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Data~/hybridclr_version.json | 9 +++++++-- Editor/Installer/InstallerController.cs | 17 +++++++++-------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/Data~/hybridclr_version.json b/Data~/hybridclr_version.json index 21d49b0..f7386cb 100644 --- a/Data~/hybridclr_version.json +++ b/Data~/hybridclr_version.json @@ -1,13 +1,18 @@ { "versions": [ + { + "unity_version":"2020", + "hybridclr" : { "branch":"v3.0.3"}, + "il2cpp_plus": { "branch":"v2020-3.0.0"} + }, { "unity_version":"2021", - "hybridclr" : { "branch":"v3.0.2"}, + "hybridclr" : { "branch":"v3.0.3"}, "il2cpp_plus": { "branch":"v2021-3.0.1"} }, { "unity_version":"2022", - "hybridclr" : { "branch":"v3.0.2"}, + "hybridclr" : { "branch":"v3.0.3"}, "il2cpp_plus": { "branch":"v2022-3.0.1"} } ] diff --git a/Editor/Installer/InstallerController.cs b/Editor/Installer/InstallerController.cs index 8db12e9..b301f9b 100644 --- a/Editor/Installer/InstallerController.cs +++ b/Editor/Installer/InstallerController.cs @@ -74,6 +74,7 @@ namespace HybridCLR.Editor.Installer private static readonly Regex s_unityVersionPat = new Regex(@"(\d+)\.(\d+)\.(\d+)"); + public const int min2020_3_CompatibleMinorVersion = 26; public const int min2021_3_CompatibleMinorVersion = 0; public const int min2022_3_CompatibleMinorVersion = 0; @@ -111,22 +112,22 @@ namespace HybridCLR.Editor.Installer public bool IsComaptibleVersion() { UnityVersion version = _curVersion; + if (version.minor1 != 3) + { + return false; + } switch (version.major) { + case 2020: + { + return version.minor2 >= min2021_3_CompatibleMinorVersion; + } case 2021: { - if (version.minor1 != 3) - { - return false; - } return version.minor2 >= min2021_3_CompatibleMinorVersion; } case 2022: { - if (version.minor1 != 3) - { - return false; - } return version.minor2 >= min2022_3_CompatibleMinorVersion; } default: throw new Exception($"not support il2cpp_plus branch:{version.major}");