diff --git a/Editor/WXConvertCore.cs b/Editor/WXConvertCore.cs index 13244d5e..02a2eb07 100644 --- a/Editor/WXConvertCore.cs +++ b/Editor/WXConvertCore.cs @@ -19,7 +19,7 @@ namespace WeChatWASM static WXConvertCore() { - + } public static void Init() @@ -61,7 +61,6 @@ namespace WeChatWASM PlayerSettings.WebGL.debugSymbols = true; #endif #endif - EditorSettings.spritePackerMode = SpritePackerMode.AlwaysOnAtlas; } public enum WXExportError @@ -285,7 +284,7 @@ namespace WeChatWASM string[] res = BuildTemplate.CheckCustomCoverBaseConflict( Path.Combine(UnityUtil.GetWxSDKRootPath(), "Runtime", "wechat-default"), Path.Combine(Application.dataPath, "WX-WASM-SDK-V2", "Editor", "template"), - new string[]{ @"\.(js|ts|json)$" } + new string[] { @"\.(js|ts|json)$" } ); if (res.Length != 0) { @@ -487,7 +486,7 @@ namespace WeChatWASM if (!UseIL2CPP) { targetPath = Path.Combine(config.ProjectConf.DST, miniGameDir, frameworkDir, target); - + foreach (var rule in ReplaceRules.NativeRules) { if (ShowMatchFailedWarning(text, rule.old, "native") == false) @@ -1160,7 +1159,7 @@ namespace WeChatWASM for (int i = 1; i < unicodeCodes.Count; i++) { - if(unicodeCodes[i] == endRange) + if (unicodeCodes[i] == endRange) { continue; } @@ -1272,6 +1271,10 @@ namespace WeChatWASM List files = new List { "game.js", "game.json", "project.config.json", "unity-namespace.js", "check-version.js", "unity-sdk/font/index.js" }; ReplaceFileContent(files.ToArray(), replaceList.ToArray()); + BuildTemplate.mergeJSON( + Path.Combine(Application.dataPath, "WX-WASM-SDK-V2", "Editor", "template", "minigame"), + Path.Combine(config.ProjectConf.DST, miniGameDir) + ); Emit(LifeCycle.afterBuildTemplate); UnityEngine.Debug.LogFormat("[Converter] that to modify configs ended"); } diff --git a/Editor/WXExtDef.cs b/Editor/WXExtDef.cs index 81075904..9c651652 100644 --- a/Editor/WXExtDef.cs +++ b/Editor/WXExtDef.cs @@ -52,6 +52,11 @@ namespace WeChatWASM #else WXExtEnvDef.SETDEF("UNITY_EDITOR_OSX", false); #endif +#if UNITY_EDITOR_LINUX + WXExtEnvDef.SETDEF("UNITY_EDITOR_LINUX", true); +#else + WXExtEnvDef.SETDEF("UNITY_EDITOR_LINUX", false); +#endif #if UNITY_2020 WXExtEnvDef.SETDEF("UNITY_2020", true); #else @@ -110,7 +115,8 @@ namespace WeChatWASM { return WXConvertCore.UseIL2CPP; }); - WXExtEnvDef.RegisterAction("UnityUtil.GetWxSDKRootPath", (args) => { + WXExtEnvDef.RegisterAction("UnityUtil.GetWxSDKRootPath", (args) => + { #if UNITY_2018 return Path.Combine(Application.dataPath, "WX-WASM-SDK-V2"); #else @@ -128,7 +134,8 @@ namespace WeChatWASM return dir.FullName; #endif }); - WXExtEnvDef.RegisterAction("UnityUtil.IsAssets", (args) => { + WXExtEnvDef.RegisterAction("UnityUtil.IsAssets", (args) => + { #if UNITY_2018 return true; #else diff --git a/Editor/WXPluginVersion.cs b/Editor/WXPluginVersion.cs index 253beda4..d4edd00c 100644 --- a/Editor/WXPluginVersion.cs +++ b/Editor/WXPluginVersion.cs @@ -2,7 +2,7 @@ { public class WXPluginVersion { - public static string pluginVersion = "202405171605"; // 这一行不要改他,导出的时候会自动替换 + public static string pluginVersion = "202405201546"; // 这一行不要改他,导出的时候会自动替换 } public class WXPluginConf diff --git a/Editor/wx-editor.dll b/Editor/wx-editor.dll index f366964e..5ffc848c 100644 Binary files a/Editor/wx-editor.dll and b/Editor/wx-editor.dll differ diff --git a/Editor/wx-editor.xml b/Editor/wx-editor.xml index f0a11695..afded842 100644 --- a/Editor/wx-editor.xml +++ b/Editor/wx-editor.xml @@ -11,7 +11,7 @@ - 复制覆盖时不参与覆盖的正则表达式,可动态修改 + 复制覆盖时不参与覆盖的正则表达式,可在 beforeCoverTemplate(含)前动态修改 @@ -34,6 +34,20 @@ 构建模板覆盖至输出目录 + + + 合并JSON + + + + + 合并A与B + 规则:将a中的节点覆盖/新增至b中,其中只会覆盖Key-Value节点,数组节点会整枝覆盖 + + + + + 强制将 srcDir 目录中资源逐层覆盖至 dstDir 目录中 diff --git a/Runtime/Plugins/wx-runtime-editor.dll b/Runtime/Plugins/wx-runtime-editor.dll index 5d1f5722..1af14aea 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 925cbb93..63d6df4f 100644 Binary files a/Runtime/Plugins/wx-runtime.dll and b/Runtime/Plugins/wx-runtime.dll differ diff --git a/Runtime/wechat-default/game.json b/Runtime/wechat-default/game.json index 4719f6b3..50dd1e7e 100644 --- a/Runtime/wechat-default/game.json +++ b/Runtime/wechat-default/game.json @@ -23,7 +23,7 @@ ], "plugins": { "UnityPlugin": { - "version": "1.2.54", + "version": "1.2.52", "provider": "wxe5a48f1ed5f544b7", "contexts": [ { diff --git a/package.json b/package.json index adaf0c2e..650163cc 100644 --- a/package.json +++ b/package.json @@ -1 +1,14 @@ -{"name":"com.qq.weixin.minigame","displayName":"WXSDK","description":"WeChat Mini Game Tuanjie Engine Adapter SDK Package.","version":"0.1.15","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.1", + "unity": "2019.4", + "unityRelease": "29f1", + "keywords": [ + "Tuanjie", + "WX" + ], + "dependencies": { + } +} \ No newline at end of file