diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c23daaa..5b5ce78e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,14 +6,23 @@ Removed - 删除功能/接口 Fixed - 修复问题 Others - 其他 --> -## 2024-3-28 【重要更新】 -包含重要bugfix、特性支持 +## 2024-4-17 【普通更新】 ### Feature +* 普通:编译参数增加ERROR_ON_UNDEFINED_SYMBOLS +* 适配插件版本升级到1.2.45 +### Fixed +* 普通:修复团结版dotnet wasm加载报错 +* 普通:修复音频的长度为负数时的异常stop +* 普通:修复配置文件重置bug + +## 2024-4-3 【重要更新】 +包含重要bugfix、特性支持 ### Fixed * 重要:修复UDP接口处理buffer * 重要:修复unity-namespace.js部分环境变量丢失问题 ## 2024-3-28 【普通更新】 +### Feature * 普通:优化对团结版的导出支持 ### Fixed * 普通:兼容PlayDelayed播放 @@ -21,6 +30,7 @@ Others - 其他 * 普通:修复FState偶现报错 ## 2024-3-5 【普通更新】 +### Feature * 普通:WXAssetBundle支持切换CDN * 普通:优化VideoPlayer组件 * 普通:更新小游戏模板捕获全局错误 diff --git a/Editor/WXConvertCore.cs b/Editor/WXConvertCore.cs index 124cdb87..95c1b8bb 100644 --- a/Editor/WXConvertCore.cs +++ b/Editor/WXConvertCore.cs @@ -23,7 +23,7 @@ namespace WeChatWASM public static void Init() { - config = UnityUtil.GetEditorConf(); + //config = UnityUtil.GetEditorConf(); SDKFilePath = Path.Combine(UnityUtil.GetWxSDKRootPath(), "Runtime", "wechat-default", "unity-sdk", "index.js"); string templateHeader = "PROJECT:"; #if TUANJIE_2022_3_OR_NEWER @@ -71,7 +71,7 @@ namespace WeChatWASM BUILD_WEBGL_FAILED = 2, } - public static WXEditorScriptObject config; + public static WXEditorScriptObject config => UnityUtil.GetEditorConf(); public static string webglDir = "webgl"; // 导出的webgl目录 public static string miniGameDir = "minigame"; // 生成小游戏的目录 public static string audioDir = "Assets"; // 音频资源目录 @@ -677,14 +677,14 @@ GameGlobal.unityNamespace.UnityModule = unityFramework;"; if (WXExtEnvDef.GETDEF("UNITY_2021_2_OR_NEWER")) { // PlayerSettings.WeixinMiniGame.emscriptenArgs += " -s EXPORTED_FUNCTIONS=_main,_sbrk,_emscripten_stack_get_base,_emscripten_stack_get_end"; - PlayerSettings.WeixinMiniGame.emscriptenArgs += " -s EXPORTED_FUNCTIONS=_sbrk,_emscripten_stack_get_base,_emscripten_stack_get_end"; + PlayerSettings.WeixinMiniGame.emscriptenArgs += " -s EXPORTED_FUNCTIONS=_sbrk,_emscripten_stack_get_base,_emscripten_stack_get_end -s ERROR_ON_UNDEFINED_SYMBOLS=0"; } #else PlayerSettings.WebGL.emscriptenArgs = string.Empty; if (WXExtEnvDef.GETDEF("UNITY_2021_2_OR_NEWER")) { - PlayerSettings.WebGL.emscriptenArgs += " -s EXPORTED_FUNCTIONS=_sbrk,_emscripten_stack_get_base,_emscripten_stack_get_end"; + PlayerSettings.WebGL.emscriptenArgs += " -s EXPORTED_FUNCTIONS=_sbrk,_emscripten_stack_get_base,_emscripten_stack_get_end -s ERROR_ON_UNDEFINED_SYMBOLS=0"; #if UNITY_2021_2_5 PlayerSettings.WebGL.emscriptenArgs += ",_main"; #endif @@ -1407,6 +1407,7 @@ GameGlobal.unityNamespace.UnityModule = unityFramework;"; (config.CompileOptions.DevelopBuild && config.CompileOptions.enableRenderAnalysis) ? "true" : "false", config.ProjectConf.IOSDevicePixelRatio.ToString(), UseIL2CPP ? "" : "/framework", + UseIL2CPP ? "false" : "true", }); List replaceList = new List(replaceArrayList); diff --git a/Editor/WXEditorSettingHelper.cs b/Editor/WXEditorSettingHelper.cs index 26482eef..b68aa4d3 100644 --- a/Editor/WXEditorSettingHelper.cs +++ b/Editor/WXEditorSettingHelper.cs @@ -48,11 +48,11 @@ namespace WeChatWASM } - loadData(); + //loadData(); foldInstantGame = WXConvertCore.IsInstantGameAutoStreaming(); } - private static WXEditorScriptObject config = UnityUtil.GetEditorConf(); + //private static WXEditorScriptObject config = UnityUtil.GetEditorConf(); public void OnFocus() @@ -346,7 +346,7 @@ namespace WeChatWASM { // SDKFilePath = Path.Combine(Application.dataPath, "WX-WASM-SDK-V2", "Runtime", "wechat-default", "unity-sdk", "index.js"); SDKFilePath = Path.Combine(UnityUtil.GetWxSDKRootPath(), "Runtime", "wechat-default", "unity-sdk", "index.js"); - config = UnityUtil.GetEditorConf(); + var config = UnityUtil.GetEditorConf(); // Instant Game if (WXConvertCore.IsInstantGameAutoStreaming()) diff --git a/Editor/WXPluginVersion.cs b/Editor/WXPluginVersion.cs index 0f4029f5..f17b2a04 100644 --- a/Editor/WXPluginVersion.cs +++ b/Editor/WXPluginVersion.cs @@ -2,7 +2,7 @@ { public class WXPluginVersion { - public static string pluginVersion = "202404031940"; // 这一行不要改他,导出的时候会自动替换 + public static string pluginVersion = "202404171424"; // 这一行不要改他,导出的时候会自动替换 } public class WXPluginConf diff --git a/Editor/wx-editor.dll b/Editor/wx-editor.dll index ef62da01..2f1f4d3d 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 1512b5ea..97db7867 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 530960dc..b85ae502 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 b92c86ed..cf6739be 100644 --- a/Runtime/wechat-default/game.json +++ b/Runtime/wechat-default/game.json @@ -23,7 +23,7 @@ ], "plugins": { "UnityPlugin": { - "version": "1.2.41", + "version": "1.2.45", "provider": "wxe5a48f1ed5f544b7", "contexts": [ { diff --git a/Runtime/wechat-default/unity-namespace.js b/Runtime/wechat-default/unity-namespace.js index 705dcfd8..f4bd7f2f 100644 --- a/Runtime/wechat-default/unity-namespace.js +++ b/Runtime/wechat-default/unity-namespace.js @@ -47,6 +47,8 @@ const unityNamespace = { usedAutoStreaming: $USED_AUTO_STREAMING, // 是否显示渲染日志(dev only) enableRenderAnalysisLog: $ENABLE_RENDER_ANALYSIS_LOG, + // 是否dotnet runtime + useDotnetRuntime: $USE_DOTNET_RUNTIME, }; // 最佳实践检测配置 unityNamespace.monitorConfig = { diff --git a/Runtime/wechat-default/unity-sdk/audio/unity-audio.js b/Runtime/wechat-default/unity-sdk/audio/unity-audio.js index a574bad5..5cb579aa 100644 --- a/Runtime/wechat-default/unity-sdk/audio/unity-audio.js +++ b/Runtime/wechat-default/unity-sdk/audio/unity-audio.js @@ -210,7 +210,8 @@ export class AudioChannelInstance { this.source.isPlaying = true; if (!this.source.loop && this.source.mediaElement) { const { duration } = this.source.mediaElement; - if (duration) { + + if (duration > 0) { if (this.source.stopTicker) { clearTimeout(this.source.stopTicker); this.source.stopTicker = undefined; @@ -279,7 +280,7 @@ export class AudioChannelInstance { const { duration } = this.source.mediaElement; setTimeout(() => { if (soundClip && this.source && this.source.mediaElement) { - soundClip.length = Math.round(this.source.mediaElement.duration * 44100); + soundClip.length = Math.round(Math.max(this.source.mediaElement.duration, 0) * 44100); } }, 0); } diff --git a/package.json b/package.json index 0a2a6c39..36a4e420 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.7","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.8","unity":"2019.4","unityRelease":"29f1","keywords":["Tuanjie","WX"],"dependencies":{}}