Auto-publish.

This commit is contained in:
rainhong 2025-07-24 11:52:55 +08:00
parent 9090d7c510
commit 323450e40d
152 changed files with 970 additions and 600 deletions

8
Editor/BuildProfile.meta Normal file
View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: DytLvSj8UC9CKob0XUy9Y3usKDmX8US1YgxYmBxa1iAZ/I8JbM5wZwE=
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: XSwesi78AS28ymfR2HEhHpEBAC2DHupI1hIKP7HApjHRaZgGw+DTwWI=
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: c113acfee35db6b5c61fd4a76596cfd3
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,43 @@
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);
//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);
if(!isSync){
mtl.batchRenderAsync(merged.buffer, extBuffer);
return null;
}
const result = mtl.batchRender(merged.buffer, extBuffer).buffer;
if(result.byteLength == 0){
return null;;
}
// 申请内存空间,后续在cpp wasm部分使用记得释放
const ptr = Module._malloc(result.byteLength);
// 将数据拷贝到WASM内存
Module.HEAPU8.set(new Uint8Array(result), ptr);
// 返回结构化的数据信息(指针和长度)
const ret = new DataView(new ArrayBuffer(8));
ret.setUint32(0, ptr, true); // 指针地址4字节
ret.setUint32(4, result.byteLength, true); // 数据长度4字节
// 返回合并后的8字节缓冲区指针记得也要在cpp部分释放
const retPtr = Module._malloc(8);
Module.HEAPU8.set(new Uint8Array(ret.buffer), retPtr);
return retPtr;
},
js_swapWindow: function(){
mtl.swapWindow();
}
});

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: dda1926f3454e003333e8085a4f2c0fd
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -99,6 +99,14 @@ namespace WeChatWASM
#endif
}
}
// 是否使用 iOS Metal 渲染
public static bool UseiOSMetal
{
get
{
return config.CompileOptions.enableiOSMetal;
}
}
// public static void SetPlayableEnabled(bool enabled)
// {
// isPlayableBuild = enabled;
@ -112,9 +120,12 @@ namespace WeChatWASM
CheckBuildTarget();
Init();
// 可能有顺序要求?如果没要求,可挪到此函数外
if (!isPlayableBuild) {
if (!isPlayableBuild)
{
ProcessWxPerfBinaries();
}
// iOS metal 的相关特性
ProcessWxiOSMetalBinaries();
MakeEnvForLuaAdaptor();
// JSLib
SettingWXTextureMinJSLib();
@ -400,6 +411,41 @@ 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;
@ -523,6 +569,20 @@ namespace WeChatWASM
GraphicsDeviceType[] targets = new GraphicsDeviceType[] { };
#if PLATFORM_WEIXINMINIGAME
PlayerSettings.SetUseDefaultGraphicsAPIs(BuildTarget.WeixinMiniGame, false);
// 启用 iOS Metal 渲染
if (UseiOSMetal)
{
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 });
}
}
else
{
if (config.CompileOptions.Webgl2)
{
PlayerSettings.SetGraphicsAPIs(BuildTarget.WeixinMiniGame, new GraphicsDeviceType[] { GraphicsDeviceType.OpenGLES3 });
@ -531,6 +591,7 @@ namespace WeChatWASM
{
PlayerSettings.SetGraphicsAPIs(BuildTarget.WeixinMiniGame, new GraphicsDeviceType[] { GraphicsDeviceType.OpenGLES2 });
}
}
#else
PlayerSettings.SetUseDefaultGraphicsAPIs(BuildTarget.WebGL, false);
if (config.CompileOptions.Webgl2)
@ -1194,7 +1255,8 @@ namespace WeChatWASM
public static void convertDataPackageJS()
{
if (!isPlayableBuild) {
if (!isPlayableBuild)
{
checkNeedRmovePackageParallelPreload();
}
@ -1650,7 +1712,8 @@ namespace WeChatWASM
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) {
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);
@ -1904,7 +1967,7 @@ namespace WeChatWASM
config.ProjectConf.bundleHashLength.ToString(),
bundlePathIdentifierStr,
excludeFileExtensionsStr,
config.CompileOptions.Webgl2 ? "2" : "1",
config.CompileOptions.enableiOSMetal ? "5" : (config.CompileOptions.Webgl2 ? "2" : "1"),
Application.unityVersion,
WXExtEnvDef.pluginVersion,
config.ProjectConf.dataFileSubPrefix,
@ -1956,7 +2019,8 @@ namespace WeChatWASM
List<Rule> replaceList = new List<Rule>(replaceArrayList);
List<string> files = new List<string> { "game.js", "game.json", "project.config.json", "unity-namespace.js", "check-version.js", "unity-sdk/font/index.js" };
if (isPlayableBuild) {
if (isPlayableBuild)
{
files = new List<string> { "game.js", "game.json", "project.config.json", "unity-namespace.js", "check-version.js" };
}

View File

@ -185,6 +185,7 @@ namespace WeChatWASM
this.formCheckbox("profilingMemory", "Profiling Memory");
this.formCheckbox("webgl2", "WebGL2.0(beta)");
this.formCheckbox("iOSPerformancePlus", "iOSPerformancePlus(?)", "是否使用iOS高性能+渲染方案有助于提升渲染兼容性、降低WebContent进程内存");
// this.formCheckbox("iOSMetal", "iOSMetal(?)", "是否使用iOSMetal渲染方案需要开启iOS高性能+模式有助于提升运行性能降低iOS功耗");
this.formCheckbox("deleteStreamingAssets", "Clear Streaming Assets");
this.formCheckbox("cleanBuild", "Clean WebGL Build");
// this.formCheckbox("cleanCloudDev", "Clean Cloud Dev");
@ -447,6 +448,7 @@ namespace WeChatWASM
this.setData("customNodePath", config.CompileOptions.CustomNodePath);
this.setData("webgl2", config.CompileOptions.Webgl2);
this.setData("iOSPerformancePlus", config.CompileOptions.enableIOSPerformancePlus);
this.setData("iOSMetal", config.CompileOptions.enableiOSMetal);
this.setData("fbslim", config.CompileOptions.fbslim);
this.setData("useFriendRelation", config.SDKOptions.UseFriendRelation);
this.setData("useMiniGameChat", config.SDKOptions.UseMiniGameChat);
@ -525,6 +527,7 @@ namespace WeChatWASM
config.CompileOptions.CustomNodePath = this.getDataInput("customNodePath");
config.CompileOptions.Webgl2 = this.getDataCheckbox("webgl2");
config.CompileOptions.enableIOSPerformancePlus = this.getDataCheckbox("iOSPerformancePlus");
config.CompileOptions.enableiOSMetal = this.getDataCheckbox("iOSMetal");
config.CompileOptions.fbslim = this.getDataCheckbox("fbslim");
config.SDKOptions.UseFriendRelation = this.getDataCheckbox("useFriendRelation");
config.SDKOptions.UseMiniGameChat = this.getDataCheckbox("useMiniGameChat");

View File

@ -125,6 +125,10 @@ namespace WeChatWASM
{
return WXConvertCore.UseIL2CPP;
});
WXExtEnvDef.RegisterAction("WXConvertCore.UseiOSMetal", (args) =>
{
return WXConvertCore.UseiOSMetal;
});
WXExtEnvDef.RegisterAction("UnityUtil.GetWxSDKRootPath", (args) =>
{
#if UNITY_2018

View File

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

Binary file not shown.

View File

@ -648,6 +648,11 @@
是否使用iOS高性能Plus
</summary>
</member>
<member name="F:WeChatWASM.CompileOptions.enableiOSMetal">
<summary>
是否使用iOS metal指令流
</summary>
</member>
<member name="F:WeChatWASM.CompileOptions.brotliMT">
<summary>
是否使用brotli多线程压缩

View File

@ -419,8 +419,8 @@ mergeInto(LibraryManager.library, {
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));

Binary file not shown.

View File

@ -3109,6 +3109,100 @@
 是否结束
</summary>
</member>
<member name="F:WeChatWASM.VirtualPaymentError.errMsg">
错误信息
| 错误码 | 错误信息 | 说明 |
| - | - | - |
| 1001 | | 参数错误 |
| -1 | | 支付失败 |
| -2 | | 支付取消 |
| -4 | | 风控拦截 |
| -5 | | 开通签约结果未知 |
| -15001 | | 参数错误,具体原因见err_msg |
| -15002 | | outTradeNo重复使用,请换新单号重试 |
| -15003 | | 系统错误 |
| -15004 | | currencyType错误,目前只能填CNY |
| -15005 | | 用户态签名signature错误 |
| -15006 | | 支付签名paySig错误 |
| -15007 | | session_key过期 |
| -15008 | | 二级商户进件未完成 |
| -15009 | | 代币未发布 |
| -15010 | | 道具productId未发布 |
| -15011 | | 现网版本的env只能是0,不能填1(沙盒环境) |
| -15012 | | 调用米大师失败导致关单,请换新单号重试 |
| -15013 | | goodsPrice道具价格错误 |
| -15014 | | 道具/代币发布未生效禁止下单大概10分钟后生效 |
| -15016 | | signData格式有问题 |
| -15017 | | 此商家涉嫌违规,收款功能已被限制,暂无法支付。商家可以登录微信商户平台/微信支付商家助手小程序查看原因和解决方案 |
| -15018 | | 代币或者道具productId审核不通过 |
| -15019 | | 调微信报商户受限,商家可以登录微信商户平台/微信支付商家助手小程序查看原因和解决方案 |
| -15020 | | 操作过快,请稍候再试 |
| -15021 | | 小程序被限频交易 |
</member>
<member name="F:WeChatWASM.VirtualPaymentError.errCode">
错误码
| 错误码 | 错误信息 | 说明 |
| - | - | - |
| 1001 | | 参数错误 |
| -1 | | 支付失败 |
| -2 | | 支付取消 |
| -4 | | 风控拦截 |
| -5 | | 开通签约结果未知 |
| -15001 | | 参数错误,具体原因见err_msg |
| -15002 | | outTradeNo重复使用,请换新单号重试 |
| -15003 | | 系统错误 |
| -15004 | | currencyType错误,目前只能填CNY |
| -15005 | | 用户态签名signature错误 |
| -15006 | | 支付签名paySig错误 |
| -15007 | | session_key过期 |
| -15008 | | 二级商户进件未完成 |
| -15009 | | 代币未发布 |
| -15010 | | 道具productId未发布 |
| -15011 | | 现网版本的env只能是0,不能填1(沙盒环境) |
| -15012 | | 调用米大师失败导致关单,请换新单号重试 |
| -15013 | | goodsPrice道具价格错误 |
| -15014 | | 道具/代币发布未生效禁止下单大概10分钟后生效 |
| -15016 | | signData格式有问题 |
| -15017 | | 此商家涉嫌违规,收款功能已被限制,暂无法支付。商家可以登录微信商户平台/微信支付商家助手小程序查看原因和解决方案 |
| -15018 | | 代币或者道具productId审核不通过 |
| -15019 | | 调微信报商户受限,商家可以登录微信商户平台/微信支付商家助手小程序查看原因和解决方案 |
| -15020 | | 操作过快,请稍候再试 |
| -15021 | | 小程序被限频交易 |
</member>
<member name="F:WeChatWASM.RequestVirtualPaymentFailCallbackErr.errCode">
错误码
</member>
<member name="F:WeChatWASM.RequestVirtualPaymentFailCallbackErr.errMsg">
错误信息
</member>
<member name="F:WeChatWASM.RequestCommonPaymentSuccessCallbackResult.errMsg">
调用成功信息
</member>
<member name="F:WeChatWASM.RequestVirtualPaymentOption.mode">
<summary>
支付的类型, 不同的支付类型有各自额外要传的附加参数
可选值:
- 'short_series_goods': 道具直购;
- 'short_series_coin': 代币充值;
</summary>
</member>
<member name="F:WeChatWASM.RequestVirtualPaymentOption.paySig">
<summary>
支付签名, 详见[《签名详解》](https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/virtual-payment.html)
</summary>
</member>
<member name="F:WeChatWASM.RequestVirtualPaymentOption.signData">
<summary>
具体支付参数见signData, 该参数需以string形式传递, 例如signData: '{"offerId":"123","buyQuantity":1,"env":0,"currencyType":"CNY","productId":"testproductId","goodsPrice":10,"outTradeNo":"xxxxxx","attach":"testdata"}'
</summary>
</member>
<member name="F:WeChatWASM.RequestVirtualPaymentOption.signature">
<summary>
用户态签名, 详见[《签名详解》](https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/virtual-payment.html)
</summary>
</member>
<member name="F:WeChatWASM.Gamepad.axes">
<summary>
一个表示控制器设备上存在的坐标轴的数组 (比如控制器摇杆)。
@ -8575,12 +8669,12 @@
取消监听视频播放到末尾事件
</summary>
</member>
<member name="M:WeChatWASM.WXVideo.OnError(System.Action)">
<member name="M:WeChatWASM.WXVideo.OnError(System.Action{WeChatWASM.WXVideoError})">
<summary>
监听视频错误事件
</summary>
</member>
<member name="M:WeChatWASM.WXVideo.OffError(System.Action)">
<member name="M:WeChatWASM.WXVideo.OffError(System.Action{WeChatWASM.WXVideoError})">
<summary>
取消监听视频错误事件,action 为空表示移除全部事件监听
</summary>

Binary file not shown.

View File

@ -3115,6 +3115,100 @@
 是否结束
</summary>
</member>
<member name="F:WeChatWASM.VirtualPaymentError.errMsg">
错误信息
| 错误码 | 错误信息 | 说明 |
| - | - | - |
| 1001 | | 参数错误 |
| -1 | | 支付失败 |
| -2 | | 支付取消 |
| -4 | | 风控拦截 |
| -5 | | 开通签约结果未知 |
| -15001 | | 参数错误,具体原因见err_msg |
| -15002 | | outTradeNo重复使用,请换新单号重试 |
| -15003 | | 系统错误 |
| -15004 | | currencyType错误,目前只能填CNY |
| -15005 | | 用户态签名signature错误 |
| -15006 | | 支付签名paySig错误 |
| -15007 | | session_key过期 |
| -15008 | | 二级商户进件未完成 |
| -15009 | | 代币未发布 |
| -15010 | | 道具productId未发布 |
| -15011 | | 现网版本的env只能是0,不能填1(沙盒环境) |
| -15012 | | 调用米大师失败导致关单,请换新单号重试 |
| -15013 | | goodsPrice道具价格错误 |
| -15014 | | 道具/代币发布未生效禁止下单大概10分钟后生效 |
| -15016 | | signData格式有问题 |
| -15017 | | 此商家涉嫌违规,收款功能已被限制,暂无法支付。商家可以登录微信商户平台/微信支付商家助手小程序查看原因和解决方案 |
| -15018 | | 代币或者道具productId审核不通过 |
| -15019 | | 调微信报商户受限,商家可以登录微信商户平台/微信支付商家助手小程序查看原因和解决方案 |
| -15020 | | 操作过快,请稍候再试 |
| -15021 | | 小程序被限频交易 |
</member>
<member name="F:WeChatWASM.VirtualPaymentError.errCode">
错误码
| 错误码 | 错误信息 | 说明 |
| - | - | - |
| 1001 | | 参数错误 |
| -1 | | 支付失败 |
| -2 | | 支付取消 |
| -4 | | 风控拦截 |
| -5 | | 开通签约结果未知 |
| -15001 | | 参数错误,具体原因见err_msg |
| -15002 | | outTradeNo重复使用,请换新单号重试 |
| -15003 | | 系统错误 |
| -15004 | | currencyType错误,目前只能填CNY |
| -15005 | | 用户态签名signature错误 |
| -15006 | | 支付签名paySig错误 |
| -15007 | | session_key过期 |
| -15008 | | 二级商户进件未完成 |
| -15009 | | 代币未发布 |
| -15010 | | 道具productId未发布 |
| -15011 | | 现网版本的env只能是0,不能填1(沙盒环境) |
| -15012 | | 调用米大师失败导致关单,请换新单号重试 |
| -15013 | | goodsPrice道具价格错误 |
| -15014 | | 道具/代币发布未生效禁止下单大概10分钟后生效 |
| -15016 | | signData格式有问题 |
| -15017 | | 此商家涉嫌违规,收款功能已被限制,暂无法支付。商家可以登录微信商户平台/微信支付商家助手小程序查看原因和解决方案 |
| -15018 | | 代币或者道具productId审核不通过 |
| -15019 | | 调微信报商户受限,商家可以登录微信商户平台/微信支付商家助手小程序查看原因和解决方案 |
| -15020 | | 操作过快,请稍候再试 |
| -15021 | | 小程序被限频交易 |
</member>
<member name="F:WeChatWASM.RequestVirtualPaymentFailCallbackErr.errCode">
错误码
</member>
<member name="F:WeChatWASM.RequestVirtualPaymentFailCallbackErr.errMsg">
错误信息
</member>
<member name="F:WeChatWASM.RequestCommonPaymentSuccessCallbackResult.errMsg">
调用成功信息
</member>
<member name="F:WeChatWASM.RequestVirtualPaymentOption.mode">
<summary>
支付的类型, 不同的支付类型有各自额外要传的附加参数
可选值:
- 'short_series_goods': 道具直购;
- 'short_series_coin': 代币充值;
</summary>
</member>
<member name="F:WeChatWASM.RequestVirtualPaymentOption.paySig">
<summary>
支付签名, 详见[《签名详解》](https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/virtual-payment.html)
</summary>
</member>
<member name="F:WeChatWASM.RequestVirtualPaymentOption.signData">
<summary>
具体支付参数见signData, 该参数需以string形式传递, 例如signData: '{"offerId":"123","buyQuantity":1,"env":0,"currencyType":"CNY","productId":"testproductId","goodsPrice":10,"outTradeNo":"xxxxxx","attach":"testdata"}'
</summary>
</member>
<member name="F:WeChatWASM.RequestVirtualPaymentOption.signature">
<summary>
用户态签名, 详见[《签名详解》](https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/virtual-payment.html)
</summary>
</member>
<member name="F:WeChatWASM.Gamepad.axes">
<summary>
一个表示控制器设备上存在的坐标轴的数组 (比如控制器摇杆)。
@ -8581,12 +8675,12 @@
取消监听视频播放到末尾事件
</summary>
</member>
<member name="M:WeChatWASM.WXVideo.OnError(System.Action)">
<member name="M:WeChatWASM.WXVideo.OnError(System.Action{WeChatWASM.WXVideoError})">
<summary>
监听视频错误事件
</summary>
</member>
<member name="M:WeChatWASM.WXVideo.OffError(System.Action)">
<member name="M:WeChatWASM.WXVideo.OffError(System.Action{WeChatWASM.WXVideoError})">
<summary>
取消监听视频错误事件,action 为空表示移除全部事件监听
</summary>

View File

@ -1126,6 +1126,15 @@ namespace WeChatWASM
{
WXSDKManagerHandler.Instance.NotifyMiniProgramPlayableStatus(option);
}
#endregion
#region
/// <summary>
/// 请求虚拟支付
/// </summary>
public static void RequestVirtualPayment(RequestVirtualPaymentOption option)
{
WXSDKManagerHandler.Instance.RequestVirtualPayment(option);
}
#endregion
}
}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 0b402e77a1e32407ab43026b35db3f2f
guid: 86cc56dc16ace72f4d9aa3c96ccb2cb1
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 0d4d8eae711f70671e8af2df78e40d5c
guid: 86beefc22a745c091ddfa63ba4232188
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: f47355397dc8d5859f5d8369d0cc6f13
guid: 1ce01ccfffeca614c1199fb47081874c
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 39c0a0082c5fc9259282cbff0518e828
guid: c7c56a35d0b466be65b8bf0b13374430
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 129c449558e1572d22d05e1eaccb4b4e
guid: cb8b37a6bd788f03d91430aebfe5fabe
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 692360a9bbe08903fc19f158a57ba4e0
guid: 856cf40cc8aa8c46f28bc5838f0d0ac2
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: e91d3a975af852db45d4bc034e222abf
guid: 58fefea9de5bbf73736ae93821a08390
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 5d8df9369bc1089131cad15a424beb96
guid: f3d482929b9086a8daf1fe47fec392ce
DefaultImporter:
externalObjects: {}
userData:

View File

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

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 795b78ca6116a9261ed082e57fa5dddd
guid: 852c00d8327f8f6d665c00f7e57f41c0
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: c81ff0b506de7764561e45bcd4fe984a
guid: 2d9f82d22055dcf550525ff1a96c6346
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 406e27bc9eed040c0701005d7cc5a539
guid: fa5e1f60a38487d2988c20593c7d8e06
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 919474b046ef9daf691b50a5ba4ed016
guid: 6e214cba005a1bced63599364f365b8f
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 02f8a03a590c56ac22a9013f81947308
guid: 9b953376d3f19edf1686eb8e258c5012
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 7ed307f0fbac5f264a74607f162d64d2
guid: 7452b4c8b3c442136c0e36de1aec7e63
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 7b56155e9bd09de979130dd0a3932c51
guid: 66b538606086917b67560a6311044707
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 76fbf977f56ee3685ab55b05cf7d1652
guid: e89cbb04b1b52c30454cddaa37506438
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 1ce61dd0242988ca3a1e57274ad89108
guid: c1e95aa320cc063c108e228a753a4287
DefaultImporter:
externalObjects: {}
userData:

View File

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

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 88230c6986d48139d0aad929c531c57c
guid: ccb9fb9f5709c7cf6313e3479daa1dfe
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: d62619bb5c4437c80b99adb0e74e54ae
guid: 1a279f80cd255a792e3d98f36aa07c6b
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 59967a594916e13ec1eafd7b1327812f
guid: cb44277bbdb66d96140af30fd348d65f
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 360552244434d54355b95ae1eaefbe38
guid: 829d7be669866433a75a11fe14d50fd2
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a62d4b63bb75a9eeee5605396e540b02
guid: fc8ecfa955a9fa2102075fdc803897a9
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: f527f6f82687765714a0fc9e23d4d056
guid: 4856f42eae498a93e1d3d1c03e799282
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a98fcb4d4e3d8a9845f90a4ef426d726
guid: 188e04d498ee21449f85b0df4054d908
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 26230df9d28c33a1e887f00d467fe0e5
guid: f1f26b651e3548aafefb2b6f26ff4f3a
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 9a88ee12602d3f2ba22f1ca96e2bdbb1
guid: 67fee6b9fac9aa3990ee454dbcdf647c
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 6ea931499f35dab85e803d2b4096e8fc
guid: 7df623d0f1fbc924efb81d36cabced4c
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 9b3217ee602811fc18af907517443b38
guid: 8edba4cb6925bc712239050c3c74efa9
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: c0f59b0590674b0751f05117caa59891
guid: 2258b243bf834e811dbe079b559036c5
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 1889e82bc569091b2b97c7a8639ab06a
guid: 242264843d2217863095ef8be4390cd0
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 6ec5f6a51ada5608131faac8c8dbae2e
guid: 26c0bc2f66e769228a2a37fdb24f2c74
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 991b87812c69bae9654ea0e602cf5d17
guid: 2283e83d2ad1253a981770bd11ae5bc0
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a8c70eace40359290bc332a8bac1367d
guid: 45867668e9336da658a53574613cfad3
DefaultImporter:
externalObjects: {}
userData:

View File

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

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 1db8d7c90690f5f090d138da313af789
guid: 109d45fc7fd4be7113eef7cdfe29e23a
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 20ec07504fb82ea4898cfe65595929fc
guid: 952896a73d84ab95645f529a8d1ecc15
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 0c5cf13c775753db345267d47289153b
guid: 26f35d03874d05d9baf4c03d1a0acdae
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 71976a68819a23958b538948709a053c
guid: 087e9b81aa26d1343ecf0f8a62e442c0
DefaultImporter:
externalObjects: {}
userData:

View File

@ -18,12 +18,15 @@ export default {
if (!obj) {
return;
}
if (key === 'x' || key === 'y' || key === 'width' || key === 'height') {
if (key === 'x' || key === 'y' || key === 'width' || key === 'height' || key === 'playbackRate' || key === 'initialTime') {
obj[key] = +value;
}
else if (key === 'src' || key === 'poster') {
obj[key] = value;
}
else if (key === 'loop' || key === 'muted') {
obj[key] = value === 'true';
}
},
WXVideoPlay(id) {
const obj = getObject(id);
@ -40,10 +43,11 @@ export default {
obj[key]((e) => {
moduleHelper.send('OnVideoCallback', JSON.stringify({
callbackId: id,
errMsg: key,
type: key,
position: e && e.position,
buffered: e && e.buffered,
duration: e && e.duration,
errMsg: e && e.errMsg,
}));
if (key === 'onError') {
GameGlobal.enableTransparentCanvas = false;

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: aefb9b8071495ba38389dd1e5553ed32
guid: e53e0023183229aaf1e926e7fd62d2df
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 762d8d5fabf8836673d14fe22672e80f
guid: d3718529b4ad9c38a6012d22cfeeaeaf
DefaultImporter:
externalObjects: {}
userData:

View File

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

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: addf75d548edb49aa853d3ea87f9798d
guid: e118f4c01aa409ba70ef7a0621e37f8b
DefaultImporter:
externalObjects: {}
userData:

View File

@ -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的使用
export const isSupportSharedCanvasMode = compareVersion(SDKVersion, '3.6.6');
// 是否支持开放数据域渲染模式使用ScreenCanvas模式可以优化ToTempFilePath的使用PC 上 ScreenCanvas 模式事件处理有问题PC 先禁止这个模式
export const isSupportSharedCanvasMode = compareVersion(SDKVersion, '3.6.6') && !isPc;
// 是否能以iOS高性能模式运行
// 请勿修改GameGlobal.canUseH5Renderer赋值
GameGlobal.canUseH5Renderer = isH5Renderer && isH5LibVersionValid;

View File

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

View File

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

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: abe3b3fa43b72f04d14694b2513d1882
guid: 168456a36e428f227aedddaeb8514bc7
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: b47fd73222b10c64353a408656895728
guid: 09e04be65ddc9f059f2f524d54e5c025
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 91a22a1323c3d28f7f5cb135a0946a19
guid: b17484b7b91a60d3d3690f727ad1d273
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: d7fc8c4ae43042abb298c7c25ddfa63e
guid: 67c93ad77b482c5b8147aa93bc6d1407
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 3d79f33bef21c0bb9c0b9bde81456999
guid: 08ae9d03dc43a2f0ffd41c68e732a002
DefaultImporter:
externalObjects: {}
userData:

View File

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

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 504b736e668772651a67c2ea377a925f
guid: 2a7f956b89588664b1043083cbc797e2
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: c98fcfacef696dad78264c3c6c97f1f2
guid: 5505006745cb60148181fb39edcf60a5
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 58d6de98b381654340f95b2191afc4eb
guid: 9a84adbaa7a9dc2e5bc593352f81c2e8
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a69dcfe5dfaf3a8fdfd04d87e88654c1
guid: e473cff1afbf2585721425e248d84353
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 5a0a03135021596136e9a5aa342c7eb4
guid: 082138fade4dd01a450366d721aa90a9
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 230d16020e58bc34736d233567700249
guid: fd7a26c8143e2f54165b90a647e75452
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 8608ee4dd726bb10d1d8f0531ca475eb
guid: 1d9410f32b08708340a684f5313c8694
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 8112429034873a386c1a4c3218a4c3f3
guid: 2b746771ad8fac0e2d4129cd6ef3ae0f
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: e8bacb303e8af9fdf406eafd4e35cd77
guid: 5edb4a8c9de7c8036c250bc704c03a4c
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 8f620115fdfbc88084837d9bf9046317
guid: 739b80f498602fc31fb82cfb81b71a8d
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: ef8802c445b97092844698b5b0bebe79
guid: 2f92c32e92e2202d965e82343d7c9a6a
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: b9667dbf1c08396c0b52f5541eaf1d10
guid: df3d29ec19a8030ef936cdde6f59f642
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 05b37b4d47a3ea78902777fc8d421acb
guid: d2c30a36853d7c5994d2023db7de1c8c
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 236b28bfd47cff2bb463223be3747d17
guid: 61e519032e0214eac608a25da79ff48d
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 27c8b8dd9a99e24d78520f27a92545d6
guid: 785fd7abea772e05f5989a988a16044e
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 63311f1eb758cbc639e55fb36a7ac79b
guid: 42faf4213e4210e775fbe95fa0789940
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 00f41691cb4cc5c09ba38b3d9a563bf2
guid: ca5d4b61ca4cef7fab289e223ae214be
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 19ebec93a0396166ee52308b80ec37aa
guid: 23f791fecd06a1ec03da290325e840e2
DefaultImporter:
externalObjects: {}
userData:

View File

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

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 492aaedd32d949adc6ed91920c7aefb3
guid: d0f70684bcdeab09fea9774ed271d169
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 6db14c268abc77b96ce30e715f822e26
guid: 559b09520775f20fcd7e417ffbbfb522
DefaultImporter:
externalObjects: {}
userData:

View File

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

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: b3654990a42299dbf2080234c707706d
guid: e97ccd158f5a590cb5f3c8ecf93595d4
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 44978f8f5badd7425408f11b8f3bcbf4
guid: d9b587492c3079aedee085a9df7171e4
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 1a91da4b56e73573d8ff0f4b071cf655
guid: 1e0408e9a1485f5f34375f80bb4b9fca
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 4c46553cd305a263f5651ca29d6a6eee
guid: 88637075ad84c5c5d28af2f3cf274dd1
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 026aae7855b5a837bfec28d9c9b497e4
guid: 17f2e49a7b0bcdc814c0048a278bd20b
DefaultImporter:
externalObjects: {}
userData:

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