Auto-publish.

This commit is contained in:
nebulaliu 2025-09-18 21:26:16 +08:00
parent fa0d2ccc00
commit 1336a95c04
200 changed files with 2040 additions and 782 deletions

View File

@ -6,7 +6,29 @@ Removed - 删除功能/接口
Fixed - 修复问题
Others - 其他
-->
## v0.1.26 【预发布】
## 2025-9-8 v0.1.29 【重要更新】
### Feature
* 普通本地缓存存在时UnityWebRequest支持同步方式(APIwx.SetSyncReadCacheEnabled)以加快读取速度
* 重要Emscriptenglx相关能力支持兼容unity2021/2022/tuanjie
* 重要新版本的Wasm分包能力支持大幅度优化了iOS平台高性能+)模式的分包性能表现,大幅度减少了开发者预处理操作耗时,优化了分包操作耗时
* 普通适配插件版本升至1.2.80
## 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 【普通更新】
### Feature
* 普通:增加禁止多点触控的配置
### Fixed

View File

@ -5,4 +5,4 @@ DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
assetBundleVariant:

View File

@ -5,4 +5,4 @@ DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
assetBundleVariant:

View File

@ -111,7 +111,7 @@ namespace WeChatWASM
this.formCheckbox("developBuild", "Development Build", "", false, null, OnDevelopmentBuildToggleChanged);
this.formCheckbox("il2CppOptimizeSize", "Il2Cpp Optimize Size(?)", "对应于Il2CppCodeGeneration选项勾选时使用OptimizeSize(默认推荐)生成代码小15%左右取消勾选则使用OptimizeSpeed。游戏中大量泛型集合的高频访问建议OptimizeSpeed在使用HybridCLR等第三方组件时只能用OptimizeSpeed。(Dotnet Runtime模式下该选项无效)", !UseIL2CPP);
this.formCheckbox("profilingFuncs", "Profiling Funcs");
this.formCheckbox("webgl2", "WebGL2.0(beta)");
this.formCheckbox("webgl2", "WebGL2.0");
EditorGUILayout.EndVertical();
}

View File

@ -282,8 +282,8 @@ namespace WeChatWASM
}
catch (Exception ex)
{
UnityEngine.Debug.LogError($"Failed to get enabled flag string index: {ex.Message}");
throw;
UnityEngine.Debug.LogWarning($"Failed to get enabled flag string index: {ex.Message}");
return -1; // -1 means failed
}
}
@ -312,7 +312,8 @@ namespace WeChatWASM
}
catch (Exception ex)
{
UnityEngine.Debug.LogError($"Failed to enable plugin asset: {ex.Message}");
// 避免 Error 日志阻塞打包流程
UnityEngine.Debug.LogWarning($"Failed to enable plugin asset: {ex.Message}");
}
}
@ -390,27 +391,47 @@ namespace WeChatWASM
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",
};
}
for (int i = 0; i < glLibs.Length; i++)
{
var importer = AssetImporter.GetAtPath(glLibs[i]) as PluginImporter;
// unity2022, tuanjie lib引入
bool showEnableGLX2022Plugin = config.CompileOptions.enableEmscriptenGLX && IsCompatibleWithUnity202203OrNewer();
var glx2022Importer = AssetImporter.GetAtPath(glLibs[0]) as PluginImporter;
#if PLATFORM_WEIXINMINIGAME
importer.SetCompatibleWithPlatform(BuildTarget.WeixinMiniGame, config.CompileOptions.enableEmscriptenGLX);
glx2022Importer.SetCompatibleWithPlatform(BuildTarget.WeixinMiniGame, showEnableGLX2022Plugin);
#else
importer.SetCompatibleWithPlatform(BuildTarget.WebGL, config.CompileOptions.enableEmscriptenGLX);
glx2022Importer.SetCompatibleWithPlatform(BuildTarget.WebGL, showEnableGLX2022Plugin);
#endif
// importer.SaveAndReimport();
SetPluginCompatibilityByModifyingMetadataFile(glLibs[i], config.CompileOptions.enableEmscriptenGLX);
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();
}
@ -923,6 +944,22 @@ 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! ");

View File

@ -183,7 +183,7 @@ 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(beta)");
this.formCheckbox("webgl2", "WebGL2.0");
this.formCheckbox("iOSPerformancePlus", "iOSPerformancePlus(?)", "是否使用iOS高性能+渲染方案有助于提升渲染兼容性、降低WebContent进程内存");
this.formCheckbox("EmscriptenGLX", "EmscriptenGLX(?)", "是否使用EmscriptenGLX渲染方案");
this.formCheckbox("iOSMetal", "iOSMetal(?)", "是否使用iOSMetal渲染方案需要开启iOS高性能+模式有助于提升运行性能降低iOS功耗");

View File

@ -2,7 +2,7 @@ namespace WeChatWASM
{
public class WXPluginVersion
{
public static string pluginVersion = "202509030942"; // 这一行不要改他,导出的时候会自动替换
public static string pluginVersion = "202509181325"; // 这一行不要改他,导出的时候会自动替换
}
public class WXPluginConf

Binary file not shown.

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 2edbf5b283b8fb4a93df7adce1cc21cd
guid: 0d848964ba45aa2b5aa025a7f049bf92
DefaultImporter:
externalObjects: {}
userData:

View File

@ -416,11 +416,11 @@ mergeInto(LibraryManager.library, {
WXVideoPlay: function(id) {
window.WXWASMSDK.WXVideoPlay(_WXPointer_stringify_adaptor(id));
},
WXVideoAddListener: function(id,key) {
WXVideoAddListener: function(id, key) {
window.WXWASMSDK.WXVideoAddListener(_WXPointer_stringify_adaptor(id), _WXPointer_stringify_adaptor(key));
},
WXVideoDestroy: function(id) {
window.WXWASMSDK.WXVideoDestroy(_WXPointer_stringify_adaptor(id));
WXVideoDestroy: function(id, isLast) {
window.WXWASMSDK.WXVideoDestroy(_WXPointer_stringify_adaptor(id), isLast);
},
WXVideoExitFullScreen: function(id) {
window.WXWASMSDK.WXVideoExitFullScreen(_WXPointer_stringify_adaptor(id));

View File

@ -51,6 +51,7 @@ var WXAssetBundleLibrary = {
WXFS.msg = "";
WXFS.fd2wxStream = new Map;
WXFS.path2fd = new Map;
WXFS.refRecord = new Map;
WXFS.fs = wx.getFileSystemManager();
WXFS.nowfd = FS.MAX_OPEN_FDS + 1;
WXFS.isWXAssetBundle = function(url){
@ -98,18 +99,6 @@ var WXAssetBundleLibrary = {
value: function get(key) {
var temp = this.hash.get(key);
if (temp !== undefined) {
if(temp.cleanable && unityNamespace.isAndroid && temp.time + this.ttl * 1000 < Date.now()){
try {
var check_path = WXFS.fd2wxStream.get(key).path
if(!GameGlobal.manager.getCachePath(check_path)){
throw new Error("No such file in the wx cache system")
}
WXFS.fs.statSync(check_path)
} catch (e) {
GameGlobal.manager.reporter.wxAssetBundle.reportEmptyContent({stage: WXFS.WXABErrorSteps['kCacheGet'], path: check_path, error: !!e ? e.toString() : 'unknown'});
GameGlobal.manager.Logger.pluginLog('[WXAssetBundle]Android statSync path: ' + check_path + ' error: ' + (!!e ? e.toString() : 'unknown'));
}
}
this.hash.delete(key);
temp.time = Date.now();
this.hash.set(key, temp);
@ -320,6 +309,9 @@ var WXAssetBundleLibrary = {
}
if(!WXFS.disk.has(path)){
WXFS.disk.set(path, 0);
WXFS.refRecord.set(path, 1);
} else {
WXFS.refRecord.set(path, WXFS.refRecord.get(path) + 1);
}
return true;
},
@ -327,11 +319,17 @@ var WXAssetBundleLibrary = {
UnloadbyPath: function (ptr) {
var path = WXFS.url2path(UTF8ToString(ptr));
var fd = WXFS.path2fd.get(path);
if(WXFS.cache.has(fd)){
WXFS.cache.delete(fd);
}
if(WXFS.disk.has(path)){
WXFS.disk.delete(path);
var refCount = WXFS.refRecord.get(path);
if(!refCount) return;
refCount -= 1;
WXFS.refRecord.set(path, refCount);
if(!refCount){
if(WXFS.cache.has(fd)){
WXFS.cache.delete(fd);
}
if(WXFS.disk.has(path)){
WXFS.disk.delete(path);
}
}
},

Binary file not shown.

View File

@ -59,6 +59,11 @@ PluginImporter:
enabled: 1
settings:
CPU: AnyCPU
- first:
WebGL: WebGL
second:
enabled: 1
settings: {}
- first:
WeixinMiniGame: WeixinMiniGame
second:

Binary file not shown.

View File

@ -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:

Binary file not shown.

View File

@ -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:

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 331304e034607f5b007138fa61269f4e
guid: 98274420b3f3ce8d4b690f97a42f93c6
DefaultImporter:
externalObjects: {}
userData:

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 89b0962f9de2d968082f6d4972225e38
guid: 0395cedd9b430bd49895540eb0581056
DefaultImporter:
externalObjects: {}
userData:

View File

@ -276,6 +276,16 @@ namespace WeChatWASM
WXSDKManagerHandler.Instance.CreateBLEPeripheralServer(callback);
}
/// <summary>
/// [wx.exitChatTool(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.exitChatTool.html)
/// 需要基础库: `3.7.12`
/// 退出聊天工具模式
/// </summary>
public static void ExitChatTool(ExitChatToolOption callback)
{
WXSDKManagerHandler.Instance.ExitChatTool(callback);
}
/// <summary>
/// [wx.exitMiniProgram(Object object)](https://developers.weixin.qq.com/minigame/dev/api/navigate/wx.exitMiniProgram.html)
/// 需要基础库: `2.17.3`
@ -511,6 +521,45 @@ namespace WeChatWASM
WXSDKManagerHandler.Instance.GetChannelsLiveNoticeInfo(callback);
}
/// <summary>
/// [wx.getChatToolInfo(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.getChatToolInfo.html)
/// 需要基础库: `3.7.12`
/// 获取聊天工具模式下的群聊信息。
/// 需要注意的是,单聊群和多聊群下返回的群唯一标识是不同的。
/// 1. 多聊群下返回 opengid
/// 2. 单聊群下返回 open_single_roomid
/// 同时将返回用户在群(含单聊)下的唯一标识 group_openid。
/// **示例代码**
/// ```js
/// wx.getChatToolInfo({
/// success(res) {
/// // res
/// {
/// errMsg: 'getChatToolInfo:ok',
/// encryptedData: '',
/// iv: ''
/// }
/// },
/// fail() {
/// }
/// })
/// ```
/// 敏感数据有两种获取方式,一是使用 [加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html#加密数据解密算法) 。
/// 获取得到的开放数据为以下 json 结构(其中 opengid 为当前群的唯一标识):
/// ```json
/// {
/// "opengid": "OPENGID", // 多聊群下返回的群唯一标识
/// "open_single_roomid": "", // 单聊群下返回的群唯一标识
/// "group_openid": "", // 用户在当前群的唯一标识
/// "chat_type": 3, // 聊天室类型
/// }
/// ```
/// </summary>
public static void GetChatToolInfo(GetChatToolInfoOption callback)
{
WXSDKManagerHandler.Instance.GetChatToolInfo(callback);
}
/// <summary>
/// [wx.getClipboardData(Object object)](https://developers.weixin.qq.com/minigame/dev/api/device/clipboard/wx.getClipboardData.html)
/// 需要基础库: `1.1.0`
@ -641,6 +690,16 @@ namespace WeChatWASM
WXSDKManagerHandler.Instance.GetGameClubData(callback);
}
/// <summary>
/// [wx.getGameExptInfo(Object object)](https://developers.weixin.qq.com/minigame/dev/api/data-analysis/wx.getGameExptInfo.html)
/// 需要基础库: `3.8.8`
/// 给定实验参数数组,获取对应的实验参数值
/// </summary>
public static void GetGameExptInfo(GetGameExptInfoOption callback)
{
WXSDKManagerHandler.Instance.GetGameExptInfo(callback);
}
/// <summary>
/// [wx.getGroupEnterInfo(Object object)](https://developers.weixin.qq.com/minigame/dev/api/open-api/group/wx.getGroupEnterInfo.html)
/// 需要基础库: `2.10.4`
@ -683,6 +742,16 @@ namespace WeChatWASM
WXSDKManagerHandler.Instance.GetGroupEnterInfo(callback);
}
/// <summary>
/// [wx.getGroupMembersInfo(Object object)](https://developers.weixin.qq.com/minigame/dev/api/open-api/data/wx.getGroupMembersInfo.html)
/// 需要基础库: `3.7.12`
/// 获取所选群成员的头像、昵称,自行在开放数据域中渲染
/// </summary>
public static void GetGroupMembersInfo(GetGroupMembersInfoOption callback)
{
WXSDKManagerHandler.Instance.GetGroupMembersInfo(callback);
}
/// <summary>
/// [wx.getInferenceEnvInfo(Object object)](https://developers.weixin.qq.com/minigame/dev/api/ai/inference/wx.getInferenceEnvInfo.html)
/// 需要基础库: `2.30.1`
@ -847,27 +916,6 @@ namespace WeChatWASM
WXSDKManagerHandler.Instance.GetSetting(callback);
}
/// <summary>
/// [wx.getShareInfo(Object object)](https://developers.weixin.qq.com/minigame/dev/api/share/wx.getShareInfo.html)
/// 需要基础库: `1.1.0`
/// 获取转发详细信息主要是获取群ID。 从群聊内的小程序消息卡片打开小程序时,调用此接口才有效。从基础库 v2.17.3 开始,推荐用 [wx.getGroupEnterInfo](https://developers.weixin.qq.com/minigame/dev/api/open-api/group/wx.getGroupEnterInfo.html) 替代此接口。
/// **示例代码**
/// 敏感数据获取方式 [加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html#加密数据解密算法) 。
/// 获取得到的开放数据为以下 json 结构(其中 openGId 为当前群的唯一标识):
/// ```json
/// {
/// "openGId": "OPENGID"
/// }
/// ```
/// **Tips**
/// - 如需要展示群名称,小程序可以使用 [开放数据组件](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/open-data.html)
/// - 小游戏可以通过 [`wx.getGroupInfo`](https://developers.weixin.qq.com/minigame/dev/api/open-api/data/wx.getGroupInfo.html) 接口获取群名称
/// </summary>
public static void GetShareInfo(GetShareInfoOption callback)
{
WXSDKManagerHandler.Instance.GetShareInfo(callback);
}
/// <summary>
/// [wx.getShowSplashAdStatus(Object object)](https://developers.weixin.qq.com/minigame/dev/api/ad/wx.getShowSplashAdStatus.html)
/// 需要基础库: `3.7.8`
@ -1272,6 +1320,16 @@ namespace WeChatWASM
WXSDKManagerHandler.Instance.NotifyBLECharacteristicValueChange(callback);
}
/// <summary>
/// [wx.notifyGroupMembers(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.notifyGroupMembers.html)
/// 需要基础库: `3.7.12`
/// 提醒用户完成任务,标题长度不超过 30 个字符支持中英文和数字中文算2个字符。
/// </summary>
public static void NotifyGroupMembers(NotifyGroupMembersOption callback)
{
WXSDKManagerHandler.Instance.NotifyGroupMembers(callback);
}
/// <summary>
/// [wx.openAppAuthorizeSetting(Object object)](https://developers.weixin.qq.com/minigame/dev/api/base/system/wx.openAppAuthorizeSetting.html)
/// 需要基础库: `2.25.3`
@ -1383,6 +1441,19 @@ namespace WeChatWASM
WXSDKManagerHandler.Instance.OpenChannelsUserProfile(callback);
}
/// <summary>
/// [wx.openChatTool(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.openChatTool.html)
/// 需要基础库: `3.7.12`
/// 进入聊天工具模式。
/// 1. 不传入聊天室id时微信会拉起聊天列表让用户选择用户选择后绑定聊天室进入聊天工具模式。
/// 2. 传入聊天室id时群聊为opengid单聊为open_single_roomid会直接绑定该聊天室进入此时必须传入对应的 chatType。
/// 3. 聊天室类型可从 [[getGroupEnterInfo]](https://developers.weixin.qq.com/minigame/dev/api/open-api/group/wx.getGroupEnterInfo.html) 返回值中获取。
/// </summary>
public static void OpenChatTool(OpenChatToolOption callback)
{
WXSDKManagerHandler.Instance.OpenChatTool(callback);
}
/// <summary>
/// [wx.openCustomerServiceChat(Object object)](https://developers.weixin.qq.com/minigame/dev/api/open-api/service-chat/wx.openCustomerServiceChat.html)
/// 需要基础库: `2.30.4`
@ -1906,6 +1977,25 @@ namespace WeChatWASM
WXSDKManagerHandler.Instance.ScanCode(callback);
}
/// <summary>
/// [wx.selectGroupMembers(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.selectGroupMembers.html)
/// 需要基础库: `3.7.12`
/// 选择聊天室的成员,并返回选择成员的 group_openid。若当前为群聊则会拉起成员选择器若当前为单聊则直接返回双方的 group_openid。
/// ****
/// ```js
/// wx.selectGroupMembers({
/// maxSelectCount: 3,
/// success(res) {
/// // res.members
/// }
/// })
/// ```
/// </summary>
public static void SelectGroupMembers(SelectGroupMembersOption callback)
{
WXSDKManagerHandler.Instance.SelectGroupMembers(callback);
}
/// <summary>
/// [wx.setBLEMTU(Object object)](https://developers.weixin.qq.com/minigame/dev/api/device/bluetooth-ble/wx.setBLEMTU.html)
/// 需要基础库: `2.11.0`
@ -2068,6 +2158,56 @@ namespace WeChatWASM
WXSDKManagerHandler.Instance.SetVisualEffectOnCapture(callback);
}
/// <summary>
/// [wx.shareAppMessageToGroup(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.shareAppMessageToGroup.html)
/// 需要基础库: `3.7.12`
/// 转发小程序卡片到聊天
/// </summary>
public static void ShareAppMessageToGroup(ShareAppMessageToGroupOption callback)
{
WXSDKManagerHandler.Instance.ShareAppMessageToGroup(callback);
}
/// <summary>
/// [wx.shareEmojiToGroup(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.shareEmojiToGroup.html)
/// 需要基础库: `3.7.12`
/// 转发表情到聊天
/// </summary>
public static void ShareEmojiToGroup(ShareEmojiToGroupOption callback)
{
WXSDKManagerHandler.Instance.ShareEmojiToGroup(callback);
}
/// <summary>
/// [wx.shareImageToGroup(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.shareImageToGroup.html)
/// 需要基础库: `3.7.12`
/// 转发图片到聊天
/// </summary>
public static void ShareImageToGroup(ShareImageToGroupOption callback)
{
WXSDKManagerHandler.Instance.ShareImageToGroup(callback);
}
/// <summary>
/// [wx.shareTextToGroup(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.shareTextToGroup.html)
/// 需要基础库: `3.7.12`
/// 转发文本到聊天
/// </summary>
public static void ShareTextToGroup(ShareTextToGroupOption callback)
{
WXSDKManagerHandler.Instance.ShareTextToGroup(callback);
}
/// <summary>
/// [wx.shareVideoToGroup(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.shareVideoToGroup.html)
/// 需要基础库: `3.7.12`
/// 转发视频到聊天
/// </summary>
public static void ShareVideoToGroup(ShareVideoToGroupOption callback)
{
WXSDKManagerHandler.Instance.ShareVideoToGroup(callback);
}
/// <summary>
/// [wx.showActionSheet(Object object)](https://developers.weixin.qq.com/minigame/dev/api/ui/interaction/wx.showActionSheet.html)
/// 显示操作菜单
@ -2578,6 +2718,16 @@ namespace WeChatWASM
WXSDKManagerHandler.Instance.ExitPointerLock();
}
/// <summary>
/// [wx.isChatTool()](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.isChatTool.html)
/// 需要基础库: `3.7.12`
/// 是否处于聊天工具模式
/// </summary>
public static void IsChatTool()
{
WXSDKManagerHandler.Instance.IsChatTool();
}
/// <summary>
/// [wx.removeStorageSync(string key)](https://developers.weixin.qq.com/minigame/dev/api/storage/wx.removeStorageSync.html)
/// [wx.removeStorage](https://developers.weixin.qq.com/minigame/dev/api/storage/wx.removeStorage.html) 的同步版本
@ -2667,23 +2817,6 @@ namespace WeChatWASM
WXSDKManagerHandler.Instance.RevokeBufferURL(url);
}
/// <summary>
/// [wx.setStorageSync(string key, any data)](https://developers.weixin.qq.com/minigame/dev/api/storage/wx.setStorageSync.html)
/// 将数据存储在本地缓存中指定的 key 中。会覆盖掉原来该 key 对应的内容。除非用户主动删除或因存储空间原因被系统清理,否则数据都一直可用。单个 key 允许存储的最大数据长度为 1MB所有数据存储上限为 10MB。
/// **注意**
/// storage 应只用来进行数据的持久化存储,不应用于运行时的数据传递或全局状态管理。启动过程中过多的同步读写存储,会显著影响启动耗时。
/// **示例代码**
/// ```js
/// try {
/// wx.setStorageSync('key', 'value')
/// } catch (e) { }
/// ```
/// </summary>
public static void SetStorageSync<T>(string key, T data)
{
WXSDKManagerHandler.Instance.SetStorageSync(key, data);
}
/// <summary>
/// [wx.shareAppMessage(Object object)](https://developers.weixin.qq.com/minigame/dev/api/share/wx.shareAppMessage.html)
/// 主动拉起转发,进入选择通讯录界面。
@ -2992,12 +3125,12 @@ namespace WeChatWASM
/// [wx.onError(function listener)](https://developers.weixin.qq.com/minigame/dev/api/base/app/app-event/wx.onError.html)
/// 监听全局错误事件
/// </summary>
public static void OnError(Action<Error> error)
public static void OnError(Action<ListenerError> error)
{
WXSDKManagerHandler.Instance.OnError(error);
}
public static void OffError(Action<Error> error)
public static void OffError(Action<ListenerError> error)
{
WXSDKManagerHandler.Instance.OffError(error);
}
@ -3274,6 +3407,28 @@ namespace WeChatWASM
WXSDKManagerHandler.Instance.OffNetworkWeakChange(result);
}
/// <summary>
/// [wx.onOfficialComponentsInfoChange(function listener)](https://developers.weixin.qq.com/minigame/dev/api/ui/menu/wx.onOfficialComponentsInfoChange.html)
/// 需要基础库: `3.7.12`
/// 监听官方组件信息变化事件
/// **示例代码**
/// ```js
/// const callback = res => console.log('officialComponentsInfoChange', res)
/// wx.onOfficialComponentsInfoChange(callback)
/// // 取消监听
/// wx.offOfficialComponentsInfoChange(callback)
/// ```
/// </summary>
public static void OnOfficialComponentsInfoChange(Action<OnOfficialComponentsInfoChangeListenerResult> result)
{
WXSDKManagerHandler.Instance.OnOfficialComponentsInfoChange(result);
}
public static void OffOfficialComponentsInfoChange(Action<OnOfficialComponentsInfoChangeListenerResult> result)
{
WXSDKManagerHandler.Instance.OffOfficialComponentsInfoChange(result);
}
/// <summary>
/// [wx.onScreenRecordingStateChanged(function listener)](https://developers.weixin.qq.com/minigame/dev/api/device/screen/wx.onScreenRecordingStateChanged.html)
/// 需要基础库: `3.1.4`
@ -3455,10 +3610,25 @@ namespace WeChatWASM
WXSDKManagerHandler.Instance.OffWindowResize(result);
}
/// <summary>
/// [wx.onWindowStateChange(function listener)](https://developers.weixin.qq.com/minigame/dev/api/ui/window/wx.onWindowStateChange.html)
/// 需要基础库: `3.8.8`
/// 监听小程序窗口状态变化事件。仅适用于 PC 平台
/// </summary>
public static void OnWindowStateChange(Action<OnWindowStateChangeListenerResult> result)
{
WXSDKManagerHandler.Instance.OnWindowStateChange(result);
}
public static void OffWindowStateChange(Action<OnWindowStateChangeListenerResult> result)
{
WXSDKManagerHandler.Instance.OffWindowStateChange(result);
}
/// <summary>
/// [wx.onAddToFavorites(function listener)](https://developers.weixin.qq.com/minigame/dev/api/share/wx.onAddToFavorites.html)
/// 需要基础库: `2.10.3`
/// 监听用户点击菜单「收藏」按钮时触发的事件安卓7.0.15起支持iOS 暂不支持)
/// 监听用户点击菜单「收藏」按钮时触发的事件
/// </summary>
public static void OnAddToFavorites(Action<Action<OnAddToFavoritesListenerResult>> callback)
{
@ -3769,6 +3939,30 @@ namespace WeChatWASM
return WXSDKManagerHandler.GetMenuButtonBoundingClientRect();
}
/// <summary>
/// [Object wx.getOfficialComponentsInfo()](https://developers.weixin.qq.com/minigame/dev/api/ui/menu/wx.getOfficialComponentsInfo.html)
/// 需要基础库: `3.7.12`
/// 获取所有官方组件的相关信息
/// **示例代码**
/// ```js
/// const componentsInfo = wx.getOfficialComponentsInfo();
/// const { notificationComponentInfo } = componentsInfo;
/// if (notificationComponentInfo.isShow) {
/// console.log(notificationComponentInfo.boundingClientRect.width);
/// console.log(notificationComponentInfo.boundingClientRect.height);
/// console.log(notificationComponentInfo.boundingClientRect.top);
/// console.log(notificationComponentInfo.boundingClientRect.left);
/// console.log(notificationComponentInfo.boundingClientRect.bottom);
/// console.log(notificationComponentInfo.boundingClientRect.right);
/// }
/// ```
/// </summary>
/// <returns></returns>
public static OfficialComponentsInfo GetOfficialComponentsInfo()
{
return WXSDKManagerHandler.GetOfficialComponentsInfo();
}
/// <summary>
/// [Object wx.getStorageInfoSync()](https://developers.weixin.qq.com/minigame/dev/api/storage/wx.getStorageInfoSync.html)
/// [wx.getStorageInfo](https://developers.weixin.qq.com/minigame/dev/api/storage/wx.getStorageInfo.html) 的同步版本

View File

@ -535,7 +535,7 @@ namespace WeChatWASM
/// </summary>
/// <param name="param"></param>
/// <returns></returns>
public static WXVideo CreateVideo(WXCreateVideoParam param)
public static WXVideo CreateVideo(CreateVideoOption param)
{
return WXSDKManagerHandler.Instance.CreateVideo(param);
}
@ -1127,6 +1127,15 @@ namespace WeChatWASM
WXSDKManagerHandler.Instance.NotifyMiniProgramPlayableStatus(option);
}
#endregion
#region
/// <summary>
/// 请求虚拟支付
/// </summary>
public static void RequestVirtualPayment(RequestVirtualPaymentOption option)
{
WXSDKManagerHandler.Instance.RequestVirtualPayment(option);
}
#endregion
/// <summary>
/// [[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)
@ -1153,6 +1162,12 @@ namespace WeChatWASM
{
return WXSDKManagerHandler.Instance.CreatePageManager();
}
/// <returns></returns>
public static WXMiniReportManager GetMiniReportManager(GetMiniReportManagerParam param)
{
return WXSDKManagerHandler.Instance.GetMiniReportManager(param);
}
}
}
#endif

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: c1ee7e3ff598ace7ff70912ff0a92c3f
guid: bdcdb3108ed6fb2416b1e40a8064dc41
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: ddad3278385da34733df7591553f2a24
guid: c8177b95724a7bbef7e777ba03fe0df1
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: e3ee818e1e16b4aead12280eed60d115
guid: c393077c09318437f5b3d7958242db6f
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: f2e581d72f7cb24b0ac04641db6c1f6d
guid: 9a805382066d1c34aac58c7fc9e50923
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: e5d4fafcb62604155d145758cc8a056b
guid: 5b95ac7db91a6033d873f3e0d94bd81a
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a1b2eb0dee8e6de7b8717dc121e623c2
guid: 27c1051e91dedb3bea4d9f15dd72b4bd
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: b5bed6a1cdafd5bb9f8b86747849dc41
guid: 233ccf9d03e57c00663509741297cc98
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 4ba1b29b9a8fb073551ccdbd82dc2451
guid: d65e0a104edceebc6c4da761caee58f4
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 52a67e24ba44a90e0442fe0a0e268b30
guid: d2463529f17e0e80895d0c3f98ba3d57
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 1594e74f7ee75fc4813de634f41cd781
guid: 33f509a4311d3d6b2c775d2294d8f0e8
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 5e1aaa1297799fe806829a46d9894593
guid: 0358607cd20d1f2303a608d6d7992321
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 8a90a1f96f504f892fc29773a2124982
guid: 1327b5b11240a8a6f01c11deb0bf3584
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: c53d546bb27f2b160829a6ccc38aa305
guid: d361698a05274dec53dd2550ca22bac5
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: f54540adbfaffa013cec8d165904846b
guid: 1813b4a5d318b4c4a85c3fa3470a3223
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a442315fba10c469b2de3a34965b4d22
guid: 1565adf5abb470dd6b74461fc1b82b6a
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 23f8bcb97a3e69fff45669369c5af00c
guid: c442879c6372e9d96ed4b53e6fb0ef1b
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 7096da294ad7b645172ee1f678337db3
guid: 8a6da0959de38d9f1174e70793f71fa9
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: ebfdff83c4b88777e225397d3ae523cf
guid: 4582b4f0fa5ac834b2970d7c811cf91b
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 826b0d023eee0f55cba7818825db8cd2
guid: cc1ac1ef5a5200918805f8ec12107bd2
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: bac595d0ad1d3b088c8582e5f7bc1713
guid: fee9da28ab200612dafb67926371ac0d
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 11c4cd7206973d8bb35c4f98f9a5699f
guid: fdb42d059beb9a8a03594df773d8bc0f
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: e4be78b429444f953044c14ee12fdc9d
guid: 908322a04e3bc51a837240b2b3577cc5
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 77cf6ed56de2a55bc1a260ae2dcb56b7
guid: 791c50d64ac11f33b8b950d5a8bdbca7
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1018,6 +1018,9 @@ export default {
if (WEBAudio.audioWebSupport === 0 || WEBAudio.audioWebEnabled === 0) {
return;
}
if (WEBAudio.audioContext && WEBAudio.audioContext.state !== 'suspended') {
return;
}
resumeWebAudio();
},
_JS_Sound_Set3D(channelInstance, threeD) {

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: d064e40ad6cc3fd6c3ab024a857cf528
guid: fb6b21b9de2af1f881b71418dcd35eef
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 34542c77f047db5a7b180cb6d1827408
guid: f521dafaf5a8aadb21f802aee8228b05
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 3b62ce8c4737d91d75d2680ae0960c9e
guid: 0eddd88ad2bba6d5cea3049eda6fa29c
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 6d2b72976727e50b0ced9463418e64ce
guid: a638a2d270f0330bd6b8033aec8cd738
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 1f93bb40e9a3ca31a2a62d4b76060b70
guid: 963ef52e2e6c72f358f7c66ebc6386da
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: dd7255f2e6a352ad04f8d96a920fac52
guid: e080c263940aca96b4d69790dd9dc10f
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: f627bc7b1fb866ae364f2b5d08ffc7d1
guid: d8edb1035b62b79ec3a5bccebe99ac56
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 31c1d12a118058abc0315d6ae0c76831
guid: 7965da47437d8f6c574b9d0fd157c037
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: e3781e523eeae0b532489c9aa67e5270
guid: 5147199f6a46aaf3e027efc686a290c4
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 1aae090a0d7c8a23db5302f445ceca98
guid: b9778fc7aa978bf6b70a74421f45a37e
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 32f4ae80f155702431ff66dab2673e66
guid: 944683166f5c1a5ca61d88158537b19d
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 57c595da2d5765711299f99b5a4fe1f9
guid: 8ee302d6403b3e2c5231e37e159a25e2
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 9928e8869849e07efe5b2816ec2d9106
guid: 0426ed5ad3294374017dd73a4c9bdf26
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 3cd696c30ffa0394b3b4b63cd3e269f4
guid: 0c5d21d56876512d86bd5bf2e9229938
DefaultImporter:
externalObjects: {}
userData:

View File

@ -93,6 +93,14 @@ export const ResType = {
top: 'number',
width: 'number',
},
OfficialComponentsInfo: {
notificationComponentInfo: 'OfficialComponentInfo',
},
OfficialComponentInfo: {
boundingClientRect: 'ClientRect',
isVisible: 'bool',
name: 'string',
},
GetStorageInfoSyncOption: {
currentSize: 'number',
keys: 'string[]',
@ -180,10 +188,15 @@ export const ResType = {
downstreamThroughputKbpsEstimate: 'number',
estimate_nettype: 'number',
fetchStart: 'number',
httpDNSDomainLookUpEnd: 'number',
httpDNSDomainLookUpStart: 'number',
httpRttEstimate: 'number',
invokeStart: 'number',
peerIP: 'string',
port: 'number',
protocol: 'string',
queueEnd: 'number',
queueStart: 'number',
receivedBytedCount: 'number',
redirectEnd: 'number',
redirectStart: 'number',
@ -518,6 +531,12 @@ export const ResType = {
status: 'number',
errMsg: 'string',
},
GetChatToolInfoSuccessCallbackResult: {
cloudID: 'string',
encryptedData: 'string',
errMsg: 'string',
iv: 'string',
},
GetClipboardDataSuccessCallbackOption: {
data: 'string',
errMsg: 'string',
@ -555,6 +574,10 @@ export const ResType = {
signature: 'string',
errMsg: 'string',
},
GetGameExptInfoSuccessCallbackResult: {
list: 'object',
errMsg: 'string',
},
GetGroupEnterInfoError: {
errMsg: 'string',
errCode: 'number',
@ -565,6 +588,20 @@ export const ResType = {
errMsg: 'string',
iv: 'string',
},
GetGroupMembersInfoSuccessCallbackResult: {
membersInfo: 'ResultOpenDataContextUserInfo[]',
errMsg: 'string',
},
ResultOpenDataContextUserInfo: {
avatarUrl: 'string',
city: 'string',
country: 'string',
gender: 'number',
language: 'string',
nickName: 'string',
openId: 'string',
province: 'string',
},
GetInferenceEnvInfoSuccessCallbackResult: {
ver: 'string',
errMsg: 'string',
@ -667,7 +704,7 @@ export const ResType = {
errMsg: 'string',
openIdList: 'string[]',
},
RequestFailCallbackErr: {
LoginFailCallbackErr: {
errMsg: 'string',
errno: 'number',
},
@ -736,9 +773,8 @@ export const ResType = {
OnDeviceOrientationChangeListenerResult: {
value: 'string',
},
Error: {
ListenerError: {
message: 'string',
stack: 'string',
},
OnGamepadConnectedListenerResult: {
gamepad: 'string',
@ -784,6 +820,9 @@ export const ResType = {
networkType: 'string',
weakNet: 'bool',
},
OnOfficialComponentsInfoChangeListenerResult: {
OfficialComponentsInfo: 'OfficialComponentsInfo',
},
OnScreenRecordingStateChangedListenerResult: {
state: 'string',
},
@ -846,6 +885,9 @@ export const ResType = {
windowHeight: 'number',
windowWidth: 'number',
},
OnWindowStateChangeListenerResult: {
state: 'string',
},
OpenCardRequestInfo: {
cardId: 'string',
code: 'string',
@ -889,12 +931,6 @@ export const ResType = {
errMsg: 'string',
errCode: 'number',
},
RequestMidasFriendPaymentSuccessCallbackResult: {
cloudID: 'string',
encryptedData: 'string',
errMsg: 'string',
iv: 'string',
},
MidasPaymentError: {
errMsg: 'string',
errCode: 'number',
@ -940,6 +976,10 @@ export const ResType = {
scanType: 'string',
errMsg: 'string',
},
GroupMemberInfo: {
members: 'string[]',
errMsg: 'string',
},
SetBLEMTUFailCallbackResult: {
mtu: 'number',
},

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a161d45908d424b373c14d768bb18ba9
guid: 8fce72a54d219d5ebf931db23dc74a88
DefaultImporter:
externalObjects: {}
userData:

View File

@ -86,4 +86,12 @@ export const ResTypeOther = {
status: 'number',
errMsg: 'string',
},
LoadOption: {
openlink: 'string',
query: 'object',
},
ShowOption: {
openlink: 'string',
query: 'object',
},
};

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: fa2742b5b25e4264d0a037206de220a5
guid: 3b48f5e9aa2bd0577c1a6cdbe35390ba
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a22cb0b0800f0877b50d3c833e6ca402
guid: dca447acfec46caa79177897de7b4b65
DefaultImporter:
externalObjects: {}
userData:

View File

@ -27,10 +27,12 @@ function WX_OneWayNoFunction(functionName, ...params) {
}
const onlyReadyResponse = [
const onlyReadResponse = [
'getSystemSetting',
'getAppAuthorizeSetting',
];
const needParseJson = ['WXMiniReportManagerReport'];
// eslint-disable-next-line @typescript-eslint/naming-convention
function WX_SyncFunction(functionName, ...params) {
return wx[functionName.replace(/^\w/, (a) => a.toLowerCase())](...params);
@ -72,6 +74,10 @@ export default {
...config,
success(res) {
formatResponse(successType, res);
if (lowerFunctionName === 'getGameExptInfo') {
res.list = JSON.stringify(res.list);
}
moduleHelper.send(`${functionName}Callback`, JSON.stringify({
callbackId, type: 'success', res: JSON.stringify(res),
}));
@ -234,7 +240,7 @@ export default {
},
WX_SyncFunction_t(functionName, returnType) {
const res = WX_SyncFunction(functionName);
if (onlyReadyResponse.includes(functionName.replace(/^\w/, (a) => a.toLowerCase()))) {
if (onlyReadResponse.includes(functionName.replace(/^\w/, (a) => a.toLowerCase()))) {
formatResponse(returnType, JSON.parse(JSON.stringify(res)));
return JSON.stringify(res);
}
@ -391,6 +397,10 @@ export default {
WX_ClassOneWayNoFunction(className, functionName, id);
},
WX_ClassOneWayNoFunction_vs(className, functionName, id, param1) {
if (needParseJson.includes(className + functionName)) {
// eslint-disable-next-line no-param-reassign
param1 = JSON.parse(param1);
}
WX_ClassOneWayNoFunction(className, functionName, id, param1);
},
WX_ClassOneWayNoFunction_t(className, functionName, returnType, id) {

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 6dfce273319247211b01c5db76e8f2db
guid: 3931e94a9a6e9d1bb0de4ac363fb4700
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a8c0220ce988dbec31da869147ff9f5c
guid: 7dddbbd4f22e298d3dbe5bc66611b1e3
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: b38e24ae3c8ededbbf1b8a53fe8ca90e
guid: e8b2ed12b836b181a75d6717904a2e21
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 31ab12a80eba97b2d95a327c46633795
guid: d1685c33c5557235b81d166a7c9da753
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 9a19122a2d5ab3228911ecdec67e0e6b
guid: 3f3b888b20d592dd43795ffeffa47925
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: e9542ca117142ed4691a8424c43f8e03
guid: c300925b20281056cb4107972a2a6293
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 7376c5c8a55f9ae12b88b182a7371f72
guid: 4d3d09be774dee076883c3a87a2789c4
DefaultImporter:
externalObjects: {}
userData:

View File

@ -18,32 +18,27 @@ export default {
if (!obj) {
return;
}
if (key === 'x' || key === 'y' || key === 'width' || key === 'height') {
if (key === 'x' || key === 'y' || key === 'width' || key === 'height' || key === 'initialTime' || key === 'playbackRate') {
obj[key] = +value;
}
else if (key === 'src' || key === 'poster') {
else if (key === 'src' || key === 'poster' || key === 'objectFit' || key === 'backgroundColor') {
obj[key] = value;
}
},
WXVideoPlay(id) {
const obj = getObject(id);
if (!obj) {
return;
else if (key === 'live' || key === 'controls' || key === 'showProgress' || key === 'showProgressInControlMode'
|| key === 'autoplay' || key === 'loop' || key === 'muted' || key === 'obeyMuteSwitch'
|| key === 'enableProgressGesture' || key === 'enablePlayGesture' || key === 'showCenterPlayBtn') {
obj[key] = value === 'True';
}
obj.play();
},
WXVideoAddListener(id, key) {
const obj = getObject(id);
if (!obj) {
return;
}
obj[key]((e) => {
getObject(id)?.[key]((e) => {
moduleHelper.send('OnVideoCallback', JSON.stringify({
callbackId: id,
errMsg: key,
position: e && e.position,
buffered: e && e.buffered,
duration: e && e.duration,
type: key,
position: e?.position,
buffered: e?.buffered ? Number(e.buffered) : undefined,
duration: e?.duration,
errMsg: e?.errMsg,
}));
if (key === 'onError') {
GameGlobal.enableTransparentCanvas = false;
@ -51,54 +46,31 @@ export default {
}
});
},
WXVideoDestroy(id) {
const obj = getObject(id);
if (!obj) {
return;
}
obj.destroy();
GameGlobal.enableTransparentCanvas = false;
WXVideoRemoveListener(id, key) {
getObject(id)?.[key]();
},
WXVideoExitFullScreen(id) {
const obj = getObject(id);
if (!obj) {
return;
WXVideoDestroy(id, isLast) {
getObject(id)?.destroy();
if (isLast) {
GameGlobal.enableTransparentCanvas = false;
}
obj.exitFullScreen();
},
WXVideoPlay(id) {
getObject(id)?.play();
},
WXVideoPause(id) {
const obj = getObject(id);
if (!obj) {
return;
}
obj.pause();
},
WXVideoRequestFullScreen(id, direction) {
const obj = getObject(id);
if (!obj) {
return;
}
obj.requestFullScreen(direction);
},
WXVideoSeek(id, time) {
const obj = getObject(id);
if (!obj) {
return;
}
obj.seek(time);
getObject(id)?.pause();
},
WXVideoStop(id) {
const obj = getObject(id);
if (!obj) {
return;
}
obj.stop();
getObject(id)?.stop();
},
WXVideoRemoveListener(id, key) {
const obj = getObject(id);
if (!obj) {
return;
}
obj[key]();
WXVideoSeek(id, time) {
getObject(id)?.seek(time);
},
WXVideoRequestFullScreen(id, direction) {
getObject(id)?.requestFullScreen(direction);
},
WXVideoExitFullScreen(id) {
getObject(id)?.exitFullScreen();
},
};

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: b67259a2a1eda485f99582328a77cc8f
guid: ff24227016a80c44cabcfff86c9eba2c
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 703f790f6a46f8c07341b9f0ce19a41e
guid: 75049e3ea0f5fb21a044f0790d93f78c
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 66668b0ef6bfa30ce93254284e7d324d
guid: 112d3acecf2c2d3e76e382e1516bffa6
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 706b9c34ab1d22e57c6878d484edd7e9
guid: 48eac26ba0e003b76c59191af315976c
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: d408eea5fbf6dad25e60396a073f857a
guid: b55b376deeb7fd35c2d61763a6eb94cf
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: fbf60d81366b8df616060f6372a30c4d
guid: d201d2da0b7210046e3dd4dafc3bee54
DefaultImporter:
externalObjects: {}
userData:

View File

@ -45,7 +45,7 @@ const isIOSWebgl2SystemVersionValid = compareVersion(systemVersion, '15.0') || G
// Android客户端版本>=8.0.19支持webgl2
const isAndroidWebGL2ClientVersionValid = compareVersion(version, '8.0.19');
// 是否用了webgl2
const isWebgl2 = () => GameGlobal.managerConfig.contextConfig.contextType === 2 || GameGlobal.managerConfig.contextConfig.contextType === 4;
const isWebgl2 = () => GameGlobal.managerConfig.contextConfig.contextType === 2;
// 是否支持BufferURL
export const isSupportBufferURL = !isPc
&& (isH5Renderer

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 45e32c43dfc7cb96e40eef6a68193bb6
guid: d4841884d25b4d7a913579fe06807e70
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 656023e78b8a935e96194de9930417ce
guid: 92b929afdd3b61035d5ee3dd5f544566
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 22a31d2bfe85b716cd3ae3e8200ecebc
guid: 3441a9d8266d1de0622e53d2c9233e37
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a9cf64412a7d7b8ec7a59d3dd4bf2eb8
guid: 2dcd45419e3a2cc5c70d6913c564d8b4
DefaultImporter:
externalObjects: {}
userData:

View File

@ -52,7 +52,6 @@ checkVersion().then((enable) => {
canvas,
events: GameGlobal.events,
WXWASMSDK: GameGlobal.WXWASMSDK,
wxEnv: wx.env ?? {},
},
}).default;
}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: feb865f663fa4337eaa5eb7549a451f0
guid: 9f63435c27ab45db9ec522d3661a50f9
DefaultImporter:
externalObjects: {}
userData:

View File

@ -23,7 +23,7 @@
],
"plugins": {
"UnityPlugin": {
"version": "1.2.79",
"version": "1.2.84",
"provider": "wxe5a48f1ed5f544b7",
"contexts": [
{

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 2c30f2339ef1062f86af1c2bbbfe30cd
guid: b5a7d427f1fdd695677ac81dd37fc277
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 33c95bf0e29f850323776bf30f84ff6c
guid: ba062be135697115ff2f54f896a5f1bb
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: b1098892585d27c7d88772d527d6ee6a
guid: f0e4e9c31353ac1d378830265c8576f2
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: ad0116e5329292ff9cf9be0f56c8f27b
guid: a2bf96db01f61cd6e21aed0bba9159cb
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: cb03cce392e4c0970c8193061434f44b
guid: 313ee1ed64ea2ec2eced41c4fa02e6af
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: e43488df5e9a4ff583e00975af4424b7
guid: 514743131046fe0e9673c0ac58554dd5
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: d7be03f2c26ba6424a0969088c0fae2b
guid: 8cfb75c9fd8da3ae41d4c616583805ba
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 589f94ccc9c039c76c855726307f4e4f
guid: 0083d22ee3e1984b6c1e5a5c0f55f785
DefaultImporter:
externalObjects: {}
userData:

Some files were not shown because too many files have changed in this diff Show More