From d9776d17938ac057d48156d02cbc2c16248702e7 Mon Sep 17 00:00:00 2001 From: walon Date: Mon, 8 Apr 2024 21:37:01 +0800 Subject: [PATCH] =?UTF-8?q?[new]=20UnityVersion.h=E4=B8=AD=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=20HYBRIDCLR=5FTUANJIE=5FVERSION=20=E5=AE=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Editor/Il2CppDef/Il2CppDefGenerator.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Editor/Il2CppDef/Il2CppDefGenerator.cs b/Editor/Il2CppDef/Il2CppDefGenerator.cs index 8728c65..e3296ac 100644 --- a/Editor/Il2CppDef/Il2CppDefGenerator.cs +++ b/Editor/Il2CppDef/Il2CppDefGenerator.cs @@ -60,6 +60,16 @@ namespace HybridCLR.Editor.Il2CppDef } } +#if TUANJIE_1_1_OR_NEWER + var tuanjieMatch = Regex.Matches(Application.tuanjieVersion, @"(\d+)\.(\d+)\.(\d+)"); + int tuanjieMajorVer = int.Parse(tuanjieMatch[0].Groups[1].Value); + int tuanjieMinorVer1 = int.Parse(tuanjieMatch[0].Groups[2].Value); + int tuanjieMinorVer2 = int.Parse(tuanjieMatch[0].Groups[3].Value); + lines.Add($"#define HYBRIDCLR_TUANJIE_VERSION {tuanjieMajorVer}{tuanjieMinorVer1.ToString("D2")}{tuanjieMinorVer2.ToString("D2")}"); +#elif TUANJIE_2022_3_OR_NEWER + lines.Add($"#define HYBRIDCLR_TUANJIE_VERSION 10000"); +#endif + frr.Replace("UNITY_VERSION", string.Join("\n", lines)); frr.Commit(_options.OutputFile);