diff --git a/.DS_Store.meta b/.DS_Store.meta new file mode 100644 index 000000000..6c14a5e9f --- /dev/null +++ b/.DS_Store.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d02a9209494b92b24bbbbf70561c7d4b +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 1177ca286..98d33dbb3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,22 +6,7 @@ Removed - 删除功能/接口 Fixed - 修复问题 Others - 其他 --> -## 2025-8-12 v0.1.28 【重要更新】 -### Feature -* 普通:PageManager.Show支持Promise -* 普通:性能工具实时数据流支持 -* 普通:适配插件版本升至1.2.79 -### Fixed -* 重要:修复Touch时进行IOS音频resume造成的卡顿问题 -* 重要:UnityWebRequest、AssetBundle、Addressables等加载已缓存资源时,读文件报错导致游戏异常 - -## 2025-7-10 v0.1.27 【普通更新】 -### Feature -* 普通:新增 JS_Sound_GetPosition 方法用于获取音频播放位置 -* 普通:WebGL2变更为正式特性 -* 普通:支持小游戏试玩导出 - -## 2025-5-8 v0.1.26 【普通更新】 +## v0.1.26 【普通更新】 ### Feature * 普通:增加禁止多点触控的配置 ### Fixed diff --git a/Editor/.DS_Store.meta b/Editor/.DS_Store.meta new file mode 100644 index 000000000..f42fad1e9 --- /dev/null +++ b/Editor/.DS_Store.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 48b579955a5875443578a23e9ddb06f6 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Editor/Brotli/.DS_Store.meta b/Editor/Brotli/.DS_Store.meta new file mode 100644 index 000000000..4e02a2787 --- /dev/null +++ b/Editor/Brotli/.DS_Store.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: cb7e09fc7cd0bc9367c28ed087937e0f +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Editor/Brotli/linux_x86_64/.DS_Store.meta b/Editor/Brotli/linux_x86_64/.DS_Store.meta new file mode 100644 index 000000000..f0be74adb --- /dev/null +++ b/Editor/Brotli/linux_x86_64/.DS_Store.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5eac9051bb059d7b5b558aaa693a6c73 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Editor/Brotli/macos/.DS_Store.meta b/Editor/Brotli/macos/.DS_Store.meta new file mode 100644 index 000000000..6e82556c1 --- /dev/null +++ b/Editor/Brotli/macos/.DS_Store.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 63a74604da3dfac848d6774487d01902 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Editor/Brotli/win_x86_64/.DS_Store.meta b/Editor/Brotli/win_x86_64/.DS_Store.meta new file mode 100644 index 000000000..8cd1b6fd9 --- /dev/null +++ b/Editor/Brotli/win_x86_64/.DS_Store.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9b9e4475ae77322164422dfd0dfbc679 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Editor/BuildProfile.meta b/Editor/BuildProfile.meta index 252f755cb..c9c8801e6 100644 --- a/Editor/BuildProfile.meta +++ b/Editor/BuildProfile.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: DytLvSj8UC9CKob0XUy9Y3usKDmX8US1YgxYmBxa1iAZ/I8JbM5wZwE= +guid: cccbd1d680cfe34fa1fef9e4875e5a12 folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: - assetBundleVariant: + assetBundleVariant: \ No newline at end of file diff --git a/Editor/BuildProfile/.DS_Store.meta b/Editor/BuildProfile/.DS_Store.meta new file mode 100644 index 000000000..c85cc7fdb --- /dev/null +++ b/Editor/BuildProfile/.DS_Store.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d3c1dbd03741a2b0101db4a696f2598c +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Editor/BuildProfile/lib.meta b/Editor/BuildProfile/lib.meta index 87b4cc3cf..e957db024 100644 --- a/Editor/BuildProfile/lib.meta +++ b/Editor/BuildProfile/lib.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: XSwesi78AS28ymfR2HEhHpEBAC2DHupI1hIKP7HApjHRaZgGw+DTwWI= +guid: cccbd1d680cfe34fa1fef9e3375e5a12 folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: - assetBundleVariant: + assetBundleVariant: \ No newline at end of file diff --git a/Editor/BuildProfile/lib/.DS_Store.meta b/Editor/BuildProfile/lib/.DS_Store.meta new file mode 100644 index 000000000..2eb3539bf --- /dev/null +++ b/Editor/BuildProfile/lib/.DS_Store.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 76f0a11a06086a09f93ed83ebe35646c +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Editor/BuildProfile/lib/libwx-metal-cpp.bc b/Editor/BuildProfile/lib/libwx-metal-cpp.bc index e8ae12117..4051e2fde 100644 Binary files a/Editor/BuildProfile/lib/libwx-metal-cpp.bc and b/Editor/BuildProfile/lib/libwx-metal-cpp.bc differ diff --git a/Editor/BuildProfile/lib/libwx-metal-cpp.bc.meta b/Editor/BuildProfile/lib/libwx-metal-cpp.bc.meta index 28e81d7a7..712d7ce24 100644 --- a/Editor/BuildProfile/lib/libwx-metal-cpp.bc.meta +++ b/Editor/BuildProfile/lib/libwx-metal-cpp.bc.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: c113acfee35db6b5c61fd4a76596cfd3 +guid: 0b285665e0e99f23996af7366992c74a DefaultImporter: externalObjects: {} userData: diff --git a/Editor/BuildProfile/lib/mtl_library.jslib b/Editor/BuildProfile/lib/mtl_library.jslib index b6f7cf5df..3a662c16c 100644 --- a/Editor/BuildProfile/lib/mtl_library.jslib +++ b/Editor/BuildProfile/lib/mtl_library.jslib @@ -2,26 +2,21 @@ mergeInto(LibraryManager.library, { // 定义供 C/C++ 调用的 JS 函数 js_batchRender_malloc: function(data, size, isSync) { // 直接从 WASM 内存创建视图(零拷贝) - const binaryData = new Uint8Array(Module.HEAPU8.buffer, data, size); - // 转换为标准 ArrayBuffer(如果需要复制) - const targetBuffer = - binaryData.buffer.slice(binaryData.byteOffset, binaryData.byteOffset + binaryData.byteLength); + const targetBuffer = new Uint8Array(Module.HEAPU8.buffer, data, size); //console.log("processBinaryData invoke"); - const extBuffer = new ArrayBuffer(1); - const headerBuffer = new ArrayBuffer(8); - const headerBufferView = new DataView(headerBuffer); - headerBufferView.setUint32(0, 0xDEC0DE, true); - headerBufferView.setUint32(4, mtl.ctx.__uid(), true); - const merged = new Uint8Array(headerBuffer.byteLength + targetBuffer.byteLength); - merged.set(new Uint8Array(headerBuffer), 0); - merged.set(new Uint8Array(targetBuffer), headerBuffer.byteLength); + const extBuffer = new ArrayBuffer(1); + if(!isSync){ - mtl.batchRenderAsync(merged.buffer, extBuffer); + mtl.batchRenderAsync(targetBuffer, extBuffer); return null; } - const result = mtl.batchRender(merged.buffer, extBuffer).buffer; - if(result.byteLength == 0){ - return null;; + const response = mtl.batchRender(targetBuffer, extBuffer); + if (!response) { + return null; + } + const result = response.buffer; + if(!result || result.byteLength == 0){ + return null; } // 申请内存空间,后续在cpp wasm部分使用,记得释放 const ptr = Module._malloc(result.byteLength); diff --git a/Editor/BuildProfile/lib/mtl_library.jslib.meta b/Editor/BuildProfile/lib/mtl_library.jslib.meta index 3882fefc8..db07c4423 100644 --- a/Editor/BuildProfile/lib/mtl_library.jslib.meta +++ b/Editor/BuildProfile/lib/mtl_library.jslib.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: dda1926f3454e003333e8085a4f2c0fd +guid: 2571a9ee13a2e6a560927f0346f1849e DefaultImporter: externalObjects: {} userData: diff --git a/Editor/LuaHooker/.DS_Store.meta b/Editor/LuaHooker/.DS_Store.meta new file mode 100644 index 000000000..89a5e13cb --- /dev/null +++ b/Editor/LuaHooker/.DS_Store.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 15f6129ae30140b409c3b45371b9641f +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Editor/LuaHooker/mac/.DS_Store.meta b/Editor/LuaHooker/mac/.DS_Store.meta new file mode 100644 index 000000000..e1182fa48 --- /dev/null +++ b/Editor/LuaHooker/mac/.DS_Store.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7118b1f0e046a729c9d5809f07c3a97f +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Editor/LuaHooker/win/.DS_Store.meta b/Editor/LuaHooker/win/.DS_Store.meta new file mode 100644 index 000000000..8ea4daa90 --- /dev/null +++ b/Editor/LuaHooker/win/.DS_Store.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6118f3a0e82415ef95c31635e843745d +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Editor/Node/.DS_Store.meta b/Editor/Node/.DS_Store.meta new file mode 100644 index 000000000..b49b0ffe1 --- /dev/null +++ b/Editor/Node/.DS_Store.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4285fd3fb869f3706b65fb7f61b37a1d +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Editor/Node/node_modules/.DS_Store.meta b/Editor/Node/node_modules/.DS_Store.meta new file mode 100644 index 000000000..4f843366a --- /dev/null +++ b/Editor/Node/node_modules/.DS_Store.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f597788c1ddb795c4f78a95627f3a0a1 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Editor/Node/node_modules/binaryen.meta b/Editor/Node/node_modules/binaryen.meta index 5cd9e04c9..626ed8233 100644 --- a/Editor/Node/node_modules/binaryen.meta +++ b/Editor/Node/node_modules/binaryen.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 5c4133172957c4ff58904dc589712f66 +guid: a3d25085461954ccf96b870bbabd2d51 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Editor/Node/node_modules/binaryen/.DS_Store.meta b/Editor/Node/node_modules/binaryen/.DS_Store.meta new file mode 100644 index 000000000..b77b6b28f --- /dev/null +++ b/Editor/Node/node_modules/binaryen/.DS_Store.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8a1305fef7f03c31e8c729e65eff4141 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Editor/Node/node_modules/binaryen/LICENSE.meta b/Editor/Node/node_modules/binaryen/LICENSE.meta index 012891cfa..7c4f0df2b 100644 --- a/Editor/Node/node_modules/binaryen/LICENSE.meta +++ b/Editor/Node/node_modules/binaryen/LICENSE.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 688f385fb02274584bc0da25fc717541 +guid: 72db98ce23892438085944429a2f0f1e DefaultImporter: externalObjects: {} userData: diff --git a/Editor/Node/node_modules/binaryen/README.md.meta b/Editor/Node/node_modules/binaryen/README.md.meta index b4a92783c..4373a1b0d 100644 --- a/Editor/Node/node_modules/binaryen/README.md.meta +++ b/Editor/Node/node_modules/binaryen/README.md.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 7f21f78b4cc234191b76cd464483218a +guid: 0786375919a5f4b39a2842d398bab691 TextScriptImporter: externalObjects: {} userData: diff --git a/Editor/Node/node_modules/binaryen/bin.meta b/Editor/Node/node_modules/binaryen/bin.meta index 3de4aaf68..ed3c5fc4c 100644 --- a/Editor/Node/node_modules/binaryen/bin.meta +++ b/Editor/Node/node_modules/binaryen/bin.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: e2d1865a2511c490fade16ba4a1cb98d +guid: e49d6d9d90710412390e04f36c283269 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Editor/Node/node_modules/binaryen/bin/.DS_Store.meta b/Editor/Node/node_modules/binaryen/bin/.DS_Store.meta new file mode 100644 index 000000000..027903c84 --- /dev/null +++ b/Editor/Node/node_modules/binaryen/bin/.DS_Store.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5a0c3781f30adf33dc2dead24b1cc9bd +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Editor/Node/node_modules/binaryen/bin/package.json.meta b/Editor/Node/node_modules/binaryen/bin/package.json.meta index da39e03a6..052698917 100644 --- a/Editor/Node/node_modules/binaryen/bin/package.json.meta +++ b/Editor/Node/node_modules/binaryen/bin/package.json.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 87afef55b8ecb4102a02702ac98a8c08 +guid: a687be9fecc0c4635a0198f4c84c5a7a TextScriptImporter: externalObjects: {} userData: diff --git a/Editor/Node/node_modules/binaryen/bin/wasm-opt.meta b/Editor/Node/node_modules/binaryen/bin/wasm-opt.meta index c1b8d22b9..4fd25cdd9 100644 --- a/Editor/Node/node_modules/binaryen/bin/wasm-opt.meta +++ b/Editor/Node/node_modules/binaryen/bin/wasm-opt.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 15b1d1d2687c240e79f3326305a8e34d +guid: 59195b600f5474a34ab0de959545786a DefaultImporter: externalObjects: {} userData: diff --git a/Editor/Node/node_modules/binaryen/bin/wasm2js.meta b/Editor/Node/node_modules/binaryen/bin/wasm2js.meta index 216ac952f..6504dad93 100644 --- a/Editor/Node/node_modules/binaryen/bin/wasm2js.meta +++ b/Editor/Node/node_modules/binaryen/bin/wasm2js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: f2f9e284d496f4f0da239b534fc0962e +guid: 945d329c042b5422590297f9a668573b DefaultImporter: externalObjects: {} userData: diff --git a/Editor/Node/node_modules/binaryen/index.d.ts.meta b/Editor/Node/node_modules/binaryen/index.d.ts.meta index c99788971..d8df13d27 100644 --- a/Editor/Node/node_modules/binaryen/index.d.ts.meta +++ b/Editor/Node/node_modules/binaryen/index.d.ts.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: c36b18db4fca44e7999111a49563794c +guid: 5c728f27cb29c4a7ab957bec87aee79b DefaultImporter: externalObjects: {} userData: diff --git a/Editor/Node/node_modules/binaryen/index.js.meta b/Editor/Node/node_modules/binaryen/index.js.meta index a83cc1c9b..908311480 100644 --- a/Editor/Node/node_modules/binaryen/index.js.meta +++ b/Editor/Node/node_modules/binaryen/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 18049f8d0a7b340e089d8f6a56329852 +guid: e116238b593ee4f118e080fc2e1be1d0 TextScriptImporter: externalObjects: {} userData: diff --git a/Editor/Node/node_modules/binaryen/package.json.meta b/Editor/Node/node_modules/binaryen/package.json.meta index 2e68d812c..c3e45e73f 100644 --- a/Editor/Node/node_modules/binaryen/package.json.meta +++ b/Editor/Node/node_modules/binaryen/package.json.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 717be45d5d44c471e96a22dbcd2aaddd +guid: 95f171f78f3854726ba37852e7da8ace TextScriptImporter: externalObjects: {} userData: diff --git a/Editor/Playable/.DS_Store.meta b/Editor/Playable/.DS_Store.meta new file mode 100644 index 000000000..f607751d2 --- /dev/null +++ b/Editor/Playable/.DS_Store.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1270a06bcc4a2af0221f8847867a3e40 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Editor/TextureEditor/.DS_Store.meta b/Editor/TextureEditor/.DS_Store.meta new file mode 100644 index 000000000..02254cb0f --- /dev/null +++ b/Editor/TextureEditor/.DS_Store.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f1599ed5a660d0383a425f19d700f093 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Editor/TextureEditor/Node/.DS_Store.meta b/Editor/TextureEditor/Node/.DS_Store.meta new file mode 100644 index 000000000..69e4179f4 --- /dev/null +++ b/Editor/TextureEditor/Node/.DS_Store.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ade4c1bcff2dd6cc5a4702ffa4274a8e +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Editor/TextureEditor/Release/.DS_Store.meta b/Editor/TextureEditor/Release/.DS_Store.meta new file mode 100644 index 000000000..84e245681 --- /dev/null +++ b/Editor/TextureEditor/Release/.DS_Store.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7507ebc2de04bc11ff2ce57e2e3963b4 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Editor/WXConvertCore.cs b/Editor/WXConvertCore.cs index 5c83d2639..1dfb41f9c 100644 --- a/Editor/WXConvertCore.cs +++ b/Editor/WXConvertCore.cs @@ -71,9 +71,7 @@ namespace WeChatWASM BUILD_WEBGL_FAILED = 2, } - public static WXEditorScriptObject config => isPlayableBuild ? WXPlayableConvertCore.GetFakeScriptObject() : UnityUtil.GetEditorConf(); - - public static string defaultTemplateDir => isPlayableBuild ? "playable-default" : "wechat-default"; + public static WXEditorScriptObject config => UnityUtil.GetEditorConf(); public static string webglDir = "webgl"; // 导出的webgl目录 public static string miniGameDir = "minigame"; // 生成小游戏的目录 public static string audioDir = "Assets"; // 音频资源目录 @@ -82,10 +80,6 @@ namespace WeChatWASM public static string codeMd5 = string.Empty; public static string dataMd5 = string.Empty; public static string defaultImgSrc = "Assets/WX-WASM-SDK-V2/Runtime/wechat-default/images/background.jpg"; - /// - /// 是否在构建试玩,构建开始前修改值,构建结束后恢复值 - /// - public static bool isPlayableBuild = false; private static bool lastBrotliType = false; public static bool UseIL2CPP @@ -99,6 +93,14 @@ namespace WeChatWASM #endif } } + // 用于replaceRules判断是否需要注入相关的修改 + public static bool UseEmscriptenGLX + { + get + { + return config.CompileOptions.enableEmscriptenGLX; + } + } // 是否使用 iOS Metal 渲染 public static bool UseiOSMetal { @@ -107,69 +109,39 @@ namespace WeChatWASM return config.CompileOptions.enableiOSMetal; } } - // public static void SetPlayableEnabled(bool enabled) - // { - // isPlayableBuild = enabled; - // } - /// - /// 导出前的初始配置 - /// 小游戏模式和试玩模式都会使用这个函数,如果要在这个函数加新方法,建议都以不兼容试玩模式看待 - /// - public static void PreInit() + // 可以调用这个来集成 + public static WXExportError DoExport(bool buildWebGL = true) { + LifeCycleEvent.Init(); + Emit(LifeCycle.beforeExport); + if (!CheckSDK()) + { + Debug.LogError("若游戏曾使用旧版本微信SDK,需删除 Assets/WX-WASM-SDK 文件夹后再导入最新工具包。"); + return WXExportError.BUILD_WEBGL_FAILED; + } + if (!CheckBuildTemplate()) + { + Debug.LogError("因构建模板检查失败终止导出。"); + return WXExportError.BUILD_WEBGL_FAILED; + } + if (CheckInvalidPerfIntegration()) + { + Debug.LogError("性能分析工具只能用于Development Build, 终止导出! "); + return WXExportError.BUILD_WEBGL_FAILED; + } + + CheckBuildTarget(); Init(); - // 可能有顺序要求?如果没要求,可挪到此函数外 - if (!isPlayableBuild) - { - ProcessWxPerfBinaries(); - } - // iOS metal 的相关特性 - ProcessWxiOSMetalBinaries(); + ProcessWxPerfBinaries(); + // emscriptenglx的相关特性 + ProcessWxEmscriptenGLXBinaries(); MakeEnvForLuaAdaptor(); // JSLib SettingWXTextureMinJSLib(); UpdateGraphicAPI(); EditorUtility.SetDirty(config); AssetDatabase.SaveAssets(); - } - public static WXExportError PreCheck() - { - if (!CheckSDK()) - { - Debug.LogError("若游戏曾使用旧版本微信SDK,需删除 Assets/WX-WASM-SDK 文件夹后再导入最新工具包。"); - return WXExportError.BUILD_WEBGL_FAILED; - } - if (!isPlayableBuild && !CheckBuildTemplate()) - { - Debug.LogError("因构建模板检查失败终止导出。"); - return WXExportError.BUILD_WEBGL_FAILED; - } - if (!isPlayableBuild && CheckInvalidPerfIntegration()) - { - Debug.LogError("性能分析工具只能用于Development Build, 终止导出!"); - return WXExportError.BUILD_WEBGL_FAILED; - } - dynamic config = isPlayableBuild ? UnityUtil.GetPlayableEditorConf() : UnityUtil.GetEditorConf(); - if (config.ProjectConf.relativeDST == string.Empty) - { - Debug.LogError("请先配置游戏导出路径"); - return WXExportError.BUILD_WEBGL_FAILED; - } - return WXExportError.SUCCEED; - } - // 可以调用这个来集成 - public static WXExportError DoExport(bool buildWebGL = true) - { - LifeCycleEvent.Init(); - Emit(LifeCycle.beforeExport); - var preCheckResult = PreCheck(); - if (preCheckResult != WXExportError.SUCCEED) - { - return preCheckResult; - } - - PreInit(); // 记录上次导出的brotliType { @@ -187,6 +159,12 @@ namespace WeChatWASM } } + if (config.ProjectConf.DST == string.Empty) + { + Debug.LogError("请先配置游戏导出路径"); + return WXExportError.BUILD_WEBGL_FAILED; + } + else { // 仅删除StreamingAssets目录 if (config.CompileOptions.DeleteStreamingAssets) @@ -371,6 +349,59 @@ namespace WeChatWASM AssetDatabase.Refresh(); } + private static void ProcessWxEmscriptenGLXBinaries() + { + string[] glLibs; + string DS = WXAssetsTextTools.DS; + if (UnityUtil.GetSDKMode() == UnityUtil.SDKMode.Package) + { + glLibs = new string[] + { + $"Packages{DS}com.qq.weixin.minigame{DS}Runtime{DS}Plugins{DS}libemscriptenglx.a", + $"Packages{DS}com.qq.weixin.minigame{DS}Runtime{DS}Plugins{DS}libemscriptenglx_2021.a", + }; + } + else + { + string glLibRootDir = $"Assets{DS}WX-WASM-SDK-V2{DS}Runtime{DS}Plugins{DS}"; + + // 下方顺序不要变动 + glLibs = new string[] + { + $"{glLibRootDir}libemscriptenglx.a", + $"{glLibRootDir}libemscriptenglx_2021.a", + }; + } + + { + // unity2022, tuanjie lib引入 + bool showEnableGLX2022Plugin = config.CompileOptions.enableEmscriptenGLX && IsCompatibleWithUnity202203OrNewer(); + + var glx2022Importer = AssetImporter.GetAtPath(glLibs[0]) as PluginImporter; + #if PLATFORM_WEIXINMINIGAME + glx2022Importer.SetCompatibleWithPlatform(BuildTarget.WeixinMiniGame, showEnableGLX2022Plugin); + #else + glx2022Importer.SetCompatibleWithPlatform(BuildTarget.WebGL, showEnableGLX2022Plugin); + #endif + SetPluginCompatibilityByModifyingMetadataFile(glLibs[0], showEnableGLX2022Plugin); + } + + { + // unity2021 lib引入 + bool showEnableGLX2021Plugin = config.CompileOptions.enableEmscriptenGLX && IsCompatibleWithUnity202102To202203(); + + var glx2021Importer = AssetImporter.GetAtPath(glLibs[1]) as PluginImporter; + #if PLATFORM_WEIXINMINIGAME + glx2021Importer.SetCompatibleWithPlatform(BuildTarget.WeixinMiniGame, showEnableGLX2021Plugin); + #else + glx2021Importer.SetCompatibleWithPlatform(BuildTarget.WebGL, showEnableGLX2021Plugin); + #endif + SetPluginCompatibilityByModifyingMetadataFile(glLibs[1], showEnableGLX2021Plugin); + } + + AssetDatabase.Refresh(); + } + /** * Lua Adaptor Settings. */ @@ -411,41 +442,6 @@ namespace WeChatWASM return true; } - private static void ProcessWxiOSMetalBinaries() - { - string[] glLibs; - string DS = WXAssetsTextTools.DS; - if (UnityUtil.GetSDKMode() == UnityUtil.SDKMode.Package) - { - glLibs = new string[] - { - $"Packages{DS}com.qq.weixin.minigame{DS}Editor{DS}BuildProfile{DS}lib{DS}libwx-metal-cpp.bc", - $"Packages{DS}com.qq.weixin.minigame{DS}Editor{DS}BuildProfile{DS}lib{DS}mtl_library.jslib", - }; - } - else - { - string glLibRootDir = $"Assets{DS}WX-WASM-SDK-V2{DS}Editor{DS}BuildProfile{DS}lib{DS}"; - glLibs = new string[] - { - $"{glLibRootDir}libwx-metal-cpp.bc", - $"{glLibRootDir}mtl_library.jslib", - }; - } - for (int i = 0; i < glLibs.Length; i++) - { - var importer = AssetImporter.GetAtPath(glLibs[i]) as PluginImporter; -#if PLATFORM_WEIXINMINIGAME - importer.SetCompatibleWithPlatform(BuildTarget.WeixinMiniGame, config.CompileOptions.enableiOSMetal); -#else - importer.SetCompatibleWithPlatform(BuildTarget.WebGL, config.CompileOptions.enableiOSMetal); -#endif - // importer.SaveAndReimport(); - SetPluginCompatibilityByModifyingMetadataFile(glLibs[i], config.CompileOptions.enableiOSMetal); - } - AssetDatabase.Refresh(); - } - private static string GetLuaAdaptorPath(string filename) { string DS = WXAssetsTextTools.DS; @@ -569,28 +565,13 @@ namespace WeChatWASM GraphicsDeviceType[] targets = new GraphicsDeviceType[] { }; #if PLATFORM_WEIXINMINIGAME PlayerSettings.SetUseDefaultGraphicsAPIs(BuildTarget.WeixinMiniGame, false); - // 启用 iOS Metal 渲染 - if (UseiOSMetal) + if (config.CompileOptions.Webgl2) { - if (config.CompileOptions.Webgl2) - { - PlayerSettings.SetGraphicsAPIs(BuildTarget.WeixinMiniGame, new GraphicsDeviceType[] { GraphicsDeviceType.Metal, GraphicsDeviceType.OpenGLES3 }); - } - else - { - PlayerSettings.SetGraphicsAPIs(BuildTarget.WeixinMiniGame, new GraphicsDeviceType[] { GraphicsDeviceType.Metal, GraphicsDeviceType.OpenGLES2 }); - } + PlayerSettings.SetGraphicsAPIs(BuildTarget.WeixinMiniGame, new GraphicsDeviceType[] { GraphicsDeviceType.OpenGLES3 }); } - else + else { - if (config.CompileOptions.Webgl2) - { - PlayerSettings.SetGraphicsAPIs(BuildTarget.WeixinMiniGame, new GraphicsDeviceType[] { GraphicsDeviceType.OpenGLES3 }); - } - else - { - PlayerSettings.SetGraphicsAPIs(BuildTarget.WeixinMiniGame, new GraphicsDeviceType[] { GraphicsDeviceType.OpenGLES2 }); - } + PlayerSettings.SetGraphicsAPIs(BuildTarget.WeixinMiniGame, new GraphicsDeviceType[] { GraphicsDeviceType.OpenGLES2 }); } #else PlayerSettings.SetUseDefaultGraphicsAPIs(BuildTarget.WebGL, false); @@ -656,7 +637,7 @@ namespace WeChatWASM private static bool CheckBuildTemplate() { string[] res = BuildTemplate.CheckCustomCoverBaseConflict( - Path.Combine(UnityUtil.GetWxSDKRootPath(), "Runtime", defaultTemplateDir), + Path.Combine(UnityUtil.GetWxSDKRootPath(), "Runtime", "wechat-default"), Path.Combine(Application.dataPath, "WX-WASM-SDK-V2", "Editor", "template"), new string[] { @"\.(js|ts|json)$" } ); @@ -880,22 +861,6 @@ namespace WeChatWASM } } - { - Rule[] rules = - { - new Rule() - { - old = "if (GameGlobal.unityNamespace.enableProfileStats)", - newStr = "if (GameGlobal.unityNamespace.enableProfileStats || (typeof GameGlobal.manager.getWXAppCheatMonitor === 'function' && GameGlobal.manager.getWXAppCheatMonitor().shouldForceShowPerfMonitor()))" - } - }; - foreach (var rule in rules) - { - text = text.Replace(rule.old, rule.newStr); - } - } - - File.WriteAllText(targetPath, text, new UTF8Encoding(false)); UnityEngine.Debug.LogFormat("[Converter] adapt framework done! "); @@ -907,12 +872,7 @@ namespace WeChatWASM PlayerSettings.WeixinMiniGame.emscriptenArgs = string.Empty; if (WXExtEnvDef.GETDEF("UNITY_2021_2_OR_NEWER")) { - PlayerSettings.WeixinMiniGame.emscriptenArgs += " -s EXPORTED_FUNCTIONS=_main,_sbrk,_emscripten_stack_get_base,_emscripten_stack_get_end"; - if (config.CompileOptions.enablePerfAnalysis) - { - PlayerSettings.WeixinMiniGame.emscriptenArgs += ",_WxPerfFrameIntervalCallback"; - } - PlayerSettings.WeixinMiniGame.emscriptenArgs += " -s ERROR_ON_UNDEFINED_SYMBOLS=0"; + PlayerSettings.WeixinMiniGame.emscriptenArgs += " -s EXPORTED_FUNCTIONS=_main,_sbrk,_emscripten_stack_get_base,_emscripten_stack_get_end -s ERROR_ON_UNDEFINED_SYMBOLS=0"; } #else @@ -920,10 +880,6 @@ namespace WeChatWASM if (WXExtEnvDef.GETDEF("UNITY_2021_2_OR_NEWER")) { PlayerSettings.WebGL.emscriptenArgs += " -s EXPORTED_FUNCTIONS=_sbrk,_emscripten_stack_get_base,_emscripten_stack_get_end"; - if (config.CompileOptions.enablePerfAnalysis) - { - PlayerSettings.WebGL.emscriptenArgs += ",_WxPerfFrameIntervalCallback"; - } #if UNITY_2021_2_5 PlayerSettings.WebGL.emscriptenArgs += ",_main"; #endif @@ -1271,10 +1227,7 @@ namespace WeChatWASM public static void convertDataPackageJS() { - if (!isPlayableBuild) - { - checkNeedRmovePackageParallelPreload(); - } + checkNeedRmovePackageParallelPreload(); var loadDataFromCdn = config.ProjectConf.assetLoadType == 0; Rule[] rules = @@ -1393,10 +1346,9 @@ namespace WeChatWASM RemoveOldAssetPackage(Path.Combine(config.ProjectConf.DST, webglDir)); RemoveOldAssetPackage(Path.Combine(config.ProjectConf.DST, webglDir + "-min")); var buildTemplate = new BuildTemplate( - Path.Combine(UnityUtil.GetWxSDKRootPath(), "Runtime", defaultTemplateDir), + Path.Combine(UnityUtil.GetWxSDKRootPath(), "Runtime", "wechat-default"), Path.Combine(Application.dataPath, "WX-WASM-SDK-V2", "Editor", "template"), - Path.Combine(config.ProjectConf.DST, miniGameDir), - true + Path.Combine(config.ProjectConf.DST, miniGameDir) ); buildTemplate.start(); // FIX: 2021.2版本生成symbol有bug,导出时生成symbol报错,有symbol才copy @@ -1404,15 +1356,12 @@ namespace WeChatWASM if (File.Exists(symbolPath)) { File.Copy(symbolPath, Path.Combine(config.ProjectConf.DST, miniGameDir, "webgl.wasm.symbols.unityweb"), true); - // gen symbols.br - Brotlib("webgl.wasm.symbols.unityweb.br", symbolPath, Path.Combine(config.ProjectConf.DST, miniGameDir, "webgl.wasm.symbols.unityweb.br")); } var info = new FileInfo(dataPath); dataFileSize = info.Length.ToString(); UnityEngine.Debug.LogFormat("[Converter] that to genarate md5 and copy files ended"); - // 若APPID为快适配小游戏示例,则插入预览盒子 - if (config.ProjectConf.Appid == "wx7c792ca878775717") + if (config.ProjectConf.Appid == "wx7c792ca878775717") // 快适配小游戏示例 { InsertPreviewCode(); } @@ -1521,9 +1470,14 @@ namespace WeChatWASM " } else {\n" + " this._send = GameGlobal.Module.SendMessage;\n" + " }", + }, + new Rule() + { + old = "3.5.1", // project.config.json 转换插件 hardcode + newStr = "latest", } }; - string[] files = { "game.js", "game.json", "unity-sdk/module-helper.js" }; + string[] files = { "game.js", "game.json", "unity-sdk/module-helper.js", "project.config.json" }; ReplaceFileContent(files, rules); Debug.LogWarning("[WeChat Preview] InsertPreviewCode End"); } @@ -1535,7 +1489,7 @@ namespace WeChatWASM var shortFilename = filename.Substring(filename.IndexOf('.') + 1); // 如果code没有发生过变化,且压缩方式不变,则不再进行br压缩 - if (cachePath.Contains("wasm.code") && File.Exists(cachePath) && lastBrotliType == config.CompileOptions.brotliMT) + if (File.Exists(cachePath) && lastBrotliType == config.CompileOptions.brotliMT) { File.Copy(cachePath, targetPath, true); return 0; @@ -1625,8 +1579,7 @@ namespace WeChatWASM writer.PrettyPrint = true; // 将 game.json 里面关系链相关的配置删除 - // 试玩 game.json 中不含其他配置 - if (!config.SDKOptions.UseFriendRelation && gameJson.ContainsKey("openDataContext") && gameJson.ContainsKey("plugins")) + if (!config.SDKOptions.UseFriendRelation) { gameJson.Remove("openDataContext"); gameJson["plugins"].Remove("Layout"); @@ -1637,7 +1590,7 @@ namespace WeChatWASM Directory.Delete(openDataDir, true); } - if (!config.SDKOptions.UseMiniGameChat && gameJson.ContainsKey("plugins")) + if (!config.SDKOptions.UseMiniGameChat) { gameJson["plugins"].Remove("MiniGameChat"); UnityEngine.Debug.Log(gameJson["plugins"]); @@ -1724,20 +1677,17 @@ namespace WeChatWASM { dst = Path.Combine(config.ProjectConf.DST, miniGameDir); } - string content = File.ReadAllText(Path.Combine(UnityUtil.GetWxSDKRootPath(), "Runtime", defaultTemplateDir, "unity-sdk", "index.js"), Encoding.UTF8); + string content = File.ReadAllText(Path.Combine(UnityUtil.GetWxSDKRootPath(), "Runtime", "wechat-default", "unity-sdk", "index.js"), Encoding.UTF8); content = content.Replace("$unityVersion$", Application.unityVersion); File.WriteAllText(Path.Combine(dst, "unity-sdk", "index.js"), content, Encoding.UTF8); // content = File.ReadAllText(Path.Combine(Application.dataPath, "WX-WASM-SDK-V2", "Runtime", "wechat-default", "unity-sdk", "storage.js"), Encoding.UTF8); - if (!isPlayableBuild) - { - content = File.ReadAllText(Path.Combine(UnityUtil.GetWxSDKRootPath(), "Runtime", defaultTemplateDir, "unity-sdk", "storage.js"), Encoding.UTF8); - var PreLoadKeys = config.PlayerPrefsKeys.Count > 0 ? JsonMapper.ToJson(config.PlayerPrefsKeys) : "[]"; - content = content.Replace("'$PreLoadKeys'", PreLoadKeys); - File.WriteAllText(Path.Combine(dst, "unity-sdk", "storage.js"), content, Encoding.UTF8); - } + content = File.ReadAllText(Path.Combine(UnityUtil.GetWxSDKRootPath(), "Runtime", "wechat-default", "unity-sdk", "storage.js"), Encoding.UTF8); + var PreLoadKeys = config.PlayerPrefsKeys.Count > 0 ? JsonMapper.ToJson(config.PlayerPrefsKeys) : "[]"; + content = content.Replace("'$PreLoadKeys'", PreLoadKeys); + File.WriteAllText(Path.Combine(dst, "unity-sdk", "storage.js"), content, Encoding.UTF8); // 修改纹理dxt // content = File.ReadAllText(Path.Combine(Application.dataPath, "WX-WASM-SDK-V2", "Runtime", "wechat-default", "unity-sdk", "texture.js"), Encoding.UTF8); - content = File.ReadAllText(Path.Combine(UnityUtil.GetWxSDKRootPath(), "Runtime", defaultTemplateDir, "unity-sdk", "texture.js"), Encoding.UTF8); + content = File.ReadAllText(Path.Combine(UnityUtil.GetWxSDKRootPath(), "Runtime", "wechat-default", "unity-sdk", "texture.js"), Encoding.UTF8); File.WriteAllText(Path.Combine(dst, "unity-sdk", "texture.js"), content, Encoding.UTF8); } @@ -1954,15 +1904,14 @@ namespace WeChatWASM UnityEngine.Debug.LogFormat("[Converter] Starting to modify configs"); var PRELOAD_LIST = GetPreloadList(config.ProjectConf.preloadFiles); - // 试玩不存在封面图 - var imgSrc = isPlayableBuild ? "" : HandleLoadingImage(); + var imgSrc = HandleLoadingImage(); var bundlePathIdentifierStr = GetArrayString(config.ProjectConf.bundlePathIdentifier); var excludeFileExtensionsStr = GetArrayString(config.ProjectConf.bundleExcludeExtensions); var screenOrientation = new List() { "portrait", "landscape", "landscapeLeft", "landscapeRight" }[(int)config.ProjectConf.Orientation]; - // 试玩不支持系统字体 - var customUnicodeRange = isPlayableBuild ? "[]" : GetCustomUnicodeRange(config.FontOptions.CustomUnicode); + + var customUnicodeRange = GetCustomUnicodeRange(config.FontOptions.CustomUnicode); Debug.Log("[Converter] customUnicodeRange: " + customUnicodeRange); var boolConfigInfo = GenerateBootInfo(); @@ -1983,7 +1932,7 @@ namespace WeChatWASM config.ProjectConf.bundleHashLength.ToString(), bundlePathIdentifierStr, excludeFileExtensionsStr, - config.CompileOptions.enableiOSMetal ? "5" : (config.CompileOptions.Webgl2 ? "2" : "1"), + config.CompileOptions.Webgl2 ? "2" : "1", Application.unityVersion, WXExtEnvDef.pluginVersion, config.ProjectConf.dataFileSubPrefix, @@ -2032,15 +1981,13 @@ namespace WeChatWASM config.ProjectConf.MemorySize.ToString(), config.SDKOptions.disableMultiTouch ? "true" : "false", // Perfstream,暂时设为false - "false" + "false", + config.CompileOptions.enableEmscriptenGLX ? "true" : "false", + config.CompileOptions.enableiOSMetal ? "true" : "false" }); List replaceList = new List(replaceArrayList); List files = new List { "game.js", "game.json", "project.config.json", "unity-namespace.js", "check-version.js", "unity-sdk/font/index.js" }; - if (isPlayableBuild) - { - files = new List { "game.js", "game.json", "project.config.json", "unity-namespace.js", "check-version.js" }; - } if (WXRuntimeExtEnvDef.IsPreviewing) { diff --git a/Editor/WXEditorSettingHelper.cs b/Editor/WXEditorSettingHelper.cs index ccfe4ea6a..57ad2b37c 100644 --- a/Editor/WXEditorSettingHelper.cs +++ b/Editor/WXEditorSettingHelper.cs @@ -54,11 +54,15 @@ namespace WeChatWASM foldInstantGame = WXConvertCore.IsInstantGameAutoStreaming(); projectRootPath = System.IO.Path.GetFullPath(Application.dataPath + "/../"); + + _dstCache = ""; } private static WXEditorScriptObject config; private static bool m_EnablePerfTool = false; + private static string _dstCache; + public void OnFocus() { loadData(); @@ -183,8 +187,9 @@ namespace WeChatWASM this.formCheckbox("il2CppOptimizeSize", "Il2Cpp Optimize Size(?)", "对应于Il2CppCodeGeneration选项,勾选时使用OptimizeSize(默认推荐),生成代码小15%左右,取消勾选则使用OptimizeSpeed。游戏中大量泛型集合的高频访问建议OptimizeSpeed,在使用HybridCLR等第三方组件时只能用OptimizeSpeed。(Dotnet Runtime模式下该选项无效)", !UseIL2CPP); this.formCheckbox("profilingFuncs", "Profiling Funcs"); this.formCheckbox("profilingMemory", "Profiling Memory"); - this.formCheckbox("webgl2", "WebGL2.0"); + this.formCheckbox("webgl2", "WebGL2.0(beta)"); this.formCheckbox("iOSPerformancePlus", "iOSPerformancePlus(?)", "是否使用iOS高性能+渲染方案,有助于提升渲染兼容性、降低WebContent进程内存"); + this.formCheckbox("EmscriptenGLX", "EmscriptenGLX(?)", "是否使用EmscriptenGLX渲染方案"); // this.formCheckbox("iOSMetal", "iOSMetal(?)", "是否使用iOSMetal渲染方案,需要开启iOS高性能+模式,有助于提升运行性能,降低iOS功耗"); this.formCheckbox("deleteStreamingAssets", "Clear Streaming Assets"); this.formCheckbox("cleanBuild", "Clean WebGL Build"); @@ -391,6 +396,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(); + _dstCache = config.ProjectConf.DST; // Instant Game if (WXConvertCore.IsInstantGameAutoStreaming()) @@ -432,7 +438,7 @@ namespace WeChatWASM this.setData("compressDataPackage", config.ProjectConf.compressDataPackage); this.setData("videoUrl", config.ProjectConf.VideoUrl); this.setData("orientation", (int)config.ProjectConf.Orientation); - this.setData("dst", config.ProjectConf.relativeDST); + this.setData("dst", _dstCache); this.setData("bundleHashLength", config.ProjectConf.bundleHashLength.ToString()); this.setData("bundlePathIdentifier", config.ProjectConf.bundlePathIdentifier); this.setData("bundleExcludeExtensions", config.ProjectConf.bundleExcludeExtensions); @@ -449,6 +455,7 @@ namespace WeChatWASM this.setData("webgl2", config.CompileOptions.Webgl2); this.setData("iOSPerformancePlus", config.CompileOptions.enableIOSPerformancePlus); this.setData("iOSMetal", config.CompileOptions.enableiOSMetal); + this.setData("EmscriptenGLX", config.CompileOptions.enableEmscriptenGLX); this.setData("fbslim", config.CompileOptions.fbslim); this.setData("useFriendRelation", config.SDKOptions.UseFriendRelation); this.setData("useMiniGameChat", config.SDKOptions.UseMiniGameChat); @@ -510,8 +517,8 @@ namespace WeChatWASM config.ProjectConf.compressDataPackage = this.getDataCheckbox("compressDataPackage"); config.ProjectConf.VideoUrl = this.getDataInput("videoUrl"); config.ProjectConf.Orientation = (WXScreenOritation)this.getDataPop("orientation"); - config.ProjectConf.relativeDST = this.getDataInput("dst"); - config.ProjectConf.DST = GetAbsolutePath(config.ProjectConf.relativeDST); + _dstCache = this.getDataInput("dst"); + config.ProjectConf.DST = GetAbsolutePath(_dstCache); config.ProjectConf.bundleHashLength = int.Parse(this.getDataInput("bundleHashLength")); config.ProjectConf.bundlePathIdentifier = this.getDataInput("bundlePathIdentifier"); config.ProjectConf.bundleExcludeExtensions = this.getDataInput("bundleExcludeExtensions"); @@ -528,6 +535,7 @@ namespace WeChatWASM config.CompileOptions.Webgl2 = this.getDataCheckbox("webgl2"); config.CompileOptions.enableIOSPerformancePlus = this.getDataCheckbox("iOSPerformancePlus"); config.CompileOptions.enableiOSMetal = this.getDataCheckbox("iOSMetal"); + config.CompileOptions.enableEmscriptenGLX = this.getDataCheckbox("EmscriptenGLX"); config.CompileOptions.fbslim = this.getDataCheckbox("fbslim"); config.SDKOptions.UseFriendRelation = this.getDataCheckbox("useFriendRelation"); config.SDKOptions.UseMiniGameChat = this.getDataCheckbox("useMiniGameChat"); diff --git a/Editor/WXExtDef.cs b/Editor/WXExtDef.cs index 08a5888e4..54f139a28 100644 --- a/Editor/WXExtDef.cs +++ b/Editor/WXExtDef.cs @@ -129,6 +129,10 @@ namespace WeChatWASM { return WXConvertCore.UseiOSMetal; }); + WXExtEnvDef.RegisterAction("WXConvertCore.UseEmscriptenGLX", (args) => + { + return WXConvertCore.UseEmscriptenGLX; + }); WXExtEnvDef.RegisterAction("UnityUtil.GetWxSDKRootPath", (args) => { #if UNITY_2018 diff --git a/Editor/WXPluginVersion.cs b/Editor/WXPluginVersion.cs index bf9ad703d..e19a94a29 100644 --- a/Editor/WXPluginVersion.cs +++ b/Editor/WXPluginVersion.cs @@ -2,7 +2,7 @@ namespace WeChatWASM { public class WXPluginVersion { - public static string pluginVersion = "202508190736"; // 这一行不要改他,导出的时候会自动替换 + public static string pluginVersion = "202508260429"; // 这一行不要改他,导出的时候会自动替换 } public class WXPluginConf diff --git a/Editor/wx-editor.dll b/Editor/wx-editor.dll index 7405b7e19..2a7dd0b66 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 8bd12eb5f..4dd70323e 100644 --- a/Editor/wx-editor.xml +++ b/Editor/wx-editor.xml @@ -9,17 +9,12 @@ 构建模板工具类 - - - 是否忽略用户自定义模板 - - 复制覆盖时不参与覆盖的正则表达式,可在 beforeCoverTemplate(含)前动态修改 - + 防止自定义模板对覆盖基础模板有覆盖在新版本更新后有代码冲突需要做此检查 @@ -294,7 +289,7 @@ 工具函数 - + 微信SDK环境初始化 @@ -381,11 +376,6 @@ 视频url - - - 导出路径(相对路径) - - 导出路径(绝对路径) @@ -653,6 +643,7 @@ 是否使用iOS metal指令流 + 是否使用brotli多线程压缩 @@ -773,66 +764,5 @@ 字体配置 - - - 试玩项目名 - - - - - 试玩 appid - - - - - 导出路径(相对路径) - - - - - 导出路径(绝对路径) - - - - - 游戏内存大小(MB) - - - - - 游戏方向 - - - - - IOS限制固定的分辨率,以减少内存,但是会降低游戏画面品质 - 注意:不要随意修改,默认值为0,0表示不限制 - - - - - Development Build - - - - - Il2CppCodeGeneration.OptimizeSize - - - - - Profiling Funcs - - - - - WebGL2.0 - - - - - CustomNodePath - - diff --git a/Editor/wx-editor.xml.meta b/Editor/wx-editor.xml.meta index 69abbf802..1f567d165 100644 --- a/Editor/wx-editor.xml.meta +++ b/Editor/wx-editor.xml.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4e2a80fab2cbe76fc8f8a9443ecab609 +guid: 030532471fcadbdfbf292be558833e91 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/.DS_Store.meta b/Runtime/.DS_Store.meta new file mode 100644 index 000000000..17e624925 --- /dev/null +++ b/Runtime/.DS_Store.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 642125c0e8e14b15c2ca4c4ecc17dd36 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/Plugins/.DS_Store.meta b/Runtime/Plugins/.DS_Store.meta new file mode 100644 index 000000000..659f91d5c --- /dev/null +++ b/Runtime/Plugins/.DS_Store.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2c9e1d2dc447a8fd5caa584099a10202 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/Plugins/LuaAdaptor/.DS_Store.meta b/Runtime/Plugins/LuaAdaptor/.DS_Store.meta new file mode 100644 index 000000000..902451a4a --- /dev/null +++ b/Runtime/Plugins/LuaAdaptor/.DS_Store.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 92174e814460b45c3ec3a0095d00ca87 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/Plugins/SDK-Call-JS.jslib b/Runtime/Plugins/SDK-Call-JS.jslib index 7c5f0a0bb..3256e5b87 100644 --- a/Runtime/Plugins/SDK-Call-JS.jslib +++ b/Runtime/Plugins/SDK-Call-JS.jslib @@ -115,8 +115,8 @@ WX_SyncFunction_tnn: function(functionName, returnType, param1, param2){ stringToUTF8((res || ''), buffer, bufferSize); return buffer; }, -WX_ClassConstructor:function(functionName, returnType, successType, failType, completeType, conf) { - var res = window.WXWASMSDK.WX_ClassConstructor(_WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(returnType), _WXPointer_stringify_adaptor(successType), _WXPointer_stringify_adaptor(failType), _WXPointer_stringify_adaptor(completeType), _WXPointer_stringify_adaptor(conf)); +WX_ClassOneWayFunction:function(functionName, returnType, successType, failType, completeType, conf) { + var res = window.WXWASMSDK.WX_ClassOneWayFunction(_WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(returnType), _WXPointer_stringify_adaptor(successType), _WXPointer_stringify_adaptor(failType), _WXPointer_stringify_adaptor(completeType), _WXPointer_stringify_adaptor(conf)); var bufferSize = lengthBytesUTF8(res || '') + 1; var buffer = _malloc(bufferSize); stringToUTF8((res || ''), buffer, bufferSize); @@ -156,7 +156,5 @@ WX_ClassOneWayNoFunction_vt: function(className, functionName, id, param1) { }, WX_ClassOneWayNoFunction_vn: function(className, functionName, id, param1) { window.WXWASMSDK.WX_ClassOneWayNoFunction_vs(_WXPointer_stringify_adaptor(className), _WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(id), param1); -},WX_ClassOneWayFunction: function(className, id, functionName, successType, failType, completeType, conf, callbackId, usePromise) { - window.WXWASMSDK.WX_ClassOneWayFunction(_WXPointer_stringify_adaptor(className), _WXPointer_stringify_adaptor(id), _WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(successType), _WXPointer_stringify_adaptor(failType), _WXPointer_stringify_adaptor(completeType), _WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId), usePromise); }, }) \ No newline at end of file diff --git a/Runtime/Plugins/WxPerfJsBridge.jslib b/Runtime/Plugins/WxPerfJsBridge.jslib index adb5ceac1..828162dac 100644 --- a/Runtime/Plugins/WxPerfJsBridge.jslib +++ b/Runtime/Plugins/WxPerfJsBridge.jslib @@ -28,22 +28,6 @@ mergeInto(LibraryManager.library, { GameGlobal.unityNamespace.ProfileWebgl.stopRecord(); } }, - JSProfilerUploadBinary: function(dataPtr, bufSize, namePtr, dirPtr, id, inStartFrameIdx, inEndFrameIdx) { - //if (GameGlobal && GameGlobal.manager && GameGlobal.manager.profiler) { - const name = UTF8ToString(namePtr); - const dir = UTF8ToString(dirPtr); - const content = HEAPU8.slice(dataPtr, dataPtr+bufSize); - GameGlobal.manager.profiler.uploadBinary({ - 'data': content, - 'len': bufSize, - 'fileName': name, - 'uploadDir': dir, - 'id': id, - 'startFrameIndex': inStartFrameIdx, - 'endFrameIndex': inEndFrameIdx - }); - //} - }, JSProfilerUploadString: function(dataPtr, bufSize, namePtr, dirPtr, id, inStartFrameIdx, inEndFrameIdx) { //if (GameGlobal && GameGlobal.manager && GameGlobal.manager.profiler) { const name = UTF8ToString(namePtr); @@ -122,12 +106,5 @@ mergeInto(LibraryManager.library, { stringToUTF8(GameGlobal.unityNamespace.convertPluginVersion, stringOnWasmHeap, lengthBytes); return stringOnWasmHeap; - }, - - JSProfilerCanvasToFilepathSync: function(savePath) { - if (GameGlobal && GameGlobal.unityNamespace && GameGlobal.unityNamespace.ProfileWebgl && GameGlobal.unityNamespace.ProfileWebgl.stopRecord) { - const savePathJSStr = UTF8ToString(savePath); - GameGlobal.manager.profiler.canvasToFilepathSync(savePathJSStr); - } } -}); \ No newline at end of file +}); diff --git a/Runtime/Plugins/libemscriptenglx.a b/Runtime/Plugins/libemscriptenglx.a new file mode 100644 index 000000000..8e4cc6171 Binary files /dev/null and b/Runtime/Plugins/libemscriptenglx.a differ diff --git a/Runtime/Plugins/libemscriptenglx.a.meta b/Runtime/Plugins/libemscriptenglx.a.meta new file mode 100644 index 000000000..1e81a9574 --- /dev/null +++ b/Runtime/Plugins/libemscriptenglx.a.meta @@ -0,0 +1,69 @@ +fileFormatVersion: 2 +guid: cccbd1d680cfe34fa1fef9e4875e5f23 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 1 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + : Any + second: + enabled: 0 + settings: + Exclude Editor: 0 + Exclude Linux64: 0 + Exclude OSXUniversal: 0 + Exclude WeixinMiniGame: 0 + Exclude Win: 0 + Exclude Win64: 0 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 1 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Standalone: Linux64 + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + Standalone: OSXUniversal + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + Standalone: Win + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + Standalone: Win64 + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + WeixinMiniGame: WeixinMiniGame + second: + enabled: 1 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Plugins/libemscriptenglx_2021.a b/Runtime/Plugins/libemscriptenglx_2021.a new file mode 100644 index 000000000..7f638fe1e Binary files /dev/null and b/Runtime/Plugins/libemscriptenglx_2021.a differ diff --git a/Runtime/Plugins/libemscriptenglx_2021.a.meta b/Runtime/Plugins/libemscriptenglx_2021.a.meta new file mode 100644 index 000000000..005cde2bd --- /dev/null +++ b/Runtime/Plugins/libemscriptenglx_2021.a.meta @@ -0,0 +1,93 @@ +fileFormatVersion: 2 +guid: 89ccba97a8e2991dc502c741bc8cd6c6 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 1 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + : Any + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 1 + Exclude Linux64: 1 + Exclude OSXUniversal: 1 + Exclude WebGL: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude WindowsStoreApps: 1 + - first: + Android: Android + second: + enabled: 0 + settings: + AndroidSharedLibraryType: Executable + CPU: ARMv7 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: None + - first: + WebGL: WebGL + second: + enabled: 0 + settings: {} + - first: + WeixinMiniGame: WeixinMiniGame + second: + enabled: 0 + settings: {} + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + DontProcess: false + PlaceholderPath: + SDK: AnySDK + ScriptingBackend: AnyScriptingBackend +userData: +assetBundleName: +assetBundleVariant: diff --git a/Runtime/Plugins/wx-perf.dll b/Runtime/Plugins/wx-perf.dll index eca9ff9a5..4306a6e8f 100644 Binary files a/Runtime/Plugins/wx-perf.dll and b/Runtime/Plugins/wx-perf.dll differ diff --git a/Runtime/Plugins/wx-perf.dll.meta b/Runtime/Plugins/wx-perf.dll.meta index 01f86625f..99b128da8 100644 --- a/Runtime/Plugins/wx-perf.dll.meta +++ b/Runtime/Plugins/wx-perf.dll.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ffcf22f69c45d4919a04626e60e86c20 +guid: f0cbdcf50f6d52cea758f1ea825443c0 PluginImporter: externalObjects: {} serializedVersion: 2 @@ -7,21 +7,68 @@ PluginImporter: executionOrder: {} defineConstraints: [] isPreloaded: 0 - isOverridable: 0 + isOverridable: 1 isExplicitlyReferenced: 0 validateReferences: 1 platformData: + - first: + : Any + second: + enabled: 0 + settings: + Exclude Editor: 0 + Exclude Linux64: 1 + Exclude OSXUniversal: 1 + Exclude WebGL: 0 + Exclude Win: 1 + Exclude Win64: 1 - first: Any: second: - enabled: 1 + enabled: 0 settings: {} - first: Editor: Editor + second: + enabled: 1 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Standalone: Linux64 second: enabled: 0 settings: - DefaultValueInitialized: true + CPU: None + - first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: None + - first: + WebGL: WebGL + second: + enabled: 1 + settings: {} + - first: + WeixinMiniGame: WeixinMiniGame + second: + enabled: 1 + settings: {} - first: Windows Store Apps: WindowsStoreApps second: diff --git a/Runtime/Plugins/wx-perf.xml.meta b/Runtime/Plugins/wx-perf.xml.meta index f871240eb..f0d3a97e1 100644 --- a/Runtime/Plugins/wx-perf.xml.meta +++ b/Runtime/Plugins/wx-perf.xml.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 94249136b4b39434dbb3ae3f5b41f47b -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: +guid: 8ea3a597042b1e09596b698c5fcfd06b +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/Plugins/wx-runtime-editor.dll b/Runtime/Plugins/wx-runtime-editor.dll index 9a1ebc49c..8e31acfeb 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-editor.xml b/Runtime/Plugins/wx-runtime-editor.xml index 498b52a2d..7964732a4 100644 --- a/Runtime/Plugins/wx-runtime-editor.xml +++ b/Runtime/Plugins/wx-runtime-editor.xml @@ -1699,6 +1699,26 @@ 如果返回的是字符串,则数据在这个字段 + + + 文件的类型和存取的权限,对应 POSIX stat.st_mode + + + + + 文件大小,单位:B,对应 POSIX stat.st_size + + + + + 文件最近一次被存取或被执行的时间,UNIX 时间戳,对应 POSIX stat.st_atime + + + + + 文件最后一次被修改的时间,UNIX 时间戳,对应 POSIX stat.st_mtime + + 文件的路径 @@ -3089,11 +3109,41 @@ 可参考[calc_signature](https://docs.qq.com/doc/DVUN0QWJja0J5c2x4) + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 预告 id,通过 getChannelsLiveNoticeInfo 接口获取 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 错误信息 @@ -3104,31 +3154,6 @@ 是否成功 - - -  是否结束 - - - - - 从不同渠道获得的OPENLINK字符串 - - - - - 选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填 - - - - - 从不同渠道获得的OPENLINK字符串 - - - - - 选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填 - - 一个表示控制器设备上存在的坐标轴的数组 (比如控制器摇杆)。 @@ -3799,6 +3824,11 @@ 下载资源的 url + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 需要基础库: `2.10.4` @@ -3816,6 +3846,11 @@ 是否开启 Quic/h3 协议(iOS 微信目前使用 gQUIC-Q43;Android 微信在 v8.0.54 前使用 gQUIC-Q43,v8.0.54 开始使用 IETF QUIC,即 h3 协议;PC微信使用 IETF QUIC,即 h3 协议) + + + 接口调用失败的回调函数 + + 需要基础库: `1.8.0` @@ -3827,6 +3862,11 @@ HTTP 请求的 Header,Header 中不能设置 Referer + + + 接口调用成功的回调函数 + + 需要基础库: `2.10.0` @@ -4170,6 +4210,16 @@ 文本的内容 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 字号 @@ -4191,11 +4241,31 @@ - 'bold': 粗体; + + + 接口调用成功的回调函数 + + 需要添加的卡券列表 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 卡券的扩展参数。需将 CardExt 对象 JSON 序列化为**字符串**传入 @@ -4232,6 +4302,21 @@ shareTicket。可以从 wx.getEnterOptionsSync 中获取。详情 [shareTicket](#) + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 经过加密的activityId,解密后可得到原始的activityId。若解密后得到的activityId可以与开发者后台的活动id对应上则验证通过,否则表明valid字段不可靠(被篡改) 详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html) @@ -4257,16 +4342,71 @@ 需要获取权限的 scope,详见 [scope 列表](https://developers.weixin.qq.com/minigame/dev/guide/base-ability/authorize.html#scope-列表) + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 是否被添加至 「我的小程序」 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 最多可以选择的图片张数 + + + 接口调用失败的回调函数 + + 所选的图片的尺寸 @@ -4283,6 +4423,11 @@ - 'camera': 使用相机; + + + 接口调用成功的回调函数 + + 图片的本地临时文件路径列表 (本地路径) @@ -4312,11 +4457,21 @@ - 'front': 使用前置摄像头; + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 最多可以选择的文件个数,基础库2.25.0前,最多可支持9个文件,2.25.0及以后最多可支持20个文件 + + + 接口调用失败的回调函数 + + 拍摄视频最长拍摄时间,单位秒。时间范围为 3s 至 60s 之间。不限制相册。 @@ -4344,6 +4499,11 @@ - 'camera': 使用相机拍摄; + + + 接口调用成功的回调函数 + + 本地临时文件列表 @@ -4397,12 +4557,27 @@ 最多可以选择的文件个数,可以 0~100 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 需要基础库: `2.6.0` 根据文件拓展名过滤,仅 type==file 时有效。每一项都不能是空字符串。默认不过滤。 + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 所选的文件的类型 @@ -4452,6 +4627,21 @@ 蓝牙设备 id + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 错误信息 @@ -4494,11 +4684,31 @@ | 10013 | invalid_data | 连接 deviceId 为空或者是格式不正确 | + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 图片路径,图片的路径,支持本地路径、代码包路径 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 需要基础库: `2.26.0` @@ -4511,11 +4721,21 @@ 压缩后图片的宽度,单位为px,若不填写则默认以compressedHeight为准等比缩放。 + + + 接口调用失败的回调函数 + + 压缩质量,范围0~100,数值越小,质量越低,压缩率越高(仅对jpg有效)。 + + + 接口调用成功的回调函数 + + 压缩后图片的临时文件路径 (本地路径) @@ -4526,11 +4746,41 @@ 蓝牙设备 id + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 超时时间,单位 ms,不填表示不会超时 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + [BLEPeripheralServer](https://developers.weixin.qq.com/minigame/dev/api/device/bluetooth-peripheral/BLEPeripheralServer.html) @@ -4663,6 +4913,21 @@ 描述service的Object + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + characteristics列表 @@ -4818,11 +5083,36 @@ service 的 UUID + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 广播自定义参数 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 广播功率 @@ -4832,6 +5122,11 @@ - 'high': 功率高; + + + 接口调用成功的回调函数 + + 需要基础库: `2.20.1` @@ -4888,6 +5183,21 @@ 制造商信息 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 蓝牙特征的 UUID @@ -4913,6 +5223,51 @@ 可选,处理回包时使用 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 图像像素点数据,每四项表示一个像素点的 RGBA @@ -4928,6 +5283,11 @@ 图像宽度 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 是否返回当前图像的人脸角度信息 @@ -4948,6 +5308,16 @@ 是否返回当前图像的人脸(106 个点) + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 人脸角度信息,取值范围 [-1, 1],数值越接近 0 表示越正对摄像头 @@ -5023,6 +5393,21 @@ 右眼可信度 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 支持的音频输入源列表,可在 [RecorderManager.start()](https://developers.weixin.qq.com/minigame/dev/api/media/recorder/RecorderManager.start.html) 接口中使用。返回值定义参考 https://developer.android.com/reference/kotlin/android/media/MediaRecorder.AudioSource @@ -5046,6 +5431,21 @@ 蓝牙服务 UUID。需要先调用 [wx.getBLEDeviceServices](https://developers.weixin.qq.com/minigame/dev/api/device/bluetooth-ble/wx.getBLEDeviceServices.html) 获取 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 设备特征列表 @@ -5096,6 +5496,21 @@ 蓝牙设备 id + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 信号强度,单位 dBm @@ -5106,6 +5521,21 @@ 蓝牙设备 id。需要已经通过 [wx.createBLEConnection](https://developers.weixin.qq.com/minigame/dev/api/device/bluetooth-ble/wx.createBLEConnection.html) 建立连接 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 设备服务列表 @@ -5126,6 +5556,21 @@ 蓝牙设备 id + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 写模式 (iOS 特有参数) @@ -5144,6 +5589,21 @@ 缓存数据类别,取值为 periodic 或 pre + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 缓存数据 @@ -5169,6 +5629,21 @@ 客户端拿到缓存数据的时间戳 ms。(iOS 时间戳存在异常,8.0.27 修复) + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 接口调用结果 @@ -5179,6 +5654,21 @@ 自定义的登录态 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 是否正在充电中 @@ -5195,6 +5685,21 @@ 设备电量,范围 1 - 100 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 错误信息 @@ -5265,6 +5770,21 @@ Beacon 设备广播的 UUID + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 蓝牙适配器是否可用 @@ -5275,6 +5795,21 @@ 是否正在搜索设备 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + UUID 对应的已连接设备列表 @@ -5325,18 +5860,33 @@ 视频号 id,以“sph”开头的id,可在视频号助手获取 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 需要基础库: `2.29.0` 结束时间,筛选指定时间段的直播。若上传了startTime,未上传endTime,则endTime默认取当前时间 + + + 接口调用失败的回调函数 + + 需要基础库: `2.29.0` 起始时间,筛选指定时间段的直播。若上传了endTime,未上传startTime,则startTime默认为0 + + + 接口调用成功的回调函数 + + 直播主题 @@ -5394,6 +5944,21 @@ 视频号 id,以“sph”开头的id,可在视频号助手获取 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 直播封面 @@ -5430,6 +5995,21 @@ 预告状态:0可用 1取消 2已用 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 剪贴板的内容 @@ -5440,6 +6020,21 @@ 蓝牙设备主服务的 UUID 列表(支持 16/32/128 位 UUID) + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 搜索到的设备列表 @@ -5455,13 +6050,58 @@ 蓝牙设备名称,某些设备可能没有 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 第三方平台自定义的数据 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 返回的坐标类型 @@ -5485,6 +6125,21 @@ 需要获取的数据指标的对象数组 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 见type表格说明 @@ -5515,16 +6170,19 @@ 使用 sha1( rawData + sessionkey ) 得到字符串,用于校验用户信息 - + - 需要基础库: `3.7.8` - 开启后单聊下返回 open_single_roomid + 接口调用结束的回调函数(调用成功、失败都会执行) - + - 需要基础库: `3.7.8` - 开启后返回用户在群(含单聊)下的 group_openid + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 @@ -5566,11 +6224,41 @@ 加密算法的初始向量,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html) + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + AI推理引擎版本 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 错误信息 @@ -5586,6 +6274,21 @@ 本机局域网子网掩码,基础库 2.24.0 开始支持 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 需要基础库: `2.22.1` @@ -5616,6 +6319,16 @@ 是否处于弱网环境 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 手机号实时验证,向用户申请,并在用户同意后,快速填写和实时验证手机号 [具体说明](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/getRealtimePhoneNumber.html)。 @@ -5626,6 +6339,11 @@ 当手机号快速验证或手机号实时验证额度用尽时,是否对用户展示“申请获取你的手机号,但该功能使用次数已达当前小程序上限,暂时无法使用”的提示,默认展示。 + + + 接口调用成功的回调函数 + + 动态令牌 @@ -5641,6 +6359,21 @@ 错误码(失败时返回) + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 是否需要用户授权隐私协议(如果开发者没有在「MP后台-设置-服务内容声明-用户隐私保护指引」中声明隐私收集类型则会返回false;如果开发者声明了隐私收集,且用户之前同意过隐私协议则会返回false;如果开发者声明了隐私收集,且用户还没同意过则返回true;如果用户之前同意过、但后来小程序又新增了隐私收集类型也会返回true) @@ -5651,11 +6384,41 @@ 隐私授权协议的名称 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 屏幕亮度值,范围 0 ~ 1,0 最暗,1 最亮 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 录屏状态 @@ -5664,6 +6427,21 @@ - 'off': 关闭; + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 需要基础库: `2.10.1` @@ -5706,12 +6484,42 @@ shareTicket,详见[获取更多转发信息](#) + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 需要基础库: `1.9.90` 超时时间,单位 ms + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 封面广告组件展示状态码 @@ -5732,6 +6540,21 @@ - 'fail': 展示失败; + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 当前占用的空间大小, 单位 KB @@ -5747,6 +6570,46 @@ 限制的空间大小,单位 KB + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 显示用户信息的语言 @@ -5756,6 +6619,11 @@ - 'zh_TW': 繁体中文; + + + 接口调用成功的回调函数 + + 是否带上登录态信息。当 withCredentials 为 true 时,要求此前有调用过 wx.login 且登录态尚未过期,此时返回的数据会包含 encryptedData, iv 等敏感信息;当 withCredentials 为 false 时,不要求有登录态,返回的数据不包含 encryptedData, iv 等敏感信息。 @@ -5841,6 +6709,21 @@ 要获取的 key 列表 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 错误码 @@ -5868,6 +6751,21 @@ 加密算法的初始向量,详见 [用户数据的签名验证和加解密](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html#加密数据解密算法) + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 需要基础库: `2.7.0` @@ -5884,29 +6782,119 @@ 加密算法的初始向量,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html) + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 需要基础库: `2.22.1` 目前 toast 和 loading 相关接口可以相互混用,此参数可用于取消混用特性 + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 需要基础库: `2.11.3` 本接口为 Beta 版本,暂只在 Android 平台支持。需要隐藏的转发按钮名称列表,默认['shareAppMessage', 'shareTimeline']。按钮名称合法值包含 "shareAppMessage"、"shareTimeline" 两种 + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 需要基础库: `2.22.1` 目前 toast 和 loading 相关接口可以相互混用,此参数可用于取消混用特性 + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 蓝牙设备 id + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 小游戏内此房间/群聊的 ID。同一时刻传入相同 groupId 的用户会进入到同个实时语音房间。 @@ -5927,6 +6915,16 @@ 验证所需的时间戳 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 需要基础库: `2.29.0` @@ -5946,6 +6944,11 @@ - 'video': 视频房间,结合 [voip-room](#) 组件可显示成员画面; + + + 接口调用成功的回调函数 + + 错误信息 @@ -5993,6 +6996,21 @@ 在此通话中的成员 openId 名单 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 需要基础库: `1.9.90` @@ -6025,21 +7043,56 @@ pin 码,Base64 格式。 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 超时时间,单位 ms + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 需要返回给上一个小程序的数据,上一个小程序可在 `App.onShow` 中获取到这份数据。 [详情](#)。 + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 要打开的小程序 appId + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 要打开的小程序版本。仅在当前小程序为开发版或体验版时此参数有效。如果当前小程序是正式版,则打开的小程序必定是正式版。 @@ -6054,6 +7107,11 @@ 需要传递给目标小程序的数据,目标小程序可在 `App.onLaunch`,`App.onShow` 中获取到这份数据。如果跳转的是小游戏,可以在 [wx.onShow](https://developers.weixin.qq.com/minigame/dev/api/base/app/life-cycle/wx.onShow.html)、[wx.getLaunchOptionsSync](https://developers.weixin.qq.com/minigame/dev/api/base/app/life-cycle/wx.getLaunchOptionsSync.html) 中可以获取到这份数据数据。 + + + 接口调用失败的回调函数 + + 需要基础库: `2.24.0` @@ -6071,6 +7129,11 @@ 小程序链接,当传递该参数后,可以不传 appId 和 path。链接可以通过【小程序菜单】->【复制链接】获取。 + + + 接口调用成功的回调函数 + + 蓝牙特征的 UUID @@ -6091,6 +7154,21 @@ 是否启用 notify + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 需要基础库: `2.4.0` @@ -6587,6 +7665,31 @@ 变化后的窗口宽度,单位 px + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 需要基础库: `2.10.0` @@ -6596,11 +7699,31 @@ - 'peripheral': 从机(外围设备)模式; + + + 接口调用成功的回调函数 + + 需要打开的卡券列表 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 卡券 ID @@ -6617,6 +7740,21 @@ 视频号 id,以“sph”开头的id,可在视频号助手获取 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 活动 id @@ -6627,11 +7765,36 @@ 视频号 id,以“sph”开头的id,可在视频号助手获取 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 视频号 id,以“sph”开头的id,可在视频号助手获取 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 直播 feedId,通过 getChannelsLiveInfo 接口获取(基础库 v2.19.2 之前的版本需要填写) @@ -6642,11 +7805,31 @@ 直播 nonceId,通过 getChannelsLiveInfo 接口获取(基础库 v2.19.2 之前的版本需要填写) + + + 接口调用成功的回调函数 + + 视频号 id + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 企业ID @@ -6657,6 +7840,16 @@ 客服信息 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 气泡消息图片 @@ -6677,11 +7870,26 @@ 是否发送小程序气泡消息 + + + 接口调用成功的回调函数 + + 客服链接 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 会话内消息卡片图片路径 @@ -6707,6 +7915,11 @@ 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,用户点击后可以快速发送小程序消息 + + + 接口调用成功的回调函数 + + 在客服会话内点击小程序消息卡片进入小程序时,所带的小程序打开路径 @@ -6717,6 +7930,36 @@ 在客服会话内点击小程序消息卡片进入小程序时,所带的小程序打开参数 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 需要基础库: `2.10.3` @@ -6736,6 +7979,21 @@ 用户订阅消息设置,接口参数`withSubscriptions`值为`true`时才会返回。 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 对局回放的播放速率,只能设置以下几个值: 0.3, 0.5, 1, 1.5, 2, 2.5, 3.其中1表示元素播放,小于1表示减速播放,大于1表示加速播放 @@ -6751,11 +8009,21 @@ 对局回放背景音乐的地址 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 分享的对局回放打开后的描述内容 + + + 接口调用失败的回调函数 + + 分享的对局回放打开后跳转小游戏的 path (独立分包路径) @@ -6766,6 +8034,11 @@ 分享的对局回放打开后跳转小游戏的 query + + + 接口调用成功的回调函数 + + 对局回放的剪辑区间,是一个二维数组,单位 ms(毫秒)。[[1000, 3000], [4000, 5000]] 表示剪辑已录制对局回放的 1-3 秒和 4-5 秒最终合成为一个 3 秒的对局回放。对局回放剪辑后的总时长最多 60 秒,即 1 分钟 @@ -6786,11 +8059,21 @@ 需要预览的图片链接列表。[2.2.3](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html) 起支持云文件ID。 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 当前显示图片的链接 + + + 接口调用失败的回调函数 + + 需要基础库: `2.13.0` @@ -6803,16 +8086,31 @@ 是否显示长按菜单。 + + + 接口调用成功的回调函数 + + 需要预览的资源列表 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 当前显示的资源序号 + + + 接口调用失败的回调函数 + + 需要基础库: `2.13.0` @@ -6825,6 +8123,11 @@ 是否显示长按菜单。 + + + 接口调用成功的回调函数 + + 图片或视频的地址 @@ -6858,21 +8161,71 @@ 蓝牙特征对应服务的 UUID + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 本地缓存中指定的 key + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 要删除掉 key 列表 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 场景ID,在「小程序管理后台」获取 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 此场景的耗时,单位 ms @@ -6883,11 +8236,21 @@ 自定义维度数据,key在「小程序管理后台」获取。只支持能够通过JSON.stringify序列化的对象,且序列化后长度不超过1024个字符 + + + 接口调用失败的回调函数 + + 自定义指标数据,key在「小程序管理后台」获取。只支持能够通过JSON.stringify序列化的对象,且序列化后长度不超过1024个字符 + + + 接口调用成功的回调函数 + + 错误信息 @@ -7013,6 +8376,21 @@ 分区 ID + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 错误信息 @@ -7092,6 +8470,11 @@ 购买数量。mode=game 时必填。购买数量。详见 [buyQuantity 限制说明](#buyquantity-限制说明)。 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 环境配置 @@ -7100,6 +8483,11 @@ - 1: 米大师沙箱环境; + + + 接口调用失败的回调函数 + + 申请接入时的平台,platform 与应用id有关。 @@ -7107,6 +8495,11 @@ - 'android': android; + + + 接口调用成功的回调函数 + + 分区 ID @@ -7213,6 +8606,21 @@ 需要订阅的消息模板的id的集合,一次调用最多可订阅3条消息(注意:iOS客户端7.0.6版本、Android客户端7.0.7版本之后的一次性订阅/长期订阅才支持多个模板消息,iOS客户端7.0.5版本、Android客户端7.0.6版本之前的一次订阅只支持一个模板消息)消息模板id在[微信公众平台(mp.weixin.qq.com)-功能-订阅消息]中配置。每个tmplId对应的模板标题需要不相同,否则会被过滤。 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 接口调用失败错误码 @@ -7236,6 +8644,21 @@ 系统订阅消息类型列表,一次调用最多可订阅3种类型的消息,目前支持:"SYS_MSG_TYPE_INTERACTIVE"(好友互动提醒)、"SYS_MSG_TYPE_RANK"(排行榜超越提醒)、"SYS_MSG_TYPE_WHATS_NEW"(游戏更新提醒) + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + [MSG_TYPE]是动态的键,即系统订阅消息类型,值为'accept'、'reject'、'ban','accept'表示用户同意订阅该类型对应的模板消息,'reject'表示用户拒绝订阅该类型对应的模板消息,'ban'表示已被后台封禁。例如 { errMsg: "requestSubscribeSystemMessage:ok", SYS_MSG_TYPE_INTERACTIVE: "accept" } 表示用户同意订阅'SYS_MSG_TYPE_INTERACTIVE'这条消息 @@ -7244,21 +8667,91 @@ 接口调用成功时errMsg值为'requestSubscribeSystemMessage:ok' + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 打开的页面路径,path 中 ? 后面的部分会成为 query + + + 接口调用成功的回调函数 + + 待保存文件路径 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 图片文件路径,可以是临时文件路径或永久文件路径 (本地路径) ,不支持网络路径 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 需要基础库: `1.2.0` @@ -7277,6 +8770,11 @@ - 'pdf417': PDF417 条码; + + + 接口调用成功的回调函数 + + 所扫码的字符集 @@ -7332,6 +8830,21 @@ 最大传输单元。设置范围为 (22,512) 区间内,单位 bytes + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 最终协商的 MTU 值。如果协商失败则无此参数。安卓客户端 8.0.9 开始支持。 @@ -7347,11 +8860,41 @@ 自定义的登录态 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 剪贴板的内容 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 表示切换为横屏还是竖屏 @@ -7360,11 +8903,51 @@ - 'portrait': 竖屏; + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 是否打开调试 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 是否与其他音频混播,设置为 true 之后,不会终止其他应用或微信内的音乐 @@ -7380,11 +8963,31 @@ true 代表用扬声器播放,false 代表听筒播放,默认值为 true。 + + + 接口调用成功的回调函数 + + 是否保持屏幕常亮 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 样式风格 @@ -7393,11 +8996,41 @@ - 'dark': 深色; + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 屏幕亮度值,范围 0 ~ 1,0 最暗,1 最亮。在安卓端支持传入特殊值 -1,表示屏幕亮度跟随系统变化 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 样式风格 @@ -7406,11 +9039,41 @@ - 'black': 浅色; + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 要修改的 KV 数据列表 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 数据的 key @@ -7421,6 +9084,21 @@ 数据的 value + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 截屏/录屏时的表现,仅支持 none / hidden,传入 hidden 则表示在截屏/录屏时隐藏屏幕 @@ -7466,11 +9144,26 @@ 警示文案 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 按钮的文字颜色 + + + 接口调用成功的回调函数 + + 用户点击的按钮序号,从上到下的顺序,从0开始 @@ -7507,16 +9200,46 @@ 是否为多行输入 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 提示的内容 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 是否显示透明蒙层,防止触摸穿透 + + + 接口调用成功的回调函数 + + 取消按钮的文字颜色,必须是 16 进制格式的颜色字符串 @@ -7527,6 +9250,11 @@ 取消按钮的文字,最多 4 个字符 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 确认按钮的文字颜色,必须是 16 进制格式的颜色字符串 @@ -7548,6 +9276,11 @@ 是否显示输入框 + + + 接口调用失败的回调函数 + + 需要基础库: `2.17.1` @@ -7559,6 +9292,11 @@ 是否显示取消按钮 + + + 接口调用成功的回调函数 + + 提示的标题 @@ -7585,24 +9323,60 @@ 要分享的图片地址,必须为本地路径或临时路径 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 需要基础库: `3.2.0` 从消息小程序入口打开小程序的路径,如果当前页面允许分享给朋友,则默认为当前页面路径,否则默认为小程序首页 + + + 接口调用失败的回调函数 + + 需要基础库: `3.2.0` 分享的图片消息是否要带小程序入口 (仅部分小程序类目可用) + + + 需要基础库: `3.2.0` + 分享样式,小程序可选 v2 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 需要基础库: `2.11.3` 本接口为 Beta 版本,暂只在 Android 平台支持。需要显示的转发按钮名称列表,默认['shareAppMessage']。按钮名称合法值包含 "shareAppMessage"、"shareTimeline" 两种 + + + 接口调用成功的回调函数 + + 是否使用带 shareTicket 的转发[详情](#) @@ -7613,11 +9387,21 @@ 提示的内容 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 提示的延迟时间 + + + 接口调用失败的回调函数 + + 图标 @@ -7639,6 +9423,21 @@ 是否显示透明蒙层,防止触摸穿透 + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 需要基础库: `2.1.0` @@ -7649,21 +9448,51 @@ - 'normal': 普通的回调频率,在 200ms/次 左右; + + + 接口调用成功的回调函数 + + Beacon 设备广播的 UUID 列表 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 是否校验蓝牙开关,仅在 iOS 下有效。iOS 11 起,控制面板里关掉蓝牙,还是能继续使用 Beacon 服务。 + + + 接口调用成功的回调函数 + + 是否允许重复上报同一设备。如果允许重复上报,则 [wx.onBlueToothDeviceFound](#) 方法会多次上报同一设备,但是 RSSI 值会有不同。 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 上报设备的间隔,单位 ms。0 表示找到新设备立即上报,其他数值根据传入的间隔上报。 @@ -7683,6 +9512,36 @@ 要搜索的蓝牙设备主服务的 UUID 列表(支持 16/32/128 位 UUID)。某些蓝牙设备会广播自己的主 service 的 UUID。如果设置此参数,则只搜索广播包有对应 UUID 的主服务的蓝牙设备。建议通过该参数过滤掉周边不需要处理的其他蓝牙设备。 + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 监听设备方向的变化回调函数的执行频率 @@ -7692,21 +9551,135 @@ - 'normal': 普通的回调频率,在 200ms/次 左右; + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 键盘输入框的当前值 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 需要基础库: `2.4.0` 动态消息的 activityId。通过 [updatableMessage.createActivityId](https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/updatable-message/updatableMessage.createActivityId.html) 接口获取 - + - 需要基础库: `3.7.8` - 指定成员的方式 + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 @@ -7721,9 +9694,9 @@ 是否是动态消息,详见[动态消息](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/share/updatable-message.html) - + - 参与用户此聊天室下的 group_openid 列表 + 接口调用成功的回调函数 @@ -7738,12 +9711,6 @@ 群待办消息的id,通过toDoActivityId可以把多个群待办消息聚合为同一个。通过 [updatableMessage.createActivityId](https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/updatable-message/updatableMessage.createActivityId.html) 接口获取。详见[群待办消息](#) - - - 需要基础库: `3.7.8` - 聊天工具模式特殊动态消息 - - 是否使用带 shareTicket 的转发[详情](#) @@ -7774,12 +9741,72 @@ 静音设置 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 需要基础库: `2.13.0` 震动强度类型,有效值为:heavy、medium、light + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 错误信息 @@ -7807,6 +9834,21 @@ 蓝牙设备特征对应的二进制值 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 蓝牙特征值的写模式设置,有两种模式,iOS 优先 write,安卓优先 writeNoResponse 。(基础库 2.22.0 开始支持) @@ -7820,6 +9862,36 @@ 自定义query + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 错误信息 @@ -7850,11 +9922,41 @@ 是否正在直播 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 最近几场直播的 feedId 列表 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 包括敏感数据在内的完整转发信息的加密数据,详细见加密数据解密算法 https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/signature.html @@ -7885,16 +9987,76 @@ 要查询的直播的id + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 支持填写最多4个openid,该用户的直播间将在直播专区置顶显示;可不填 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 用于打开指定游戏内容页面的开放链接 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + code @@ -7910,6 +10072,21 @@ 要打开的业务类型,目前仅支持 'servicecommentpage' + + + 调用成功、失败都会执行 + + + + + 评价失败的回调 + + + + + 评价成功的回调 + + 帧数据 @@ -7941,41 +10118,6 @@ 要发送的消息 - - - [PageManager.destroy()](https://developers.weixin.qq.com/minigame/dev/api/open-api/openlink/PageManager.destroy.html) - 需要基础库: `3.6.7` - 销毁开放页面实例。 - - - - - [PageManager.off(string eventName, function callback)](https://developers.weixin.qq.com/minigame/dev/api/open-api/openlink/PageManager.off.html) - 需要基础库: `3.6.7` - 取消监听来自活动、功能向开发者产生的某些事件。 - - - - - [PageManager.on(string eventName, function callback)](https://developers.weixin.qq.com/minigame/dev/api/open-api/openlink/PageManager.on.html) - 需要基础库: `3.6.7` - 监听来自活动、功能向开发者产生的某些事件。 - - - - - [Promise PageManager.load(Object object)](https://developers.weixin.qq.com/minigame/dev/api/open-api/openlink/PageManager.load.html) - 需要基础库: `3.6.7` - 提供OPENLINK加载活动、功能信息。 - - - - - [Promise PageManager.show(Object object)](https://developers.weixin.qq.com/minigame/dev/api/open-api/openlink/PageManager.show.html) - 需要基础库: `3.6.7` - 显示已经成功加载信息的开放页面活动、功能。如果调用前未执行 `.load({ ... })` 将自动调用1次并返回加载信息结果。 - - [RealtimeLogManager.addFilterMsg(string msg)](https://developers.weixin.qq.com/minigame/dev/api/base/debug/RealtimeLogManager.addFilterMsg.html) diff --git a/Runtime/Plugins/wx-runtime-editor.xml.meta b/Runtime/Plugins/wx-runtime-editor.xml.meta index b368cd71e..09e44c66d 100644 --- a/Runtime/Plugins/wx-runtime-editor.xml.meta +++ b/Runtime/Plugins/wx-runtime-editor.xml.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 744bf12ecf3dfaa699dd812a15f33b22 +guid: 8e492e76cce10a02f6995c95f8ac154c DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/Plugins/wx-runtime.dll b/Runtime/Plugins/wx-runtime.dll index e91914610..c9de856ac 100644 Binary files a/Runtime/Plugins/wx-runtime.dll and b/Runtime/Plugins/wx-runtime.dll differ diff --git a/Runtime/Plugins/wx-runtime.xml b/Runtime/Plugins/wx-runtime.xml index d4e4841fa..004e076b2 100644 --- a/Runtime/Plugins/wx-runtime.xml +++ b/Runtime/Plugins/wx-runtime.xml @@ -1705,6 +1705,26 @@ 如果返回的是字符串,则数据在这个字段 + + + 文件的类型和存取的权限,对应 POSIX stat.st_mode + + + + + 文件大小,单位:B,对应 POSIX stat.st_size + + + + + 文件最近一次被存取或被执行的时间,UNIX 时间戳,对应 POSIX stat.st_atime + + + + + 文件最后一次被修改的时间,UNIX 时间戳,对应 POSIX stat.st_mtime + + 文件的路径 @@ -3095,11 +3115,41 @@ 可参考[calc_signature](https://docs.qq.com/doc/DVUN0QWJja0J5c2x4) + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 预告 id,通过 getChannelsLiveNoticeInfo 接口获取 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 错误信息 @@ -3110,31 +3160,6 @@ 是否成功 - - -  是否结束 - - - - - 从不同渠道获得的OPENLINK字符串 - - - - - 选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填 - - - - - 从不同渠道获得的OPENLINK字符串 - - - - - 选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填 - - 一个表示控制器设备上存在的坐标轴的数组 (比如控制器摇杆)。 @@ -3805,6 +3830,11 @@ 下载资源的 url + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 需要基础库: `2.10.4` @@ -3822,6 +3852,11 @@ 是否开启 Quic/h3 协议(iOS 微信目前使用 gQUIC-Q43;Android 微信在 v8.0.54 前使用 gQUIC-Q43,v8.0.54 开始使用 IETF QUIC,即 h3 协议;PC微信使用 IETF QUIC,即 h3 协议) + + + 接口调用失败的回调函数 + + 需要基础库: `1.8.0` @@ -3833,6 +3868,11 @@ HTTP 请求的 Header,Header 中不能设置 Referer + + + 接口调用成功的回调函数 + + 需要基础库: `2.10.0` @@ -4176,6 +4216,16 @@ 文本的内容 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 字号 @@ -4197,11 +4247,31 @@ - 'bold': 粗体; + + + 接口调用成功的回调函数 + + 需要添加的卡券列表 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 卡券的扩展参数。需将 CardExt 对象 JSON 序列化为**字符串**传入 @@ -4238,6 +4308,21 @@ shareTicket。可以从 wx.getEnterOptionsSync 中获取。详情 [shareTicket](#) + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 经过加密的activityId,解密后可得到原始的activityId。若解密后得到的activityId可以与开发者后台的活动id对应上则验证通过,否则表明valid字段不可靠(被篡改) 详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html) @@ -4263,16 +4348,71 @@ 需要获取权限的 scope,详见 [scope 列表](https://developers.weixin.qq.com/minigame/dev/guide/base-ability/authorize.html#scope-列表) + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 是否被添加至 「我的小程序」 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 最多可以选择的图片张数 + + + 接口调用失败的回调函数 + + 所选的图片的尺寸 @@ -4289,6 +4429,11 @@ - 'camera': 使用相机; + + + 接口调用成功的回调函数 + + 图片的本地临时文件路径列表 (本地路径) @@ -4318,11 +4463,21 @@ - 'front': 使用前置摄像头; + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 最多可以选择的文件个数,基础库2.25.0前,最多可支持9个文件,2.25.0及以后最多可支持20个文件 + + + 接口调用失败的回调函数 + + 拍摄视频最长拍摄时间,单位秒。时间范围为 3s 至 60s 之间。不限制相册。 @@ -4350,6 +4505,11 @@ - 'camera': 使用相机拍摄; + + + 接口调用成功的回调函数 + + 本地临时文件列表 @@ -4403,12 +4563,27 @@ 最多可以选择的文件个数,可以 0~100 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 需要基础库: `2.6.0` 根据文件拓展名过滤,仅 type==file 时有效。每一项都不能是空字符串。默认不过滤。 + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 所选的文件的类型 @@ -4458,6 +4633,21 @@ 蓝牙设备 id + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 错误信息 @@ -4500,11 +4690,31 @@ | 10013 | invalid_data | 连接 deviceId 为空或者是格式不正确 | + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 图片路径,图片的路径,支持本地路径、代码包路径 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 需要基础库: `2.26.0` @@ -4517,11 +4727,21 @@ 压缩后图片的宽度,单位为px,若不填写则默认以compressedHeight为准等比缩放。 + + + 接口调用失败的回调函数 + + 压缩质量,范围0~100,数值越小,质量越低,压缩率越高(仅对jpg有效)。 + + + 接口调用成功的回调函数 + + 压缩后图片的临时文件路径 (本地路径) @@ -4532,11 +4752,41 @@ 蓝牙设备 id + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 超时时间,单位 ms,不填表示不会超时 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + [BLEPeripheralServer](https://developers.weixin.qq.com/minigame/dev/api/device/bluetooth-peripheral/BLEPeripheralServer.html) @@ -4669,6 +4919,21 @@ 描述service的Object + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + characteristics列表 @@ -4824,11 +5089,36 @@ service 的 UUID + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 广播自定义参数 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 广播功率 @@ -4838,6 +5128,11 @@ - 'high': 功率高; + + + 接口调用成功的回调函数 + + 需要基础库: `2.20.1` @@ -4894,6 +5189,21 @@ 制造商信息 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 蓝牙特征的 UUID @@ -4919,6 +5229,51 @@ 可选,处理回包时使用 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 图像像素点数据,每四项表示一个像素点的 RGBA @@ -4934,6 +5289,11 @@ 图像宽度 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 是否返回当前图像的人脸角度信息 @@ -4954,6 +5314,16 @@ 是否返回当前图像的人脸(106 个点) + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 人脸角度信息,取值范围 [-1, 1],数值越接近 0 表示越正对摄像头 @@ -5029,6 +5399,21 @@ 右眼可信度 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 支持的音频输入源列表,可在 [RecorderManager.start()](https://developers.weixin.qq.com/minigame/dev/api/media/recorder/RecorderManager.start.html) 接口中使用。返回值定义参考 https://developer.android.com/reference/kotlin/android/media/MediaRecorder.AudioSource @@ -5052,6 +5437,21 @@ 蓝牙服务 UUID。需要先调用 [wx.getBLEDeviceServices](https://developers.weixin.qq.com/minigame/dev/api/device/bluetooth-ble/wx.getBLEDeviceServices.html) 获取 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 设备特征列表 @@ -5102,6 +5502,21 @@ 蓝牙设备 id + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 信号强度,单位 dBm @@ -5112,6 +5527,21 @@ 蓝牙设备 id。需要已经通过 [wx.createBLEConnection](https://developers.weixin.qq.com/minigame/dev/api/device/bluetooth-ble/wx.createBLEConnection.html) 建立连接 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 设备服务列表 @@ -5132,6 +5562,21 @@ 蓝牙设备 id + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 写模式 (iOS 特有参数) @@ -5150,6 +5595,21 @@ 缓存数据类别,取值为 periodic 或 pre + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 缓存数据 @@ -5175,6 +5635,21 @@ 客户端拿到缓存数据的时间戳 ms。(iOS 时间戳存在异常,8.0.27 修复) + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 接口调用结果 @@ -5185,6 +5660,21 @@ 自定义的登录态 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 是否正在充电中 @@ -5201,6 +5691,21 @@ 设备电量,范围 1 - 100 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 错误信息 @@ -5271,6 +5776,21 @@ Beacon 设备广播的 UUID + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 蓝牙适配器是否可用 @@ -5281,6 +5801,21 @@ 是否正在搜索设备 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + UUID 对应的已连接设备列表 @@ -5331,18 +5866,33 @@ 视频号 id,以“sph”开头的id,可在视频号助手获取 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 需要基础库: `2.29.0` 结束时间,筛选指定时间段的直播。若上传了startTime,未上传endTime,则endTime默认取当前时间 + + + 接口调用失败的回调函数 + + 需要基础库: `2.29.0` 起始时间,筛选指定时间段的直播。若上传了endTime,未上传startTime,则startTime默认为0 + + + 接口调用成功的回调函数 + + 直播主题 @@ -5400,6 +5950,21 @@ 视频号 id,以“sph”开头的id,可在视频号助手获取 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 直播封面 @@ -5436,6 +6001,21 @@ 预告状态:0可用 1取消 2已用 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 剪贴板的内容 @@ -5446,6 +6026,21 @@ 蓝牙设备主服务的 UUID 列表(支持 16/32/128 位 UUID) + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 搜索到的设备列表 @@ -5461,13 +6056,58 @@ 蓝牙设备名称,某些设备可能没有 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 第三方平台自定义的数据 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 返回的坐标类型 @@ -5491,6 +6131,21 @@ 需要获取的数据指标的对象数组 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 见type表格说明 @@ -5521,16 +6176,19 @@ 使用 sha1( rawData + sessionkey ) 得到字符串,用于校验用户信息 - + - 需要基础库: `3.7.8` - 开启后单聊下返回 open_single_roomid + 接口调用结束的回调函数(调用成功、失败都会执行) - + - 需要基础库: `3.7.8` - 开启后返回用户在群(含单聊)下的 group_openid + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 @@ -5572,11 +6230,41 @@ 加密算法的初始向量,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html) + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + AI推理引擎版本 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 错误信息 @@ -5592,6 +6280,21 @@ 本机局域网子网掩码,基础库 2.24.0 开始支持 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 需要基础库: `2.22.1` @@ -5622,6 +6325,16 @@ 是否处于弱网环境 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 手机号实时验证,向用户申请,并在用户同意后,快速填写和实时验证手机号 [具体说明](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/getRealtimePhoneNumber.html)。 @@ -5632,6 +6345,11 @@ 当手机号快速验证或手机号实时验证额度用尽时,是否对用户展示“申请获取你的手机号,但该功能使用次数已达当前小程序上限,暂时无法使用”的提示,默认展示。 + + + 接口调用成功的回调函数 + + 动态令牌 @@ -5647,6 +6365,21 @@ 错误码(失败时返回) + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 是否需要用户授权隐私协议(如果开发者没有在「MP后台-设置-服务内容声明-用户隐私保护指引」中声明隐私收集类型则会返回false;如果开发者声明了隐私收集,且用户之前同意过隐私协议则会返回false;如果开发者声明了隐私收集,且用户还没同意过则返回true;如果用户之前同意过、但后来小程序又新增了隐私收集类型也会返回true) @@ -5657,11 +6390,41 @@ 隐私授权协议的名称 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 屏幕亮度值,范围 0 ~ 1,0 最暗,1 最亮 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 录屏状态 @@ -5670,6 +6433,21 @@ - 'off': 关闭; + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 需要基础库: `2.10.1` @@ -5712,12 +6490,42 @@ shareTicket,详见[获取更多转发信息](#) + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 需要基础库: `1.9.90` 超时时间,单位 ms + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 封面广告组件展示状态码 @@ -5738,6 +6546,21 @@ - 'fail': 展示失败; + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 当前占用的空间大小, 单位 KB @@ -5753,6 +6576,46 @@ 限制的空间大小,单位 KB + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 显示用户信息的语言 @@ -5762,6 +6625,11 @@ - 'zh_TW': 繁体中文; + + + 接口调用成功的回调函数 + + 是否带上登录态信息。当 withCredentials 为 true 时,要求此前有调用过 wx.login 且登录态尚未过期,此时返回的数据会包含 encryptedData, iv 等敏感信息;当 withCredentials 为 false 时,不要求有登录态,返回的数据不包含 encryptedData, iv 等敏感信息。 @@ -5847,6 +6715,21 @@ 要获取的 key 列表 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 错误码 @@ -5874,6 +6757,21 @@ 加密算法的初始向量,详见 [用户数据的签名验证和加解密](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html#加密数据解密算法) + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 需要基础库: `2.7.0` @@ -5890,29 +6788,119 @@ 加密算法的初始向量,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html) + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 需要基础库: `2.22.1` 目前 toast 和 loading 相关接口可以相互混用,此参数可用于取消混用特性 + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 需要基础库: `2.11.3` 本接口为 Beta 版本,暂只在 Android 平台支持。需要隐藏的转发按钮名称列表,默认['shareAppMessage', 'shareTimeline']。按钮名称合法值包含 "shareAppMessage"、"shareTimeline" 两种 + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 需要基础库: `2.22.1` 目前 toast 和 loading 相关接口可以相互混用,此参数可用于取消混用特性 + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 蓝牙设备 id + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 小游戏内此房间/群聊的 ID。同一时刻传入相同 groupId 的用户会进入到同个实时语音房间。 @@ -5933,6 +6921,16 @@ 验证所需的时间戳 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 需要基础库: `2.29.0` @@ -5952,6 +6950,11 @@ - 'video': 视频房间,结合 [voip-room](#) 组件可显示成员画面; + + + 接口调用成功的回调函数 + + 错误信息 @@ -5999,6 +7002,21 @@ 在此通话中的成员 openId 名单 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 需要基础库: `1.9.90` @@ -6031,21 +7049,56 @@ pin 码,Base64 格式。 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 超时时间,单位 ms + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 需要返回给上一个小程序的数据,上一个小程序可在 `App.onShow` 中获取到这份数据。 [详情](#)。 + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 要打开的小程序 appId + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 要打开的小程序版本。仅在当前小程序为开发版或体验版时此参数有效。如果当前小程序是正式版,则打开的小程序必定是正式版。 @@ -6060,6 +7113,11 @@ 需要传递给目标小程序的数据,目标小程序可在 `App.onLaunch`,`App.onShow` 中获取到这份数据。如果跳转的是小游戏,可以在 [wx.onShow](https://developers.weixin.qq.com/minigame/dev/api/base/app/life-cycle/wx.onShow.html)、[wx.getLaunchOptionsSync](https://developers.weixin.qq.com/minigame/dev/api/base/app/life-cycle/wx.getLaunchOptionsSync.html) 中可以获取到这份数据数据。 + + + 接口调用失败的回调函数 + + 需要基础库: `2.24.0` @@ -6077,6 +7135,11 @@ 小程序链接,当传递该参数后,可以不传 appId 和 path。链接可以通过【小程序菜单】->【复制链接】获取。 + + + 接口调用成功的回调函数 + + 蓝牙特征的 UUID @@ -6097,6 +7160,21 @@ 是否启用 notify + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 需要基础库: `2.4.0` @@ -6593,6 +7671,31 @@ 变化后的窗口宽度,单位 px + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 需要基础库: `2.10.0` @@ -6602,11 +7705,31 @@ - 'peripheral': 从机(外围设备)模式; + + + 接口调用成功的回调函数 + + 需要打开的卡券列表 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 卡券 ID @@ -6623,6 +7746,21 @@ 视频号 id,以“sph”开头的id,可在视频号助手获取 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 活动 id @@ -6633,11 +7771,36 @@ 视频号 id,以“sph”开头的id,可在视频号助手获取 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 视频号 id,以“sph”开头的id,可在视频号助手获取 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 直播 feedId,通过 getChannelsLiveInfo 接口获取(基础库 v2.19.2 之前的版本需要填写) @@ -6648,11 +7811,31 @@ 直播 nonceId,通过 getChannelsLiveInfo 接口获取(基础库 v2.19.2 之前的版本需要填写) + + + 接口调用成功的回调函数 + + 视频号 id + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 企业ID @@ -6663,6 +7846,16 @@ 客服信息 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 气泡消息图片 @@ -6683,11 +7876,26 @@ 是否发送小程序气泡消息 + + + 接口调用成功的回调函数 + + 客服链接 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 会话内消息卡片图片路径 @@ -6713,6 +7921,11 @@ 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,用户点击后可以快速发送小程序消息 + + + 接口调用成功的回调函数 + + 在客服会话内点击小程序消息卡片进入小程序时,所带的小程序打开路径 @@ -6723,6 +7936,36 @@ 在客服会话内点击小程序消息卡片进入小程序时,所带的小程序打开参数 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 需要基础库: `2.10.3` @@ -6742,6 +7985,21 @@ 用户订阅消息设置,接口参数`withSubscriptions`值为`true`时才会返回。 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 对局回放的播放速率,只能设置以下几个值: 0.3, 0.5, 1, 1.5, 2, 2.5, 3.其中1表示元素播放,小于1表示减速播放,大于1表示加速播放 @@ -6757,11 +8015,21 @@ 对局回放背景音乐的地址 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 分享的对局回放打开后的描述内容 + + + 接口调用失败的回调函数 + + 分享的对局回放打开后跳转小游戏的 path (独立分包路径) @@ -6772,6 +8040,11 @@ 分享的对局回放打开后跳转小游戏的 query + + + 接口调用成功的回调函数 + + 对局回放的剪辑区间,是一个二维数组,单位 ms(毫秒)。[[1000, 3000], [4000, 5000]] 表示剪辑已录制对局回放的 1-3 秒和 4-5 秒最终合成为一个 3 秒的对局回放。对局回放剪辑后的总时长最多 60 秒,即 1 分钟 @@ -6792,11 +8065,21 @@ 需要预览的图片链接列表。[2.2.3](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html) 起支持云文件ID。 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 当前显示图片的链接 + + + 接口调用失败的回调函数 + + 需要基础库: `2.13.0` @@ -6809,16 +8092,31 @@ 是否显示长按菜单。 + + + 接口调用成功的回调函数 + + 需要预览的资源列表 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 当前显示的资源序号 + + + 接口调用失败的回调函数 + + 需要基础库: `2.13.0` @@ -6831,6 +8129,11 @@ 是否显示长按菜单。 + + + 接口调用成功的回调函数 + + 图片或视频的地址 @@ -6864,21 +8167,71 @@ 蓝牙特征对应服务的 UUID + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 本地缓存中指定的 key + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 要删除掉 key 列表 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 场景ID,在「小程序管理后台」获取 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 此场景的耗时,单位 ms @@ -6889,11 +8242,21 @@ 自定义维度数据,key在「小程序管理后台」获取。只支持能够通过JSON.stringify序列化的对象,且序列化后长度不超过1024个字符 + + + 接口调用失败的回调函数 + + 自定义指标数据,key在「小程序管理后台」获取。只支持能够通过JSON.stringify序列化的对象,且序列化后长度不超过1024个字符 + + + 接口调用成功的回调函数 + + 错误信息 @@ -7019,6 +8382,21 @@ 分区 ID + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 错误信息 @@ -7098,6 +8476,11 @@ 购买数量。mode=game 时必填。购买数量。详见 [buyQuantity 限制说明](#buyquantity-限制说明)。 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 环境配置 @@ -7106,6 +8489,11 @@ - 1: 米大师沙箱环境; + + + 接口调用失败的回调函数 + + 申请接入时的平台,platform 与应用id有关。 @@ -7113,6 +8501,11 @@ - 'android': android; + + + 接口调用成功的回调函数 + + 分区 ID @@ -7219,6 +8612,21 @@ 需要订阅的消息模板的id的集合,一次调用最多可订阅3条消息(注意:iOS客户端7.0.6版本、Android客户端7.0.7版本之后的一次性订阅/长期订阅才支持多个模板消息,iOS客户端7.0.5版本、Android客户端7.0.6版本之前的一次订阅只支持一个模板消息)消息模板id在[微信公众平台(mp.weixin.qq.com)-功能-订阅消息]中配置。每个tmplId对应的模板标题需要不相同,否则会被过滤。 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 接口调用失败错误码 @@ -7242,6 +8650,21 @@ 系统订阅消息类型列表,一次调用最多可订阅3种类型的消息,目前支持:"SYS_MSG_TYPE_INTERACTIVE"(好友互动提醒)、"SYS_MSG_TYPE_RANK"(排行榜超越提醒)、"SYS_MSG_TYPE_WHATS_NEW"(游戏更新提醒) + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + [MSG_TYPE]是动态的键,即系统订阅消息类型,值为'accept'、'reject'、'ban','accept'表示用户同意订阅该类型对应的模板消息,'reject'表示用户拒绝订阅该类型对应的模板消息,'ban'表示已被后台封禁。例如 { errMsg: "requestSubscribeSystemMessage:ok", SYS_MSG_TYPE_INTERACTIVE: "accept" } 表示用户同意订阅'SYS_MSG_TYPE_INTERACTIVE'这条消息 @@ -7250,21 +8673,91 @@ 接口调用成功时errMsg值为'requestSubscribeSystemMessage:ok' + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 打开的页面路径,path 中 ? 后面的部分会成为 query + + + 接口调用成功的回调函数 + + 待保存文件路径 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 图片文件路径,可以是临时文件路径或永久文件路径 (本地路径) ,不支持网络路径 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 需要基础库: `1.2.0` @@ -7283,6 +8776,11 @@ - 'pdf417': PDF417 条码; + + + 接口调用成功的回调函数 + + 所扫码的字符集 @@ -7338,6 +8836,21 @@ 最大传输单元。设置范围为 (22,512) 区间内,单位 bytes + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 最终协商的 MTU 值。如果协商失败则无此参数。安卓客户端 8.0.9 开始支持。 @@ -7353,11 +8866,41 @@ 自定义的登录态 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 剪贴板的内容 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 表示切换为横屏还是竖屏 @@ -7366,11 +8909,51 @@ - 'portrait': 竖屏; + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 是否打开调试 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 是否与其他音频混播,设置为 true 之后,不会终止其他应用或微信内的音乐 @@ -7386,11 +8969,31 @@ true 代表用扬声器播放,false 代表听筒播放,默认值为 true。 + + + 接口调用成功的回调函数 + + 是否保持屏幕常亮 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 样式风格 @@ -7399,11 +9002,41 @@ - 'dark': 深色; + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 屏幕亮度值,范围 0 ~ 1,0 最暗,1 最亮。在安卓端支持传入特殊值 -1,表示屏幕亮度跟随系统变化 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 样式风格 @@ -7412,11 +9045,41 @@ - 'black': 浅色; + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 要修改的 KV 数据列表 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 数据的 key @@ -7427,6 +9090,21 @@ 数据的 value + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 截屏/录屏时的表现,仅支持 none / hidden,传入 hidden 则表示在截屏/录屏时隐藏屏幕 @@ -7472,11 +9150,26 @@ 警示文案 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 按钮的文字颜色 + + + 接口调用成功的回调函数 + + 用户点击的按钮序号,从上到下的顺序,从0开始 @@ -7513,16 +9206,46 @@ 是否为多行输入 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 提示的内容 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 是否显示透明蒙层,防止触摸穿透 + + + 接口调用成功的回调函数 + + 取消按钮的文字颜色,必须是 16 进制格式的颜色字符串 @@ -7533,6 +9256,11 @@ 取消按钮的文字,最多 4 个字符 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 确认按钮的文字颜色,必须是 16 进制格式的颜色字符串 @@ -7554,6 +9282,11 @@ 是否显示输入框 + + + 接口调用失败的回调函数 + + 需要基础库: `2.17.1` @@ -7565,6 +9298,11 @@ 是否显示取消按钮 + + + 接口调用成功的回调函数 + + 提示的标题 @@ -7591,24 +9329,60 @@ 要分享的图片地址,必须为本地路径或临时路径 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 需要基础库: `3.2.0` 从消息小程序入口打开小程序的路径,如果当前页面允许分享给朋友,则默认为当前页面路径,否则默认为小程序首页 + + + 接口调用失败的回调函数 + + 需要基础库: `3.2.0` 分享的图片消息是否要带小程序入口 (仅部分小程序类目可用) + + + 需要基础库: `3.2.0` + 分享样式,小程序可选 v2 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 需要基础库: `2.11.3` 本接口为 Beta 版本,暂只在 Android 平台支持。需要显示的转发按钮名称列表,默认['shareAppMessage']。按钮名称合法值包含 "shareAppMessage"、"shareTimeline" 两种 + + + 接口调用成功的回调函数 + + 是否使用带 shareTicket 的转发[详情](#) @@ -7619,11 +9393,21 @@ 提示的内容 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + 提示的延迟时间 + + + 接口调用失败的回调函数 + + 图标 @@ -7645,6 +9429,21 @@ 是否显示透明蒙层,防止触摸穿透 + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 需要基础库: `2.1.0` @@ -7655,21 +9454,51 @@ - 'normal': 普通的回调频率,在 200ms/次 左右; + + + 接口调用成功的回调函数 + + Beacon 设备广播的 UUID 列表 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 是否校验蓝牙开关,仅在 iOS 下有效。iOS 11 起,控制面板里关掉蓝牙,还是能继续使用 Beacon 服务。 + + + 接口调用成功的回调函数 + + 是否允许重复上报同一设备。如果允许重复上报,则 [wx.onBlueToothDeviceFound](#) 方法会多次上报同一设备,但是 RSSI 值会有不同。 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 上报设备的间隔,单位 ms。0 表示找到新设备立即上报,其他数值根据传入的间隔上报。 @@ -7689,6 +9518,36 @@ 要搜索的蓝牙设备主服务的 UUID 列表(支持 16/32/128 位 UUID)。某些蓝牙设备会广播自己的主 service 的 UUID。如果设置此参数,则只搜索广播包有对应 UUID 的主服务的蓝牙设备。建议通过该参数过滤掉周边不需要处理的其他蓝牙设备。 + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + 监听设备方向的变化回调函数的执行频率 @@ -7698,21 +9557,135 @@ - 'normal': 普通的回调频率,在 200ms/次 左右; + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 键盘输入框的当前值 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 需要基础库: `2.4.0` 动态消息的 activityId。通过 [updatableMessage.createActivityId](https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/updatable-message/updatableMessage.createActivityId.html) 接口获取 - + - 需要基础库: `3.7.8` - 指定成员的方式 + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 @@ -7727,9 +9700,9 @@ 是否是动态消息,详见[动态消息](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/share/updatable-message.html) - + - 参与用户此聊天室下的 group_openid 列表 + 接口调用成功的回调函数 @@ -7744,12 +9717,6 @@ 群待办消息的id,通过toDoActivityId可以把多个群待办消息聚合为同一个。通过 [updatableMessage.createActivityId](https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/updatable-message/updatableMessage.createActivityId.html) 接口获取。详见[群待办消息](#) - - - 需要基础库: `3.7.8` - 聊天工具模式特殊动态消息 - - 是否使用带 shareTicket 的转发[详情](#) @@ -7780,12 +9747,72 @@ 静音设置 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 需要基础库: `2.13.0` 震动强度类型,有效值为:heavy、medium、light + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 错误信息 @@ -7813,6 +9840,21 @@ 蓝牙设备特征对应的二进制值 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 蓝牙特征值的写模式设置,有两种模式,iOS 优先 write,安卓优先 writeNoResponse 。(基础库 2.22.0 开始支持) @@ -7826,6 +9868,36 @@ 自定义query + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 错误信息 @@ -7856,11 +9928,41 @@ 是否正在直播 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 最近几场直播的 feedId 列表 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 包括敏感数据在内的完整转发信息的加密数据,详细见加密数据解密算法 https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/signature.html @@ -7891,16 +9993,76 @@ 要查询的直播的id + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 支持填写最多4个openid,该用户的直播间将在直播专区置顶显示;可不填 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 用于打开指定游戏内容页面的开放链接 + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + code @@ -7916,6 +10078,21 @@ 要打开的业务类型,目前仅支持 'servicecommentpage' + + + 调用成功、失败都会执行 + + + + + 评价失败的回调 + + + + + 评价成功的回调 + + 帧数据 @@ -7947,41 +10124,6 @@ 要发送的消息 - - - [PageManager.destroy()](https://developers.weixin.qq.com/minigame/dev/api/open-api/openlink/PageManager.destroy.html) - 需要基础库: `3.6.7` - 销毁开放页面实例。 - - - - - [PageManager.off(string eventName, function callback)](https://developers.weixin.qq.com/minigame/dev/api/open-api/openlink/PageManager.off.html) - 需要基础库: `3.6.7` - 取消监听来自活动、功能向开发者产生的某些事件。 - - - - - [PageManager.on(string eventName, function callback)](https://developers.weixin.qq.com/minigame/dev/api/open-api/openlink/PageManager.on.html) - 需要基础库: `3.6.7` - 监听来自活动、功能向开发者产生的某些事件。 - - - - - [Promise PageManager.load(Object object)](https://developers.weixin.qq.com/minigame/dev/api/open-api/openlink/PageManager.load.html) - 需要基础库: `3.6.7` - 提供OPENLINK加载活动、功能信息。 - - - - - [Promise PageManager.show(Object object)](https://developers.weixin.qq.com/minigame/dev/api/open-api/openlink/PageManager.show.html) - 需要基础库: `3.6.7` - 显示已经成功加载信息的开放页面活动、功能。如果调用前未执行 `.load({ ... })` 将自动调用1次并返回加载信息结果。 - - [RealtimeLogManager.addFilterMsg(string msg)](https://developers.weixin.qq.com/minigame/dev/api/base/debug/RealtimeLogManager.addFilterMsg.html) diff --git a/Runtime/Plugins/wx-runtime.xml.meta b/Runtime/Plugins/wx-runtime.xml.meta index 269db31e7..f2e2ecbe2 100644 --- a/Runtime/Plugins/wx-runtime.xml.meta +++ b/Runtime/Plugins/wx-runtime.xml.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 00bce541fac34af9181e2dc507ef6680 +guid: 06afea380d802ca52d01def6f20bad4d DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/Plugins/wx_perf_2021.a b/Runtime/Plugins/wx_perf_2021.a index f54f35d8b..2748bc3a3 100644 Binary files a/Runtime/Plugins/wx_perf_2021.a and b/Runtime/Plugins/wx_perf_2021.a differ diff --git a/Runtime/Plugins/wx_perf_2022.a b/Runtime/Plugins/wx_perf_2022.a index da0f2ff3f..e0a76f1a3 100644 Binary files a/Runtime/Plugins/wx_perf_2022.a and b/Runtime/Plugins/wx_perf_2022.a differ diff --git a/Runtime/WX.cs b/Runtime/WX.cs index 9261cb09f..9271d69ae 100644 --- a/Runtime/WX.cs +++ b/Runtime/WX.cs @@ -648,7 +648,6 @@ namespace WeChatWASM /// ## 注意事项 /// - 基础库 v2.10.4 开始支持获取群工具小程序启动信息 /// - 基础库 v2.17.3 开始支持获取群聊小程序消息卡片、群待办小程序启动信息 - /// - 基础库 v3.7.8 支持获取单聊群启动信息,获取的群(含单聊)唯一标识,可用于[聊天工具模式](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.openChatTool.html)。 /// **示例代码** /// ```js /// wx.getGroupEnterInfo({ @@ -668,10 +667,7 @@ namespace WeChatWASM /// 获取得到的开放数据为以下 json 结构(其中 opengid 为当前群的唯一标识): /// ```json /// { - /// "opengid": "OPENGID", // 多聊群下返回的群唯一标识 - /// "open_single_roomid": "", // 单聊群下返回的群唯一标识 - /// "group_openid": "", // 用户在当前群的唯一标识 - /// "chat_type": 3, // 聊天室类型 + /// "opengid": "OPENGID" /// } /// ``` /// **Tips** @@ -1404,7 +1400,7 @@ namespace WeChatWASM /// /// [wx.openCustomerServiceConversation(Object object)](https://developers.weixin.qq.com/minigame/dev/api/open-api/customer-message/wx.openCustomerServiceConversation.html) /// 需要基础库: `2.0.3` - /// 进入客服会话。要求在用户发生过至少一次 touch 事件后才能调用。后台接入方式与小程序一致,详见 [客服消息接入](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/customer-message/customer-message.html) + /// 进入客服会话。要求在用户发生过至少一次 touch 事件后才能调用。后台接入方式与小程序一致,详见 [客服消息接入](#) /// **注意事项** /// - 在客服会话内点击小程序消息卡片进入小程序时,不能通过 wx.onShow 或 wx.getEnterOptionsSync 等接口获取启动路径和参数,而是应该通过 wx.openCustomerServiceConversation 接口的 success 回调获取启动路径和参数 /// @@ -2154,6 +2150,9 @@ namespace WeChatWASM /// [wx.showShareImageMenu(Object object)](https://developers.weixin.qq.com/minigame/dev/api/share/wx.showShareImageMenu.html) /// 需要基础库: `2.14.3` /// 打开分享图片弹窗,可以将图片发送给朋友、收藏或下载 + /// **Bug & Tip** + /// 1. `tip`: `needShowEntrance`分享的图片消息是否要带小程序入口,支持申明类目:商家自营、电商平台、餐饮服务(餐饮服务场所/餐饮服务管理企业、点餐平台、外卖平台)、旅游服务(住宿服务、景区服务、OTA、旅游管理单位)、生活服务(家政服务、丽人服务、宠物(非医院类)、婚庆服务、洗浴保健、休闲娱乐、百货/超市/便利店、开锁服务、营业性演出票务、其他宠物健康服务、洗浴保健平台、共享服务、跑腿、寄存、求职/招聘) + /// 2. `tip`: `needShowEntrance`小游戏所有类目都支持 /// public static void ShowShareImageMenu(ShowShareImageMenuOption callback) { diff --git a/Runtime/WXBase.cs b/Runtime/WXBase.cs index 31be7b595..eaefbe801 100644 --- a/Runtime/WXBase.cs +++ b/Runtime/WXBase.cs @@ -1117,42 +1117,6 @@ namespace WeChatWASM { WXSDKManagerHandler.Instance.ReserveChannelsLive(option); } -#region 试玩特有接口 - /// - /// 通知试玩结束 - /// - /// - public static void NotifyMiniProgramPlayableStatus(NotifyMiniProgramPlayableStatusOption option) - { - WXSDKManagerHandler.Instance.NotifyMiniProgramPlayableStatus(option); - } -#endregion - - /// - /// [[PageManager](https://developers.weixin.qq.com/minigame/dev/api/open-api/openlink/PageManager.html) wx.createPageManager()](https://developers.weixin.qq.com/minigame/dev/api/open-api/openlink/wx.createPageManager.html) - /// 需要基础库: `3.6.7` - /// 小游戏开放页面管理器,用于启动微信内置的各种小游戏活动、功能页面。具体OPENLINK值由不同的能力渠道获得。 - /// **示例代码** - /// ```js - /// const pageManager = wx.createPageManager(); - /// pageManager.load({ - /// openlink: 'xxxxxxx-xxxxxx', // 由不同渠道获得的OPENLINK值 - /// }).then((res) => { - /// // 加载成功,res 可能携带不同活动、功能返回的特殊回包信息(具体请参阅渠道说明) - /// console.log(res); - /// // 加载成功后按需显示 - /// pageManager.show(); - /// }).catch((err) => { - /// // 加载失败,请查阅 err 给出的错误信息 - /// console.error(err); - /// }) - /// ``` - /// - /// - public static WXPageManager CreatePageManager() - { - return WXSDKManagerHandler.Instance.CreatePageManager(); - } } } #endif diff --git a/Runtime/WXSDKPerf/.DS_Store.meta b/Runtime/WXSDKPerf/.DS_Store.meta new file mode 100644 index 000000000..b9e957752 --- /dev/null +++ b/Runtime/WXSDKPerf/.DS_Store.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9aee3e3947e509195f35701c0d1ff2b4 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/WXSDKPerf/WXPerfEngine.cs b/Runtime/WXSDKPerf/WXPerfEngine.cs index 19a1f7cf9..88cdd1586 100644 --- a/Runtime/WXSDKPerf/WXPerfEngine.cs +++ b/Runtime/WXSDKPerf/WXPerfEngine.cs @@ -8,10 +8,6 @@ using UnityEngine; using UnityEngine.Scripting; using System.IO; -using Unity.Profiling; -using UnityEngine.Profiling; -using Debug = UnityEngine.Debug; - #if PLATFORM_WEIXINMINIGAME || PLATFORM_WEBGL || UNITY_EDITOR @@ -24,17 +20,17 @@ namespace WXSDKPerf public class WXPerfEngine { #if !UNITY_EDITOR - static WXPerfEngine_Implementation m_PerfEngineImplementation = null; + static WXPerfEngine_Implementation m_PerfEngineImplementation = null; #endif [RuntimeInitializeOnLoadMethod] public static void StartWXPerfEngine() { #if UNITY_EDITOR - return; + return; #else m_PerfEngineImplementation = new WXPerfEngine_Implementation(); - m_PerfEngineImplementation.StartPerfEngine(); + m_PerfEngineImplementation.StartPerfEngine(); #endif } @@ -49,7 +45,7 @@ namespace WXSDKPerf public static void Annotation(string InAnnotationString) { #if UNITY_EDITOR - return; + return; #else // Don't record annotation if we are not recording. if (!IsRecording()) @@ -72,7 +68,7 @@ namespace WXSDKPerf #endif } - + /// /// 检查是否正在录制性能数据 /// @@ -93,14 +89,14 @@ namespace WXSDKPerf #else DateTime timestamp = DateTime.Now; var dateString = timestamp.ToLocalTime().ToString("yyyy-MM-dd_HH-mm-ss", System.Globalization.CultureInfo.InvariantCulture); - var snapshotFileName = $"{dateString}.snap"; + var snapshotFileName = $"{dateString}.snap"; #if UNITY_2018_3_OR_NEWER && !UNITY_2022_2_OR_NEWER - UnityEngine.Profiling.Memory.Experimental.MemoryProfiler.TakeSnapshot(Path.Combine(Application.persistentDataPath, snapshotFileName), + UnityEngine.Profiling.Memory.Experimental.MemoryProfiler.TakeSnapshot(Path.Combine(Application.persistentDataPath, snapshotFileName), WXPerfEngine_Implementation.CaptureSnapshotCallback, (UnityEngine.Profiling.Memory.Experimental.CaptureFlags)31); - + #elif UNITY_2022_2_OR_NEWER - Unity.Profiling.Memory.MemoryProfiler.TakeSnapshot(Path.Combine(Application.persistentDataPath, snapshotFileName), + Unity.Profiling.Memory.MemoryProfiler.TakeSnapshot(Path.Combine(Application.persistentDataPath, snapshotFileName), WXPerfEngine_Implementation.CaptureSnapshotCallback, (Unity.Profiling.Memory.CaptureFlags)31); #endif #endif @@ -113,7 +109,7 @@ namespace WXSDKPerf public static void SetLuaState(IntPtr L) { #if UNITY_EDITOR - return; + return; #else if (m_PerfEngineImplementation == null) { @@ -124,7 +120,7 @@ namespace WXSDKPerf m_PerfEngineImplementation.SetLuaState(L); #endif } - + /// /// 声明自定义性能指标 /// @@ -134,7 +130,7 @@ namespace WXSDKPerf public static void DeclareCustomStatInfo(string inStatName, string inStatCategory, int inStatInterpType = 1) { #if UNITY_EDITOR - return; + return; #else if (m_PerfEngineImplementation == null) { @@ -155,7 +151,7 @@ namespace WXSDKPerf public static void SetCustomStatValue(string inStatName, float inValue) { #if UNITY_EDITOR - return; + return; #else if (m_PerfEngineImplementation == null) { @@ -175,7 +171,7 @@ namespace WXSDKPerf public static void AddCustomStatInfoBy(string inStatName, float inValue) { #if UNITY_EDITOR - return; + return; #else if (m_PerfEngineImplementation == null) { @@ -183,9 +179,9 @@ namespace WXSDKPerf return; } - m_PerfEngineImplementation.AddCustomStatInfoBy(inStatName, inValue); + m_PerfEngineImplementation.AddCustomStatInfoBy(inStatName, inValue); #endif - + } @@ -199,11 +195,11 @@ namespace WXSDKPerf /// 是否启用资源捕获 /// 是否启用Lua内存监控 /// 是否启用Lua函数内存跟踪 - public static void StartRecordManually(bool inEnableStackTrace, bool inEnableStatInfo, bool inFrequentScreenShot, bool inEnablebRenderInst, + public static void StartRecordManually(bool inEnableStackTrace, bool inEnableStatInfo, bool inFrequentScreenShot, bool inEnablebRenderInst, bool inEnableCaptureResource, bool inEnableLuaMemoryMonitor, bool inEnableLuaFunctionMemoryTracking) { #if UNITY_EDITOR - return; + return; #else if (m_PerfEngineImplementation == null) { @@ -211,7 +207,7 @@ namespace WXSDKPerf return; } - m_PerfEngineImplementation.StartRecordManually(inEnableStackTrace, inEnableStatInfo, inFrequentScreenShot, inEnablebRenderInst, + m_PerfEngineImplementation.StartRecordManually(inEnableStackTrace, inEnableStatInfo, inFrequentScreenShot, inEnablebRenderInst, inEnableCaptureResource, inEnableLuaMemoryMonitor, inEnableLuaFunctionMemoryTracking); #endif } @@ -222,7 +218,7 @@ namespace WXSDKPerf public static void StopRecordManually() { #if UNITY_EDITOR - return; + return; #else if (m_PerfEngineImplementation == null) { diff --git a/Runtime/playable-default/plugins.meta b/Runtime/playable-default/plugins.meta index 81162e38e..5985fa68b 100644 --- a/Runtime/playable-default/plugins.meta +++ b/Runtime/playable-default/plugins.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ac4244e6a18805d144af9149f834e0a1 +guid: 85fc06506867e10192a18187f399a026 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/check-version.js b/Runtime/wechat-default/check-version.js index 8594e79f6..1f65ece21 100644 --- a/Runtime/wechat-default/check-version.js +++ b/Runtime/wechat-default/check-version.js @@ -65,8 +65,8 @@ const isMobileBrotliInvalid = isMobile && !compareVersion(SDKVersion, '2.21.1'); const isBrotliInvalid = $COMPRESS_DATA_PACKAGE && (isPcBrotliInvalid || isMobileBrotliInvalid); // iOS系统版本>=17.5时,小游戏退后台会导致异常 export const isIOS175 = compareVersion(systemVersion, '17.5') && isH5Renderer; -// 是否支持开放数据域渲染模式,使用ScreenCanvas模式可以优化ToTempFilePath的使用,PC 上 ScreenCanvas 模式事件处理有问题,PC 先禁止这个模式 -export const isSupportSharedCanvasMode = compareVersion(SDKVersion, '3.6.6') && !isPc; +// 是否支持开放数据域渲染模式,使用ScreenCanvas模式可以优化ToTempFilePath的使用 +export const isSupportSharedCanvasMode = compareVersion(SDKVersion, '3.6.6'); // 是否能以iOS高性能模式运行 // 请勿修改GameGlobal.canUseH5Renderer赋值!!! GameGlobal.canUseH5Renderer = isH5Renderer && isH5LibVersionValid; diff --git a/Runtime/wechat-default/check-version.js.meta b/Runtime/wechat-default/check-version.js.meta index 2ef408450..6510af4d3 100644 --- a/Runtime/wechat-default/check-version.js.meta +++ b/Runtime/wechat-default/check-version.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: b359eabcdef1919195de839fb78762b2 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: a08797d6096241e488ad4b88a34e39ab +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/data-package/game.js.meta b/Runtime/wechat-default/data-package/game.js.meta index 9d0c62bd5..19e9c3c0d 100644 --- a/Runtime/wechat-default/data-package/game.js.meta +++ b/Runtime/wechat-default/data-package/game.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: d1cea326b818f8026ffe01ca8bbd6c7a - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: fd82b33ac8d4c0e7b9985b3f142656f9 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/events.js.meta b/Runtime/wechat-default/events.js.meta index c53c862a7..93b694e71 100644 --- a/Runtime/wechat-default/events.js.meta +++ b/Runtime/wechat-default/events.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 82e623a803146806f2646ef54be62f88 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: b06eb165a6812792b9684b22554894c8 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/game.js b/Runtime/wechat-default/game.js index 2d09dae72..79956cd58 100644 --- a/Runtime/wechat-default/game.js +++ b/Runtime/wechat-default/game.js @@ -27,7 +27,11 @@ const managerConfig = { '$PRELOAD_LIST', ], contextConfig: { - contextType: $WEBGL_VERSION, // 1: webgl1 2: webgl2 + contextType: $WEBGL_VERSION, + contextExt: { + enableGLX: $ENABLE_GLX, + enableMetal: $ENABLE_METAL, + } }, PROFILER_UPLOAD_URL: '', }; diff --git a/Runtime/wechat-default/game.js.meta b/Runtime/wechat-default/game.js.meta index e327f12a6..8caee9342 100644 --- a/Runtime/wechat-default/game.js.meta +++ b/Runtime/wechat-default/game.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: dfb3621b99c16fe5918bd0f61cabef6d - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: e1b113b16802035c55968b50f6c148a5 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/game.json b/Runtime/wechat-default/game.json index e11fd7b6b..5703b5bae 100644 --- a/Runtime/wechat-default/game.json +++ b/Runtime/wechat-default/game.json @@ -23,7 +23,7 @@ ], "plugins": { "UnityPlugin": { - "version": "1.2.79", + "version": "1.2.72", "provider": "wxe5a48f1ed5f544b7", "contexts": [ { @@ -32,7 +32,7 @@ ] }, "Layout": { - "version": "1.0.15", + "version": "1.0.7", "provider": "wx7a727ff7d940bb3f", "contexts": [ { @@ -51,4 +51,4 @@ } }, "workers": "workers" -} \ No newline at end of file +} diff --git a/Runtime/wechat-default/game.json.meta b/Runtime/wechat-default/game.json.meta index 9115dc432..ecb590ed4 100644 --- a/Runtime/wechat-default/game.json.meta +++ b/Runtime/wechat-default/game.json.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 43a58900cd1f2cceeebe71cd0da6e9ea - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 409a31dbd92db503623f9b227889d8d9 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/images/background.jpg.meta b/Runtime/wechat-default/images/background.jpg.meta index 621d8416b..4752c9350 100644 --- a/Runtime/wechat-default/images/background.jpg.meta +++ b/Runtime/wechat-default/images/background.jpg.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 4fbb60bb57bfbc6477067e849d4c899a - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: ef5cd4e768c6bfb4e0df1d6443f93274 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/images/unity_logo.png.meta b/Runtime/wechat-default/images/unity_logo.png.meta index 92b9b047d..04280958b 100644 --- a/Runtime/wechat-default/images/unity_logo.png.meta +++ b/Runtime/wechat-default/images/unity_logo.png.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 62d3610273924692d8a468a7612ca4ba - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: f93d271982c7462215f1d119235c7aff +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/data/index.js.meta b/Runtime/wechat-default/open-data/data/index.js.meta index aefec334d..85a8e04b0 100644 --- a/Runtime/wechat-default/open-data/data/index.js.meta +++ b/Runtime/wechat-default/open-data/data/index.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 83a12c74827ac659f16b70e632b0a36b - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 03e3a319f0d5c48d4cb8216af22be61a +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/data/utils.js.meta b/Runtime/wechat-default/open-data/data/utils.js.meta index 77b4aaba8..59e4415fd 100644 --- a/Runtime/wechat-default/open-data/data/utils.js.meta +++ b/Runtime/wechat-default/open-data/data/utils.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: d16ea1b19da3cbb0776441ccf58afbf5 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 8144e84264dbf191c32b234e31dc14ca +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/index.js b/Runtime/wechat-default/open-data/index.js index 82fb2cd6c..4aef76b65 100644 --- a/Runtime/wechat-default/open-data/index.js +++ b/Runtime/wechat-default/open-data/index.js @@ -56,6 +56,7 @@ function LayoutWithTplAndStyle(xml, style) { Layout.clear(); Layout.init(xml, style); Layout.layout(sharedContext); + console.log(Layout); } // 仅仅渲染一些提示,比如数据加载中、当前无授权等 function renderTips(tips = '') { diff --git a/Runtime/wechat-default/open-data/index.js.meta b/Runtime/wechat-default/open-data/index.js.meta index aaaca2957..81ba81490 100644 --- a/Runtime/wechat-default/open-data/index.js.meta +++ b/Runtime/wechat-default/open-data/index.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: da79e742fd6f9ced13d2208f2588ed39 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 3cf8477b3c854e1a953e60af6a169aad +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/loading.js.meta b/Runtime/wechat-default/open-data/loading.js.meta index 95fc44fcd..905c9c953 100644 --- a/Runtime/wechat-default/open-data/loading.js.meta +++ b/Runtime/wechat-default/open-data/loading.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 949a3f0616e67d1ce1337ed2c59fa822 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: ca07ac15ee7ea8d9a20512bbe62ea6fc +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/render/image/avatar.png.meta b/Runtime/wechat-default/open-data/render/image/avatar.png.meta index 763a23843..f5ff0124f 100644 --- a/Runtime/wechat-default/open-data/render/image/avatar.png.meta +++ b/Runtime/wechat-default/open-data/render/image/avatar.png.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: ee533953826d9d9c4cb0291691e1b608 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 91a8c69182fc9bf4b2faba4a483fe5fc +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/render/image/button1.png.meta b/Runtime/wechat-default/open-data/render/image/button1.png.meta index 7f6f92ba2..f40328c8b 100644 --- a/Runtime/wechat-default/open-data/render/image/button1.png.meta +++ b/Runtime/wechat-default/open-data/render/image/button1.png.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 46a723a67bd4b6ee5333584557212874 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 9c259dd50d3291eb862412bb820caa29 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/render/image/button2.png.meta b/Runtime/wechat-default/open-data/render/image/button2.png.meta index e2e53b46a..4cc6dfe9f 100644 --- a/Runtime/wechat-default/open-data/render/image/button2.png.meta +++ b/Runtime/wechat-default/open-data/render/image/button2.png.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: e5beb47a7a3e97157d24f21aae34b1a0 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 3424d186192f69a2e9f29a5508b3d809 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/render/image/button3.png.meta b/Runtime/wechat-default/open-data/render/image/button3.png.meta index 78441d917..dfe8d8dc1 100644 --- a/Runtime/wechat-default/open-data/render/image/button3.png.meta +++ b/Runtime/wechat-default/open-data/render/image/button3.png.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: d166c6892cd742fe6ee449e519168f51 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 88da0cdde0bb82e100461400ac9e031b +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/render/image/loading.png.meta b/Runtime/wechat-default/open-data/render/image/loading.png.meta index 1ed447595..7c9dbe7e3 100644 --- a/Runtime/wechat-default/open-data/render/image/loading.png.meta +++ b/Runtime/wechat-default/open-data/render/image/loading.png.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: e3d922faf659fb2f5321801daafb7d28 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 559bdd8a07a91b8a55df2d50db4ed050 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/render/image/nameBg.png.meta b/Runtime/wechat-default/open-data/render/image/nameBg.png.meta index 3ba1cbd98..330bb9352 100644 --- a/Runtime/wechat-default/open-data/render/image/nameBg.png.meta +++ b/Runtime/wechat-default/open-data/render/image/nameBg.png.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 398acef606ef104ab0715b23023520f0 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: bcacd9a212cc2894f580589ad7347625 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/render/image/rankAvatar.png.meta b/Runtime/wechat-default/open-data/render/image/rankAvatar.png.meta index 309aae677..b352ae011 100644 --- a/Runtime/wechat-default/open-data/render/image/rankAvatar.png.meta +++ b/Runtime/wechat-default/open-data/render/image/rankAvatar.png.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: da8ea56c5c1dedd89d1c7d12ee8cd911 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: f1891d35f30e4aa380b1222d9a81293a +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/render/image/rankBg.png.meta b/Runtime/wechat-default/open-data/render/image/rankBg.png.meta index 3ed25d4cf..94a0b0978 100644 --- a/Runtime/wechat-default/open-data/render/image/rankBg.png.meta +++ b/Runtime/wechat-default/open-data/render/image/rankBg.png.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: f10a1f4d932cbdb0fe9bf1a0476bdc4e - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: f842a11e2e2ac626b199fec97f57eac5 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/render/image/shareBg.png.meta b/Runtime/wechat-default/open-data/render/image/shareBg.png.meta index 61a7a5beb..c62e1bf04 100644 --- a/Runtime/wechat-default/open-data/render/image/shareBg.png.meta +++ b/Runtime/wechat-default/open-data/render/image/shareBg.png.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 9beab2d6233f4d41c7d1f698611ad5c9 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 10856ea7ea8c227727a527ae3ea47311 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/render/image/shareBg2.png.meta b/Runtime/wechat-default/open-data/render/image/shareBg2.png.meta index 2ace2f7ee..1629c2e52 100644 --- a/Runtime/wechat-default/open-data/render/image/shareBg2.png.meta +++ b/Runtime/wechat-default/open-data/render/image/shareBg2.png.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: dc2e337596896fcf8ba39fad1dbb01f4 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 3121417645d2f33812d600a8caa1c2b4 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/render/styles/friendRank.js b/Runtime/wechat-default/open-data/render/styles/friendRank.js index 3c54e216d..023c7f523 100644 --- a/Runtime/wechat-default/open-data/render/styles/friendRank.js +++ b/Runtime/wechat-default/open-data/render/styles/friendRank.js @@ -63,10 +63,9 @@ export default function getStyle(data) { width: data.width * 0.35, height: (data.height / 2 / 3) * 0.4, textAlign: 'center', - verticalAlign: 'center', + lineHeight: (data.height / 2 / 3) * 0.4, fontSize: data.width * 0.043, textOverflow: 'ellipsis', - whiteSpace: 'nowrap', color: '#fff', }, rankScoreTip: { diff --git a/Runtime/wechat-default/open-data/render/styles/friendRank.js.meta b/Runtime/wechat-default/open-data/render/styles/friendRank.js.meta index 23d7d352c..33e3952b2 100644 --- a/Runtime/wechat-default/open-data/render/styles/friendRank.js.meta +++ b/Runtime/wechat-default/open-data/render/styles/friendRank.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 6b3dac806ae44ddca7e3a5cac6283268 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: b75eb97f4eb669a3fa0b669ba1e115b2 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/render/styles/tips.js.meta b/Runtime/wechat-default/open-data/render/styles/tips.js.meta index 54a2e7cda..f267a5665 100644 --- a/Runtime/wechat-default/open-data/render/styles/tips.js.meta +++ b/Runtime/wechat-default/open-data/render/styles/tips.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 16d87f2bbc7e0cab87750e250d8fb706 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: d2e00805dd3211a51a686400311de0bd +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/render/tpls/friendRank.js b/Runtime/wechat-default/open-data/render/tpls/friendRank.js index 84cacdbda..34b6a65ba 100644 --- a/Runtime/wechat-default/open-data/render/tpls/friendRank.js +++ b/Runtime/wechat-default/open-data/render/tpls/friendRank.js @@ -1,10 +1,11 @@ /** - * 模板引擎使用教程可见:https://wechat-miniprogram.github.io/minigame-canvas-engine/tutorial/templateengine.html - * xml经过doT.js编译出的模板函数 - * 因为小游戏不支持new Function,模板函数只能外部编译 - * 可直接拷贝本函数到小游戏中使用 - * 原始的模板如下: - * + * 下面的内容分成两部分,第一部分是一个模板,模板的好处是能够有一定的语法 + * 坏处是模板引擎一般都依赖 new Function 或者 eval 能力,小游戏下面是没有的 + * 所以模板的编译需要在外部完成,可以将注释内的模板贴到下面的页面内,点击 "run"就能够得到编译后的模板函数 + * https://wechat-miniprogram.github.io/minigame-canvas-engine/playground.html + * 如果觉得模板引擎使用过于麻烦,也可以手动拼接字符串,本文件对应函数的目标仅仅是为了创建出 xml 节点数 + */ +/* @@ -28,17 +29,22 @@ - - * +*/ +/** + * xml经过doT.js编译出的模板函数 + * 因为小游戏不支持new Function,模板函数只能外部编译 + * 可直接拷贝本函数到小游戏中使用 */ -export default function tplFunc(it) { - var out = ' '; - var arr1 = it.data; +export default function anonymous(it) { + let out = ' '; + const arr1 = it.data; if (arr1) { - var item, index = -1, l1 = arr1.length - 1; + let item; + let index = -1; + const l1 = arr1.length - 1; while (index < l1) { - item = arr1[index += 1]; - out += ' '; + item = arr1[(index += 1)]; + out += ` `; } } out += ' '; diff --git a/Runtime/wechat-default/open-data/render/tpls/friendRank.js.meta b/Runtime/wechat-default/open-data/render/tpls/friendRank.js.meta index e129a41a7..390298349 100644 --- a/Runtime/wechat-default/open-data/render/tpls/friendRank.js.meta +++ b/Runtime/wechat-default/open-data/render/tpls/friendRank.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: e2533bbd0f2233803378a322b319d0e8 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 864c7dad368cb046fc0636398a91281a +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/render/tpls/tips.js.meta b/Runtime/wechat-default/open-data/render/tpls/tips.js.meta index bcf48c68a..8f94f96cf 100644 --- a/Runtime/wechat-default/open-data/render/tpls/tips.js.meta +++ b/Runtime/wechat-default/open-data/render/tpls/tips.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 0240fe214f6ddc3de61e9f07f3811586 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: b65bc8d8dfd5377886495a13ce663504 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/plugin-config.js.meta b/Runtime/wechat-default/plugin-config.js.meta index 0242b322b..d2a4c8041 100644 --- a/Runtime/wechat-default/plugin-config.js.meta +++ b/Runtime/wechat-default/plugin-config.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 1e2e88509f4f353bcfa082724749eb11 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 72cc0585542eb273e2e7b1c0b2583ab0 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/plugins/check-update.js.meta b/Runtime/wechat-default/plugins/check-update.js.meta index 164ea7b24..54c445e79 100644 --- a/Runtime/wechat-default/plugins/check-update.js.meta +++ b/Runtime/wechat-default/plugins/check-update.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: be3cac760ab8bc453d3c027b8c2154cd - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 1e808e9397c2eeafd60f639cbf06dc49 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/plugins/screen-adapter.js.meta b/Runtime/wechat-default/plugins/screen-adapter.js.meta index 182a8286d..d7bb91424 100644 --- a/Runtime/wechat-default/plugins/screen-adapter.js.meta +++ b/Runtime/wechat-default/plugins/screen-adapter.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 60f64091f2848e6137295f416114a714 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: a9be8b5365b555e7cc77aedadb0cf479 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/project.config.json b/Runtime/wechat-default/project.config.json index ef8f27137..dab2f3b3e 100644 --- a/Runtime/wechat-default/project.config.json +++ b/Runtime/wechat-default/project.config.json @@ -33,7 +33,7 @@ "packNpmRelationList": [] }, "compileType": "game", - "libVersion": "latest", + "libVersion": "3.5.1", "appid": "$APP_ID", "projectname": "$PROJECT_NAME", "simulatorType": "wechat", @@ -47,10 +47,6 @@ { "type": "suffix", "value": ".symbols.unityweb" - }, - { - "type": "suffix", - "value": ".symbols.unityweb.br" } ] }, diff --git a/Runtime/wechat-default/project.config.json.meta b/Runtime/wechat-default/project.config.json.meta index 4eff91efa..0fd853584 100644 --- a/Runtime/wechat-default/project.config.json.meta +++ b/Runtime/wechat-default/project.config.json.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: c8a1a9d25ffd216df601a9f5336012b8 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 51e6651cb6a780b02bbccbcf2bdc4436 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/texture-config.js.meta b/Runtime/wechat-default/texture-config.js.meta index dcebcf2a8..5d8af1826 100644 --- a/Runtime/wechat-default/texture-config.js.meta +++ b/Runtime/wechat-default/texture-config.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: e77d47c87b89bb732afa7ada8b872f5e - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: dd51acd16b79b9b62ba6ebb88e9fc17d +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-namespace.js b/Runtime/wechat-default/unity-namespace.js index 85a15e686..30f8347b6 100644 --- a/Runtime/wechat-default/unity-namespace.js +++ b/Runtime/wechat-default/unity-namespace.js @@ -57,8 +57,6 @@ const unityNamespace = { isProfilingBuild: $Is_Profiling_Build, // 预留的堆内存 unityHeapReservedMemory: $UnityHeapReservedMemory, - // 是否向Perfstream上报数据 - sendData2PerfStream: $SEND_DATA_TO_PERF_STREAM, }; // 最佳实践检测配置 unityNamespace.monitorConfig = { diff --git a/Runtime/wechat-default/unity-namespace.js.meta b/Runtime/wechat-default/unity-namespace.js.meta index 43e307605..b4e9af1c7 100644 --- a/Runtime/wechat-default/unity-namespace.js.meta +++ b/Runtime/wechat-default/unity-namespace.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 64c41db52f19c0a8407d5d10b19505ac - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 12c7fcbeb13122d676bec5d4e0e6c889 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/TCPSocket/index.js.meta b/Runtime/wechat-default/unity-sdk/TCPSocket/index.js.meta index 5e8592c95..e4c59f32b 100644 --- a/Runtime/wechat-default/unity-sdk/TCPSocket/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/TCPSocket/index.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 285bde1ec13dc5f6348730177b0d245c - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 9ccaedbf03b71a71634388384f43697a +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/UDPSocket/index.js.meta b/Runtime/wechat-default/unity-sdk/UDPSocket/index.js.meta index ac1f5b33f..65f2ab88c 100644 --- a/Runtime/wechat-default/unity-sdk/UDPSocket/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/UDPSocket/index.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 5e0850d637c82dfbff7816c1dea56bd1 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 4b855e68654393297486e8744d2be3b9 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/ad.js.meta b/Runtime/wechat-default/unity-sdk/ad.js.meta index acd341fde..ec37dd63f 100644 --- a/Runtime/wechat-default/unity-sdk/ad.js.meta +++ b/Runtime/wechat-default/unity-sdk/ad.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 7f50192fc0113f27f329934f80ae4793 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 2070add4ad98920ebe6706f9ffc8c05f +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/audio/common.js.meta b/Runtime/wechat-default/unity-sdk/audio/common.js.meta index f7cc811e6..95d727582 100644 --- a/Runtime/wechat-default/unity-sdk/audio/common.js.meta +++ b/Runtime/wechat-default/unity-sdk/audio/common.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 268c52bb8771248c65d514bc54290b2f - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: d44e94a4169457bae87dccc9ff3f5b28 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/audio/const.js.meta b/Runtime/wechat-default/unity-sdk/audio/const.js.meta index 5b35465a6..d91887285 100644 --- a/Runtime/wechat-default/unity-sdk/audio/const.js.meta +++ b/Runtime/wechat-default/unity-sdk/audio/const.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 46855f8999e1242708e4b9a81a5f0385 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: e3ddecbea32ddb2f2bf104427554ef1d +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/audio/index.js.meta b/Runtime/wechat-default/unity-sdk/audio/index.js.meta index c6b6e3020..4b970c717 100644 --- a/Runtime/wechat-default/unity-sdk/audio/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/audio/index.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 5ff5c97d55325012a959fe4ec0f12c10 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: a8f0f232a070ccf226480a99c0f50b1f +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/audio/inner-audio.js.meta b/Runtime/wechat-default/unity-sdk/audio/inner-audio.js.meta index 48f80d107..0f6ea450e 100644 --- a/Runtime/wechat-default/unity-sdk/audio/inner-audio.js.meta +++ b/Runtime/wechat-default/unity-sdk/audio/inner-audio.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 43ae6900428af4d43b7ae2c7aeb6f12f - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 8427bfcfd0b7b1d01c1df1ad6bd06ca5 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/audio/store.js.meta b/Runtime/wechat-default/unity-sdk/audio/store.js.meta index 7379ca626..5a77b931b 100644 --- a/Runtime/wechat-default/unity-sdk/audio/store.js.meta +++ b/Runtime/wechat-default/unity-sdk/audio/store.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: e3beb55f1cb4133f2af74fef14418fb0 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 0e030c16f58be954e5fc59b11d5bf37c +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/audio/unity-audio.js b/Runtime/wechat-default/unity-sdk/audio/unity-audio.js index 077f0e73c..152279404 100644 --- a/Runtime/wechat-default/unity-sdk/audio/unity-audio.js +++ b/Runtime/wechat-default/unity-sdk/audio/unity-audio.js @@ -1050,9 +1050,6 @@ export default { if (WEBAudio.audioWebSupport === 0 || WEBAudio.audioWebEnabled === 0) { return; } - if (WEBAudio.audioContext && WEBAudio.audioContext.state !== 'suspended') { - return; - } resumeWebAudio(); }, _JS_Sound_Set3D(channelInstance, threeD) { @@ -1268,18 +1265,4 @@ export default { } return WEBAudio.audioContext.sampleRate; }, - _JS_Sound_GetPosition(channelInstance) { - if (WEBAudio.audioWebEnabled == 0) { - return 0; - } - const channel = WEBAudio.audioInstances[channelInstance]; - if (!channel) { - return 0; - } - const { source } = channel; - if (!source) { - return 0; - } - return source.estimatePlaybackPosition ? source.estimatePlaybackPosition() : 0; - }, }; diff --git a/Runtime/wechat-default/unity-sdk/audio/unity-audio.js.meta b/Runtime/wechat-default/unity-sdk/audio/unity-audio.js.meta index acdbb8f7f..8ac06f233 100644 --- a/Runtime/wechat-default/unity-sdk/audio/unity-audio.js.meta +++ b/Runtime/wechat-default/unity-sdk/audio/unity-audio.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 4a136b63ad6ffa12df694fd561a6f937 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 1bf9b60e36c6665ada2647431ac2c7b6 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/audio/utils.js.meta b/Runtime/wechat-default/unity-sdk/audio/utils.js.meta index 3a5da3c5d..cc4ac37e4 100644 --- a/Runtime/wechat-default/unity-sdk/audio/utils.js.meta +++ b/Runtime/wechat-default/unity-sdk/audio/utils.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: ac223f4358ef0f93f539f1d20a72bf94 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 6f92cf0f19de970dbe9c487631f917ba +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/authorize.js.meta b/Runtime/wechat-default/unity-sdk/authorize.js.meta index 524c8bae0..d8ac6d9c5 100644 --- a/Runtime/wechat-default/unity-sdk/authorize.js.meta +++ b/Runtime/wechat-default/unity-sdk/authorize.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: b228afe32c844326c91d68e051c7462f - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 3e179fd529d311ae1edd025fa1014f56 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/bluetooth/index.js.meta b/Runtime/wechat-default/unity-sdk/bluetooth/index.js.meta index dfed5e201..fd698e6ba 100644 --- a/Runtime/wechat-default/unity-sdk/bluetooth/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/bluetooth/index.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: d53043e59342509fad398f015b5c650f - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 8106fc2ad0ca4366f79410ab7d0e476e +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/camera.js.meta b/Runtime/wechat-default/unity-sdk/camera.js.meta index d159709c5..3c66e9ec0 100644 --- a/Runtime/wechat-default/unity-sdk/camera.js.meta +++ b/Runtime/wechat-default/unity-sdk/camera.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 67bbfe86fa63aa3e73b5b774a79dfbbd - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 9a294ba6fe15935b660bc845aa86162d +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/canvas-context.js.meta b/Runtime/wechat-default/unity-sdk/canvas-context.js.meta index 19ddeaad7..1b67c8af8 100644 --- a/Runtime/wechat-default/unity-sdk/canvas-context.js.meta +++ b/Runtime/wechat-default/unity-sdk/canvas-context.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 2d6336c5606b3e31207f27aaca40e7d8 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 2c83c6ab1e2e71bc20c65d252fb9c019 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/canvas.js.meta b/Runtime/wechat-default/unity-sdk/canvas.js.meta index 77edbd348..521b8da12 100644 --- a/Runtime/wechat-default/unity-sdk/canvas.js.meta +++ b/Runtime/wechat-default/unity-sdk/canvas.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 49e417151695b335ee45d4ee00d88b8c - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: bb2d88ad678f8df8052915ad3924e4a8 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/chat.js.meta b/Runtime/wechat-default/unity-sdk/chat.js.meta index cfef32271..593a949b5 100644 --- a/Runtime/wechat-default/unity-sdk/chat.js.meta +++ b/Runtime/wechat-default/unity-sdk/chat.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 54fd529ea288c9f5e6e1b2d9a650cc82 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 2b42045edfabe49782c88ab18cbc6ec3 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/cloud.js.meta b/Runtime/wechat-default/unity-sdk/cloud.js.meta index 392cd10e7..7bc84c90e 100644 --- a/Runtime/wechat-default/unity-sdk/cloud.js.meta +++ b/Runtime/wechat-default/unity-sdk/cloud.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 19220e9aafce528e58347b08d25e9694 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: b2cf66dbedaf2918ff74adfa500ed3a2 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/conf.js.meta b/Runtime/wechat-default/unity-sdk/conf.js.meta index 237094deb..341db39a8 100644 --- a/Runtime/wechat-default/unity-sdk/conf.js.meta +++ b/Runtime/wechat-default/unity-sdk/conf.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 90e409a46ab75878116e90de9044b33d - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 8b651cee7fd76863fc81aa3898eba4db +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/file-info.js.meta b/Runtime/wechat-default/unity-sdk/file-info.js.meta index a54906bcb..44be833ff 100644 --- a/Runtime/wechat-default/unity-sdk/file-info.js.meta +++ b/Runtime/wechat-default/unity-sdk/file-info.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 5e86e1524f8729dc6be0a5913faa56aa - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 3e8eb477f63e82a6cc92962f58d2ff68 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/fix.js.meta b/Runtime/wechat-default/unity-sdk/fix.js.meta index 22c0ffacb..f3bdc711c 100644 --- a/Runtime/wechat-default/unity-sdk/fix.js.meta +++ b/Runtime/wechat-default/unity-sdk/fix.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 3fc571676e9b1e4f43327482ff6a146c - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 6881eb82ae7ff0b47540c7dd11b7f582 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/font/fix-cmap.js.meta b/Runtime/wechat-default/unity-sdk/font/fix-cmap.js.meta index d74951cbc..53d5be42c 100644 --- a/Runtime/wechat-default/unity-sdk/font/fix-cmap.js.meta +++ b/Runtime/wechat-default/unity-sdk/font/fix-cmap.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 8cb80db6db16629919f72813c4108615 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 904a5d5507e5332c7c2141f6bd574c6c +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/font/index.js.meta b/Runtime/wechat-default/unity-sdk/font/index.js.meta index f410f3dd8..8d82f7c4b 100644 --- a/Runtime/wechat-default/unity-sdk/font/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/font/index.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 107f269005e185d33353c3485ff60598 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: f3b3ca7449714f00aba9bde046556b8b +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/font/read-metrics.js.meta b/Runtime/wechat-default/unity-sdk/font/read-metrics.js.meta index 3f4bbbeef..d4fd62124 100644 --- a/Runtime/wechat-default/unity-sdk/font/read-metrics.js.meta +++ b/Runtime/wechat-default/unity-sdk/font/read-metrics.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 95b2dfa20a6854301be7a9c14f919238 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 42231992d913fb0cace2b52f2c4a67ff +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/font/split-sc.js.meta b/Runtime/wechat-default/unity-sdk/font/split-sc.js.meta index fa3a33d14..b8fdce307 100644 --- a/Runtime/wechat-default/unity-sdk/font/split-sc.js.meta +++ b/Runtime/wechat-default/unity-sdk/font/split-sc.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: fc59ea968a5d31cd3bbdc47650061fdc - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 6e374edbd421a70b88d1c49de5a72681 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/font/util.js.meta b/Runtime/wechat-default/unity-sdk/font/util.js.meta index d246ded6d..76b447a51 100644 --- a/Runtime/wechat-default/unity-sdk/font/util.js.meta +++ b/Runtime/wechat-default/unity-sdk/font/util.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: b191274cf498a2d31bff400d109fbc73 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 3283e7857e81098ad081c11e060cd0a6 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/fs.js.meta b/Runtime/wechat-default/unity-sdk/fs.js.meta index 5a1c39e23..c62883f2d 100644 --- a/Runtime/wechat-default/unity-sdk/fs.js.meta +++ b/Runtime/wechat-default/unity-sdk/fs.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 1f27d3739bce0052d26d91f6c598e789 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 9b125a828bae8cfefe54261f13585a15 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/game-club.js.meta b/Runtime/wechat-default/unity-sdk/game-club.js.meta index 506e42213..3b13ac86f 100644 --- a/Runtime/wechat-default/unity-sdk/game-club.js.meta +++ b/Runtime/wechat-default/unity-sdk/game-club.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: a1d0f8f2550312c95d880363974a9bff - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 6a1a93923948ff956b83f5726f6447c0 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/game-recorder.js.meta b/Runtime/wechat-default/unity-sdk/game-recorder.js.meta index 164a6759b..42e3b3626 100644 --- a/Runtime/wechat-default/unity-sdk/game-recorder.js.meta +++ b/Runtime/wechat-default/unity-sdk/game-recorder.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: e4d459179fed20f63f0bfb3af85e335c - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 0e2f3abd0496b648189c5aa5755f7342 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/gyroscope/index.js.meta b/Runtime/wechat-default/unity-sdk/gyroscope/index.js.meta index 881ab63a0..84a1f579a 100644 --- a/Runtime/wechat-default/unity-sdk/gyroscope/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/gyroscope/index.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 8c797330abda21e77d6e3d4e21bfc0b5 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 851646392409ca47f81ca8edf54c1748 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/index.js.meta b/Runtime/wechat-default/unity-sdk/index.js.meta index 633e1774c..1d920d374 100644 --- a/Runtime/wechat-default/unity-sdk/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/index.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 8a9908f655f35dc1b2cc5c7f0d68dc01 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: ae69b6e066b580f2d79d8a5a269321c2 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/logger.js.meta b/Runtime/wechat-default/unity-sdk/logger.js.meta index 06003719f..85ab145b5 100644 --- a/Runtime/wechat-default/unity-sdk/logger.js.meta +++ b/Runtime/wechat-default/unity-sdk/logger.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 2194cd3266fbc2c4e2c02fdbcf614127 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: aaf34939d40087f0509cff558618233f +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/mobileKeyboard/index.js.meta b/Runtime/wechat-default/unity-sdk/mobileKeyboard/index.js.meta index 3ae87572a..ca5adbe1e 100644 --- a/Runtime/wechat-default/unity-sdk/mobileKeyboard/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/mobileKeyboard/index.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 340cdaa58bc2b682476d0ea945c45678 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 50976c84135b3146c3af63298b5a32d2 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/module-helper.js.meta b/Runtime/wechat-default/unity-sdk/module-helper.js.meta index b830520a5..71423ba15 100644 --- a/Runtime/wechat-default/unity-sdk/module-helper.js.meta +++ b/Runtime/wechat-default/unity-sdk/module-helper.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 32813a734424d368f63e45522a70acca - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: af6f29e8281219956f9f5d3ef5254255 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/open-data.js b/Runtime/wechat-default/unity-sdk/open-data.js index f5e16425f..4bc294d7a 100644 --- a/Runtime/wechat-default/unity-sdk/open-data.js +++ b/Runtime/wechat-default/unity-sdk/open-data.js @@ -12,7 +12,6 @@ var SharedCanvasMode; })(SharedCanvasMode || (SharedCanvasMode = {})); let sharedCanvasMode; let timerId; -let textureObject = null; let textureId; function getOpenDataContext(mode) { @@ -21,9 +20,6 @@ function getOpenDataContext(mode) { } if (!isSupportSharedCanvasMode) { - if (mode === 'ScreenCanvas') { - console.warn('[unity-sdk]: 当前环境不支持 ScreenCanvas 模式'); - } sharedCanvasMode = SharedCanvasMode.OffScreenCanvas; } @@ -35,7 +31,6 @@ function getOpenDataContext(mode) { sharedCanvasMode = SharedCanvasMode.OffScreenCanvas; } } - console.log(`[unity-sdk]: 当前开放数据域为 ${sharedCanvasMode} 模式`); // @ts-ignore cachedOpenDataContext = wx.getOpenDataContext({ sharedCanvasMode, @@ -51,34 +46,25 @@ function hookUnityRender() { if (!textureId) { return; } - const { GL } = GameGlobal.manager.gameInstance.Module; + const Module = GameGlobal.manager.gameInstance.Module; + const { GL } = Module; const gl = GL.currentContext.GLctx; - if (!textureObject) { - textureObject = gl.createTexture(); - gl.bindTexture(gl.TEXTURE_2D, textureObject); - if (GameGlobal.unityNamespace.unityColorSpace === 'Linear') { - gl.texImage2D(gl.TEXTURE_2D, 0, gl.SRGB8_ALPHA8, gl.RGBA, gl.UNSIGNED_BYTE, getSharedCanvas()); - } - else { - gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, getSharedCanvas()); - } - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); + const isLinearColorSpace = GameGlobal.unityNamespace.unityColorSpace === 'Linear'; + + if (gl.emscriptenGLX) { + Module.ccall('glxShowOpenData', null, ['number', 'number', 'bool'], [textureId, getSharedCanvas().__uid(), isLinearColorSpace]); } else { - gl.bindTexture(gl.TEXTURE_2D, textureObject); - if (GameGlobal.unityNamespace.unityColorSpace === 'Linear') { + gl.bindTexture(gl.TEXTURE_2D, GL.textures[textureId]); + if (isLinearColorSpace) { gl.texImage2D(gl.TEXTURE_2D, 0, gl.SRGB8_ALPHA8, gl.RGBA, gl.UNSIGNED_BYTE, getSharedCanvas()); } else { gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, getSharedCanvas()); } + timerId = requestAnimationFrame(hookUnityRender); } - GL.textures[textureId] = textureObject; - timerId = requestAnimationFrame(hookUnityRender); } function stopLastRenderLoop() { @@ -98,10 +84,13 @@ function stopHookUnityRender() { sharedCanvas.width = 1; sharedCanvas.height = 1; - const { GL } = GameGlobal.manager.gameInstance.Module; + const Module = GameGlobal.manager.gameInstance.Module; + const { GL } = Module; const gl = GL.currentContext.GLctx; - gl.deleteTexture(textureObject); - textureObject = null; + + if (gl.emscriptenGLX) { + Module.ccall('glxHideOpenData', null, [], []); + } } wx.onShow(() => { if (cachedOpenDataContext) { @@ -125,10 +114,6 @@ export default { console.error('[unity-sdk]: WXShowOpenData要求 width 和 height 参数必须大于0'); } - if (!cachedOpenDataContext) { - console.warn('[unity-sdk]: 请先调用 WXGetOpenDataContext'); - } - const openDataContext = getOpenDataContext(); const sharedCanvas = openDataContext.canvas; sharedCanvas.width = width; @@ -154,10 +139,6 @@ export default { }, WXHideOpenData() { debugLog('WXHideOpenData'); - if (!cachedOpenDataContext) { - console.warn('[unity-sdk]: 请先调用 WXGetOpenDataContext'); - return; - } getOpenDataContext().postMessage({ type: 'WXDestroy', }); diff --git a/Runtime/wechat-default/unity-sdk/open-data.js.meta b/Runtime/wechat-default/unity-sdk/open-data.js.meta index 408888223..db6d1e2ad 100644 --- a/Runtime/wechat-default/unity-sdk/open-data.js.meta +++ b/Runtime/wechat-default/unity-sdk/open-data.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 7aa654f9b38e3a8775b6b95bd920fc09 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: cf13ebf1e7ce35f0d7bf3bae0ad1d6b6 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/recorder.js.meta b/Runtime/wechat-default/unity-sdk/recorder.js.meta index a331283c5..3a5bd306a 100644 --- a/Runtime/wechat-default/unity-sdk/recorder.js.meta +++ b/Runtime/wechat-default/unity-sdk/recorder.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: f3ee18fc329856a00469d5d3d18796e7 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: b854edf5a2b38d73b0fcc623dabf465a +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/resType.js.meta b/Runtime/wechat-default/unity-sdk/resType.js.meta index 9d647cb50..8921edb20 100644 --- a/Runtime/wechat-default/unity-sdk/resType.js.meta +++ b/Runtime/wechat-default/unity-sdk/resType.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 18b902f4b8ffc22907922e7e74c69aa5 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 5c65ec3cade1b762c881e64c777432ce +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/resTypeOther.js b/Runtime/wechat-default/unity-sdk/resTypeOther.js index ead21e383..9ca8b5a42 100644 --- a/Runtime/wechat-default/unity-sdk/resTypeOther.js +++ b/Runtime/wechat-default/unity-sdk/resTypeOther.js @@ -86,12 +86,4 @@ export const ResTypeOther = { status: 'number', errMsg: 'string', }, - LoadOption: { - openlink: 'string', - query: 'object', - }, - ShowOption: { - openlink: 'string', - query: 'object', - }, }; diff --git a/Runtime/wechat-default/unity-sdk/resTypeOther.js.meta b/Runtime/wechat-default/unity-sdk/resTypeOther.js.meta index 9e4f5d4b2..7918404d6 100644 --- a/Runtime/wechat-default/unity-sdk/resTypeOther.js.meta +++ b/Runtime/wechat-default/unity-sdk/resTypeOther.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: a579df0d128040edf8a3146cdb0f5b3f - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 4f889630edd36f2d2c517f36b1eafa6e +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/response.js.meta b/Runtime/wechat-default/unity-sdk/response.js.meta index ecdadc6ad..f04c2af5c 100644 --- a/Runtime/wechat-default/unity-sdk/response.js.meta +++ b/Runtime/wechat-default/unity-sdk/response.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 11e93d2222848763c07b7f4398148e1d - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 055f3e950e7464a5d24d781092e3fb6b +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/sdk.js b/Runtime/wechat-default/unity-sdk/sdk.js index 0c1957ed6..d1230f719 100644 --- a/Runtime/wechat-default/unity-sdk/sdk.js +++ b/Runtime/wechat-default/unity-sdk/sdk.js @@ -23,7 +23,7 @@ function getClassObject(className, id) { // eslint-disable-next-line @typescript-eslint/naming-convention function WX_OneWayNoFunction(functionName, ...params) { - wx[functionName.replace(/^\w/, (a) => a.toLowerCase())](...params); + wx[functionName.replace(/^\w/, a => a.toLowerCase())](...params); } @@ -33,7 +33,7 @@ const onlyReadyResponse = [ ]; // eslint-disable-next-line @typescript-eslint/naming-convention function WX_SyncFunction(functionName, ...params) { - return wx[functionName.replace(/^\w/, (a) => a.toLowerCase())](...params); + return wx[functionName.replace(/^\w/, a => a.toLowerCase())](...params); } // eslint-disable-next-line @typescript-eslint/naming-convention @@ -42,22 +42,13 @@ function WX_ClassOneWayNoFunction(className, functionName, id, ...params) { if (!obj) { return; } - obj[functionName.replace(/^\w/, (a) => a.toLowerCase())](...params); -} -function classFormatAndSend(id, callbackId, callbackName, callbackType, resType, res) { - formatResponse(resType, res); - moduleHelper.send(callbackName, classGetMsg(id, callbackId, callbackType, res)); -} -function classGetMsg(id, callbackId, resType, res) { - return JSON.stringify({ - id, callbackId, type: resType, res: JSON.stringify(res) || '', - }); + obj[functionName.replace(/^\w/, a => a.toLowerCase())](...params); } export default { WX_OneWayFunction(functionName, successType, failType, completeType, conf, callbackId) { - const lowerFunctionName = functionName.replace(/^\w/, (a) => a.toLowerCase()); + const lowerFunctionName = functionName.replace(/^\w/, a => a.toLowerCase()); const config = formatJsonStr(conf); - // specialJS + if (lowerFunctionName === 'login') { if (!config.timeout) { delete config.timeout; @@ -120,7 +111,7 @@ export default { moduleHelper.send(`_${functionName}Callback`, resStr); }; onEventLists[functionName].push(callback); - wx[functionName.replace(/^\w/, (a) => a.toLowerCase())](callback); + wx[functionName.replace(/^\w/, a => a.toLowerCase())](callback); }, WX_OffEventRegister(functionName) { (onEventLists[functionName] || []).forEach((v) => { @@ -234,7 +225,7 @@ export default { }, WX_SyncFunction_t(functionName, returnType) { const res = WX_SyncFunction(functionName); - if (onlyReadyResponse.includes(functionName.replace(/^\w/, (a) => a.toLowerCase()))) { + if (onlyReadyResponse.includes(functionName.replace(/^\w/, a => a.toLowerCase()))) { formatResponse(returnType, JSON.parse(JSON.stringify(res))); return JSON.stringify(res); } @@ -271,10 +262,10 @@ export default { formatResponse(returnType, res); return JSON.stringify(res); }, - WX_ClassConstructor(functionName, returnType, successType, failType, completeType, conf) { + WX_ClassOneWayFunction(functionName, returnType, successType, failType, completeType, conf) { const config = formatJsonStr(conf); const callbackId = uid(); - const obj = wx[functionName.replace(/^\w/, (a) => a.toLowerCase())]({ + const obj = wx[functionName.replace(/^\w/, a => a.toLowerCase())]({ ...config, success(res) { formatResponse(successType, res); @@ -302,7 +293,7 @@ export default { return callbackId; }, WX_ClassFunction(functionName, returnType, option) { - const obj = wx[functionName.replace(/^\w/, (a) => a.toLowerCase())](formatJsonStr(option)); + const obj = wx[functionName.replace(/^\w/, a => a.toLowerCase())](formatJsonStr(option)); const id = uid(); if (!ClassLists[returnType]) { ClassLists[returnType] = {}; @@ -356,10 +347,10 @@ export default { ClassOnEventLists[className + functionName][id + eventName].push(callback); // WXVideoDecoder OnEvent 不规范 特殊处理 if (className === 'WXVideoDecoder') { - obj[functionName.replace(/^\w/, (a) => a.toLowerCase())](eventName, callback); + obj[functionName.replace(/^\w/, a => a.toLowerCase())](eventName, callback); } else { - obj[functionName.replace(/^\w/, (a) => a.toLowerCase())](callback); + obj[functionName.replace(/^\w/, a => a.toLowerCase())](callback); } }, WX_ClassOffEventFunction(className, functionName, id, eventName) { @@ -398,7 +389,7 @@ export default { if (!obj) { return JSON.stringify(formatResponse(returnType)); } - const res = obj[functionName.replace(/^\w/, (a) => a.toLowerCase())](); + const res = obj[functionName.replace(/^\w/, a => a.toLowerCase())](); return JSON.stringify(formatResponse(returnType, res, id)); }, WX_ClassOneWayNoFunction_vt(className, functionName, id, param1) { @@ -408,41 +399,4 @@ export default { WX_ClassOneWayNoFunction_vn(className, functionName, id, param1) { WX_ClassOneWayNoFunction(className, functionName, id, param1); }, - WX_ClassOneWayFunction(className, functionName, id, successType, failType, completeType, conf, callbackId, usePromise = false) { - - const obj = getClassObject(className, id); - if (!obj) { - return; - } - const lowerFunctionName = functionName.replace(/^\w/, (a) => a.toLowerCase()); - const config = formatJsonStr(conf); - - if (usePromise) { - obj[lowerFunctionName]({ - ...config, - }).then((res) => { - classFormatAndSend(id, callbackId, `_${className}${functionName}Callback`, 'success', successType, res); - }) - .catch((res) => { - classFormatAndSend(id, callbackId, `_${className}${functionName}Callback`, 'fail', failType, res); - }) - .finally((res) => { - classFormatAndSend(id, callbackId, `_${className}${functionName}Callback`, 'complete', completeType, res); - }); - } - else { - obj[lowerFunctionName]({ - ...config, - success(res) { - classFormatAndSend(id, callbackId, `_${className}${functionName}Callback`, 'success', successType, res); - }, - fail(res) { - classFormatAndSend(id, callbackId, `_${className}${functionName}Callback`, 'fail', failType, res); - }, - complete(res) { - classFormatAndSend(id, callbackId, `_${className}${functionName}Callback`, 'complete', completeType, res); - }, - }); - } - }, }; diff --git a/Runtime/wechat-default/unity-sdk/sdk.js.meta b/Runtime/wechat-default/unity-sdk/sdk.js.meta index bd73c9e09..60c42039b 100644 --- a/Runtime/wechat-default/unity-sdk/sdk.js.meta +++ b/Runtime/wechat-default/unity-sdk/sdk.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 4fea15fbae3983299ada389d87b13ee8 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 6c766c703981a810013f919fd93505d5 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/share.js.meta b/Runtime/wechat-default/unity-sdk/share.js.meta index e43c9a6b0..737c9aeb9 100644 --- a/Runtime/wechat-default/unity-sdk/share.js.meta +++ b/Runtime/wechat-default/unity-sdk/share.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: bcd43b7dc107f49795e1771a6bed4a2e - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: db88811db371e21e6732fcb6a21e1ffb +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/storage.js.meta b/Runtime/wechat-default/unity-sdk/storage.js.meta index 937ad3dde..087964f87 100644 --- a/Runtime/wechat-default/unity-sdk/storage.js.meta +++ b/Runtime/wechat-default/unity-sdk/storage.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 3458df3da5fc934d7d6cbbfa826e490d - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: a2bfcfc0977551396ae26ddcfed8f60e +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/texture.js.meta b/Runtime/wechat-default/unity-sdk/texture.js.meta index 0f6fdadb4..44db367ac 100644 --- a/Runtime/wechat-default/unity-sdk/texture.js.meta +++ b/Runtime/wechat-default/unity-sdk/texture.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: c2e6e07dc2d54ec7929b5c05763a1edc - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: c6792d8b13e36bc528d9c2743138c081 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/touch/index.js.meta b/Runtime/wechat-default/unity-sdk/touch/index.js.meta index 6bb6f96be..a7705227e 100644 --- a/Runtime/wechat-default/unity-sdk/touch/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/touch/index.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 6c042b2d93da639446780d00753f9591 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: ffaa31561b29a7051db372cb99009b5a +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/upload-file.js.meta b/Runtime/wechat-default/unity-sdk/upload-file.js.meta index a3a6c4543..a5e634d52 100644 --- a/Runtime/wechat-default/unity-sdk/upload-file.js.meta +++ b/Runtime/wechat-default/unity-sdk/upload-file.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 50f79217c055b71398cb6ae728b04b73 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: cd2c4622fbebc2723267658f436f039b +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/userinfo.js.meta b/Runtime/wechat-default/unity-sdk/userinfo.js.meta index 4134d8b02..f8a068178 100644 --- a/Runtime/wechat-default/unity-sdk/userinfo.js.meta +++ b/Runtime/wechat-default/unity-sdk/userinfo.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 8f1aa7289d475d2134922c5acdfe3c56 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: f796a15c8e4bf22653fae21924ec3667 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/util.js.meta b/Runtime/wechat-default/unity-sdk/util.js.meta index 8ff2c088d..d03fe1030 100644 --- a/Runtime/wechat-default/unity-sdk/util.js.meta +++ b/Runtime/wechat-default/unity-sdk/util.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 4072be3c0fd80ccf12d37877a8fcdd13 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: d72550966e72e2ee9311be00c0902231 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/utils.js.meta b/Runtime/wechat-default/unity-sdk/utils.js.meta index 847d5a313..53575235e 100644 --- a/Runtime/wechat-default/unity-sdk/utils.js.meta +++ b/Runtime/wechat-default/unity-sdk/utils.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 3b39bf56317deb21f0f9d6293e57f5c8 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: ef5003b0c90a43cd6b7f40178968126b +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/video.js.meta b/Runtime/wechat-default/unity-sdk/video.js.meta index bd82a8a82..fa8ca9da6 100644 --- a/Runtime/wechat-default/unity-sdk/video.js.meta +++ b/Runtime/wechat-default/unity-sdk/video.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 3d41a72825ca3254923ec7aea1267d29 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 30981614eb59c4fa6b879b635efe094e +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/video/index.js b/Runtime/wechat-default/unity-sdk/video/index.js index 70041d907..6ab56dd17 100644 --- a/Runtime/wechat-default/unity-sdk/video/index.js +++ b/Runtime/wechat-default/unity-sdk/video/index.js @@ -174,6 +174,12 @@ function _JS_Video_Create(url) { function _JS_Video_Destroy(video) { debugLog('_JS_Video_Destroy', video); videoInstances[video].destroy(); + const Module = GameGlobal.manager.gameInstance.Module; + const { GL } = Module; + const gl = GL.currentContext.GLctx; + if (!isWebVideo && gl.emscriptenGLX && Module._glxVideoDestroy) { + Module._glxVideoDestroy(video); + } delete videoInstances[video]; } function _JS_Video_Duration(video) { @@ -378,7 +384,29 @@ function _JS_Video_UpdateToTexture(video, tex) { if (!FrameworkData) { return false; } + const Module = GameGlobal.manager.gameInstance.Module; const { GL, GLctx } = FrameworkData; + const gl = GL.currentContext.GLctx; + + if (!isWebVideo && Module._glxVideoUpdateToTexture && gl.emscriptenGLX) { + const data = v.frameData?.data; + const source = supportVideoFrame ? data : new Uint8ClampedArray(data); + const byteLength = supportVideoFrame ? 0 : source.byteLength; + let sourceIdOrPtr; + if (supportVideoFrame) { + sourceIdOrPtr = source.__uid; + } + else { + sourceIdOrPtr = Module._glxGetVideoTempBuffer(video, byteLength); + if (sourceIdOrPtr) { + Module.HEAPU8.set(source, sourceIdOrPtr); + } + } + + Module._glxVideoUpdateToTexture(v, supportVideoFrame, tex, v.videoWidth, v.videoHeight, sourceIdOrPtr); + return true; + } + GLctx.pixelStorei(GLctx.UNPACK_FLIP_Y_WEBGL, true); diff --git a/Runtime/wechat-default/unity-sdk/video/index.js.meta b/Runtime/wechat-default/unity-sdk/video/index.js.meta index e0dcdc3cb..52d95075b 100644 --- a/Runtime/wechat-default/unity-sdk/video/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/video/index.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 9c286dde38e778d5e94c87db3aca4947 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 7934f7cb1be8d93f8f6d0cc3b952a814 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/wasmcode/game.js.meta b/Runtime/wechat-default/wasmcode/game.js.meta index 9be88e904..29333d569 100644 --- a/Runtime/wechat-default/wasmcode/game.js.meta +++ b/Runtime/wechat-default/wasmcode/game.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 82a5758f8b1c4f47c48bb866d0b35cca - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 8850f3a95fb111ff3db67cafa9a9bf43 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/weapp-adapter.js.meta b/Runtime/wechat-default/weapp-adapter.js.meta index cbf2323a8..6b913ae1c 100644 --- a/Runtime/wechat-default/weapp-adapter.js.meta +++ b/Runtime/wechat-default/weapp-adapter.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 7cc01582723c5240f30675efc3edb657 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 174e5136cdd2c505c61d8aaf287771d0 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/workers/response/index.js.meta b/Runtime/wechat-default/workers/response/index.js.meta index 6248f93cb..ff99dede5 100644 --- a/Runtime/wechat-default/workers/response/index.js.meta +++ b/Runtime/wechat-default/workers/response/index.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 - guid: 70a825f1451a9739a21018621dd38a31 - DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file +guid: 0563fa7ce7427dcdbb87de11e4fb2d92 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/WebGLTemplates/WXTemplate/index.html b/WebGLTemplates/WXTemplate/index.html index 180d4b81e..c0ac2da07 100644 --- a/WebGLTemplates/WXTemplate/index.html +++ b/WebGLTemplates/WXTemplate/index.html @@ -431,7 +431,7 @@ return ""; }, WX_ClassFunction() {return ""}, - WX_ClassConstructor() {return ""}, + WX_ClassOneWayFunction() {return ""}, WX_ClassSetProperty() {}, WX_ClassOneWayNoFunction_v() {}, WX_ClassOneWayNoFunction_vs() {}, diff --git a/WebGLTemplates/WXTemplate2020/index.html b/WebGLTemplates/WXTemplate2020/index.html index c183a6d96..3c6925cc7 100644 --- a/WebGLTemplates/WXTemplate2020/index.html +++ b/WebGLTemplates/WXTemplate2020/index.html @@ -503,7 +503,7 @@ return ""; }, WX_ClassFunction() {return ""}, - WX_ClassConstructor() {return ""}, + WX_ClassOneWayFunction() {return ""}, WX_ClassSetProperty() {}, WX_ClassOneWayNoFunction_v() {}, WX_ClassOneWayNoFunction_vs() {}, diff --git a/WebGLTemplates/WXTemplate2022/index.html b/WebGLTemplates/WXTemplate2022/index.html index 09c3ae63b..1f2a2badf 100755 --- a/WebGLTemplates/WXTemplate2022/index.html +++ b/WebGLTemplates/WXTemplate2022/index.html @@ -580,7 +580,7 @@ return ""; }, WX_ClassFunction() {return ""}, - WX_ClassConstructor() {return ""}, + WX_ClassOneWayFunction() {return ""}, WX_ClassSetProperty() {}, WX_ClassOneWayNoFunction_v() {}, WX_ClassOneWayNoFunction_vs() {}, diff --git a/package.json b/package.json index 5a4736743..650163cc4 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.28","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