[new] 新增对Unity 2020的支持
parent
4b43870ff2
commit
8439e4176d
|
@ -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"}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -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;
|
||||
switch (version.major)
|
||||
{
|
||||
case 2021:
|
||||
{
|
||||
if (version.minor1 != 3)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
switch (version.major)
|
||||
{
|
||||
case 2020:
|
||||
{
|
||||
return version.minor2 >= min2021_3_CompatibleMinorVersion;
|
||||
}
|
||||
case 2021:
|
||||
{
|
||||
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}");
|
||||
|
|
Loading…
Reference in New Issue