[new] Installer支持团结引擎

main
walon 2024-02-28 14:20:39 +08:00
parent ae88dd0eec
commit 5446bd937c
3 changed files with 11 additions and 4 deletions

View File

@ -19,6 +19,11 @@
"unity_version":"2022",
"hybridclr" : { "branch":"v5.1.0"},
"il2cpp_plus": { "branch":"v2022-5.1.0"}
},
{
"unity_version":"2022-tuanjie",
"hybridclr" : { "branch":"v5.1.0"},
"il2cpp_plus": { "branch":"v2022-tuanjie-5.1.0"}
}
]
}

View File

@ -33,7 +33,7 @@ namespace HybridCLR.Editor.Installer
{
_curVersion = ParseUnityVersion(Application.unityVersion);
_versionManifest = GetHybridCLRVersionManifest();
_curDefaultVersion = _versionManifest.versions.FirstOrDefault(v => v.unity_version == _curVersion.major.ToString());
_curDefaultVersion = _versionManifest.versions.FirstOrDefault(v => _curVersion.isTuanjieEngine ? v.unity_version == $"{_curVersion.major}-tuanjie" : v.unity_version == _curVersion.major.ToString());
PackageVersion = LoadPackageInfo().version;
InstalledLibil2cppVersion = ReadLocalVersion();
}
@ -88,6 +88,7 @@ namespace HybridCLR.Editor.Installer
public int major;
public int minor1;
public int minor2;
public bool isTuanjieEngine;
public override string ToString()
{
@ -108,7 +109,8 @@ namespace HybridCLR.Editor.Installer
int major = int.Parse(match.Groups[1].Value);
int minor1 = int.Parse(match.Groups[2].Value);
int minor2 = int.Parse(match.Groups[3].Value);
return new UnityVersion { major = major, minor1 = minor1, minor2 = minor2 };
bool isTuanjieEngine = versionStr.Contains("t");
return new UnityVersion { major = major, minor1 = minor1, minor2 = minor2, isTuanjieEngine = isTuanjieEngine };
}
public string GetCurrentUnityVersionMinCompatibleVersionStr()

View File

@ -46,7 +46,7 @@ namespace HybridCLR.Editor.Installer
EditorGUILayout.LabelField($"Package Version: v{_controller.PackageVersion}");
GUILayout.Space(5f);
EditorGUILayout.LabelField($"Installed Version: {_controller.InstalledLibil2cppVersion ?? "Unknown"}");
EditorGUILayout.LabelField($"Installed Version: v{_controller.InstalledLibil2cppVersion ?? " Unknown"}");
GUILayout.Space(5f);
GUILayout.Space(10f);