diff --git a/Editor/WXConvertCore.cs b/Editor/WXConvertCore.cs index b14a7fd6..124cdb87 100644 --- a/Editor/WXConvertCore.cs +++ b/Editor/WXConvertCore.cs @@ -30,7 +30,15 @@ namespace WeChatWASM PlayerSettings.WeixinMiniGame.threadsSupport = false; PlayerSettings.runInBackground = false; PlayerSettings.WeixinMiniGame.compressionFormat = WeixinMiniGameCompressionFormat.Disabled; - PlayerSettings.WeixinMiniGame.template = $"{templateHeader}WXTemplate2022TJ"; + if(UnityUtil.GetEngineVersion() == UnityUtil.EngineVersion.Tuanjie) + { + var absolutePath = Path.GetFullPath("Packages/com.qq.weixin.minigame/WebGLTemplates/WXTemplate2022TJ"); + PlayerSettings.WeixinMiniGame.template = $"PATH:{absolutePath}"; + } + else + { + PlayerSettings.WeixinMiniGame.template = $"{templateHeader}WXTemplate2022TJ"; + } PlayerSettings.WeixinMiniGame.linkerTarget = WeixinMiniGameLinkerTarget.Wasm; PlayerSettings.WeixinMiniGame.dataCaching = false; PlayerSettings.WeixinMiniGame.debugSymbolMode = WeixinMiniGameDebugSymbolMode.External; @@ -497,7 +505,7 @@ GameGlobal.unityNamespace.UnityModule = unityFramework;"; private static void ConvertCode() { - UnityEngine.Debug.LogFormat("[Converter] Starting to adapt framewor. Dst: " + config.ProjectConf.DST); + UnityEngine.Debug.LogFormat("[Converter] Starting to adapt framework. Dst: " + config.ProjectConf.DST); UnityUtil.DelectDir(Path.Combine(config.ProjectConf.DST, miniGameDir)); string text = String.Empty; @@ -611,8 +619,11 @@ GameGlobal.unityNamespace.UnityModule = unityFramework;"; } text = header + text; + + var targetPath = Path.Combine(config.ProjectConf.DST, miniGameDir, target); if (!UseIL2CPP) { + targetPath = Path.Combine(config.ProjectConf.DST, miniGameDir, frameworkDir, target); Rule[] nativeRules = { new Rule() @@ -654,7 +665,7 @@ GameGlobal.unityNamespace.UnityModule = unityFramework;"; } } - File.WriteAllText(Path.Combine(config.ProjectConf.DST, miniGameDir, target), text, new UTF8Encoding(false)); + File.WriteAllText(targetPath, text, new UTF8Encoding(false)); UnityEngine.Debug.LogFormat("[Converter] adapt framework done! "); } @@ -1572,4 +1583,4 @@ GameGlobal.unityNamespace.UnityModule = unityFramework;"; } } -} \ No newline at end of file +} diff --git a/Editor/WXEditorSettingHelper.cs b/Editor/WXEditorSettingHelper.cs index 84bf61d9..26482eef 100644 --- a/Editor/WXEditorSettingHelper.cs +++ b/Editor/WXEditorSettingHelper.cs @@ -21,10 +21,6 @@ namespace WeChatWASM public WXSettingsHelper() { Type weixinMiniGamePackageHelpersType = Type.GetType("UnityEditor.WeixinPackageHelpers,UnityEditor"); - if (weixinMiniGamePackageHelpersType == null) - { - weixinMiniGamePackageHelpersType = Type.GetType("UnityEditor.WeixinMiniGamePackageHelpers,UnityEditor"); - } if (weixinMiniGamePackageHelpersType != null) { EventInfo onSettingsGUIEvent = weixinMiniGamePackageHelpersType.GetEvent("OnPackageSettingsGUI"); @@ -77,6 +73,7 @@ namespace WeChatWASM public Texture tex; public void OnSettingsGUI(EditorWindow window) { + PluginUpdateManager.CheckUpdateOnce(); scrollRoot = EditorGUILayout.BeginScrollView(scrollRoot); GUIStyle linkStyle = new GUIStyle(GUI.skin.label); diff --git a/Editor/WXEditorWindow.cs b/Editor/WXEditorWindow.cs index e4fb586f..b8427266 100644 --- a/Editor/WXEditorWindow.cs +++ b/Editor/WXEditorWindow.cs @@ -14,8 +14,6 @@ namespace WeChatWASM win.minSize = new Vector2(350, 400); win.position = new Rect(100, 100, 600, 700); win.Show(); - // 打开面板时自动检查更新 - PluginUpdateManager.CheckUpdte(); } // 向前兼容,请使用 WXConvertCore.cs diff --git a/Editor/WXPluginVersion.cs b/Editor/WXPluginVersion.cs index de4a81f8..76f239b8 100644 --- a/Editor/WXPluginVersion.cs +++ b/Editor/WXPluginVersion.cs @@ -2,7 +2,7 @@ { public class WXPluginVersion { - public static string pluginVersion = "202403281934"; // 这一行不要改他,导出的时候会自动替换 + public static string pluginVersion = "202403291954"; // 这一行不要改他,导出的时候会自动替换 } public class WXPluginConf diff --git a/Editor/wx-editor.dll b/Editor/wx-editor.dll index 96801b46..1637f972 100644 Binary files a/Editor/wx-editor.dll and b/Editor/wx-editor.dll differ diff --git a/Runtime/Plugins/wx-runtime-editor.dll b/Runtime/Plugins/wx-runtime-editor.dll index 72910140..80cbdb1f 100644 Binary files a/Runtime/Plugins/wx-runtime-editor.dll and b/Runtime/Plugins/wx-runtime-editor.dll differ diff --git a/Runtime/Plugins/wx-runtime.dll b/Runtime/Plugins/wx-runtime.dll index b494aaa3..5ec23a56 100644 Binary files a/Runtime/Plugins/wx-runtime.dll and b/Runtime/Plugins/wx-runtime.dll differ diff --git a/package.json b/package.json index 045b2e86..f74afeba 100644 --- a/package.json +++ b/package.json @@ -1 +1 @@ -{"name":"com.qq.weixin.minigame","displayName":"WXSDK","description":"WeChat Mini Game Tuanjie Engine Adapter SDK Package.","version":"0.1.5","unity":"2019.4","unityRelease":"29f1","keywords":["Tuanjie","WX"],"dependencies":{}} +{"name":"com.qq.weixin.minigame","displayName":"WXSDK","description":"WeChat Mini Game Tuanjie Engine Adapter SDK Package.","version":"0.1.6","unity":"2019.4","unityRelease":"29f1","keywords":["Tuanjie","WX"],"dependencies":{}}