Auto-publish.

This commit is contained in:
rainhong 2025-07-25 17:52:02 +08:00
parent 560ad77079
commit 903744cc60
184 changed files with 1191 additions and 945 deletions

View File

@ -1379,8 +1379,7 @@ namespace WeChatWASM
var buildTemplate = new BuildTemplate( var buildTemplate = new BuildTemplate(
Path.Combine(UnityUtil.GetWxSDKRootPath(), "Runtime", defaultTemplateDir), Path.Combine(UnityUtil.GetWxSDKRootPath(), "Runtime", defaultTemplateDir),
Path.Combine(Application.dataPath, "WX-WASM-SDK-V2", "Editor", "template"), Path.Combine(Application.dataPath, "WX-WASM-SDK-V2", "Editor", "template"),
Path.Combine(config.ProjectConf.DST, miniGameDir), Path.Combine(config.ProjectConf.DST, miniGameDir)
true
); );
buildTemplate.start(); buildTemplate.start();
// FIX: 2021.2版本生成symbol有bug导出时生成symbol报错有symbol才copy // FIX: 2021.2版本生成symbol有bug导出时生成symbol报错有symbol才copy
@ -1519,7 +1518,7 @@ namespace WeChatWASM
var shortFilename = filename.Substring(filename.IndexOf('.') + 1); var shortFilename = filename.Substring(filename.IndexOf('.') + 1);
// 如果code没有发生过变化且压缩方式不变则不再进行br压缩 // 如果code没有发生过变化且压缩方式不变则不再进行br压缩
if (File.Exists(cachePath) && lastBrotliType == config.CompileOptions.brotliMT) if (cachePath.Contains("wasm.code") && File.Exists(cachePath) && lastBrotliType == config.CompileOptions.brotliMT)
{ {
File.Copy(cachePath, targetPath, true); File.Copy(cachePath, targetPath, true);
return 0; return 0;
@ -2015,6 +2014,8 @@ namespace WeChatWASM
config.CompileOptions.enablePerfAnalysis ? "true" : "false", config.CompileOptions.enablePerfAnalysis ? "true" : "false",
config.ProjectConf.MemorySize.ToString(), config.ProjectConf.MemorySize.ToString(),
config.SDKOptions.disableMultiTouch ? "true" : "false", config.SDKOptions.disableMultiTouch ? "true" : "false",
// Perfstream暂时设为false
"false"
}); });
List<Rule> replaceList = new List<Rule>(replaceArrayList); List<Rule> replaceList = new List<Rule>(replaceArrayList);

View File

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

Binary file not shown.

View File

@ -115,8 +115,8 @@ WX_SyncFunction_tnn: function(functionName, returnType, param1, param2){
stringToUTF8((res || ''), buffer, bufferSize); stringToUTF8((res || ''), buffer, bufferSize);
return buffer; return buffer;
}, },
WX_ClassOneWayFunction:function(functionName, returnType, successType, failType, completeType, conf) { WX_ClassConstructor: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 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));
var bufferSize = lengthBytesUTF8(res || '') + 1; var bufferSize = lengthBytesUTF8(res || '') + 1;
var buffer = _malloc(bufferSize); var buffer = _malloc(bufferSize);
stringToUTF8((res || ''), buffer, bufferSize); stringToUTF8((res || ''), buffer, bufferSize);
@ -156,5 +156,7 @@ WX_ClassOneWayNoFunction_vt: function(className, functionName, id, param1) {
}, },
WX_ClassOneWayNoFunction_vn: 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); 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);
}, },
}) })

View File

@ -0,0 +1,55 @@
mergeInto(LibraryManager.library, {
JSStartGameDataMonitor: function() {
console.log("call JSStartGameDataMonitor \n");
if (typeof GameGlobal.manager.getGameDataMonitor === 'function')
{
GameGlobal.manager.getGameDataMonitor().start();
}
else
{
console.log("GameGlobal.manager.getGameDataMonitor is not a function \n");
}
},
JSReportUnityProfileData: function(
targetFrameRate, // fps.
monoHeapReserved, monoHeapUsed, nativeReserved, nativeUnused, nativeAllocated, // profiler.
setPassCalls, drawCalls, vertices, trianglesCount // render.
) {
console.log("call JSReportUnityProfileData \n");
let report_data = {
timestamp: new Date().getTime(),
fps: {
targetFrameRate: targetFrameRate,
avgEXFrameTime: _WXGetEXFrameTime(),
},
profiler: {
monoHeapReserved: monoHeapReserved,
monoHeapUsed: monoHeapUsed,
nativeReserved: nativeReserved,
nativeUnused: nativeUnused,
nativeAllocated: nativeAllocated,
},
render: {
setPassCalls: setPassCalls,
drawCalls: drawCalls,
vertices: vertices,
trianglesCount: trianglesCount,
},
webassembly: {
totalHeapMemory: _WXGetTotalMemorySize(),
dynamicMemory: _WXGetDynamicMemorySize(),
usedHeapMemory: _WXGetUsedMemorySize(),
unAllocatedMemory: _WXGetUnAllocatedMemorySize(),
},
assetbundle: {
numberInMemory: _WXGetBundleNumberInMemory(),
numberOnDisk: _WXGetBundleNumberOnDisk(),
sizeInMemory: _WXGetBundleSizeInMemory(),
sizeOnDisk: _WXGetBundleSizeOnDisk(),
}
}
GameGlobal.manager.getGameDataMonitor().reportUnityProfileData(report_data)
},
});

View File

@ -0,0 +1,79 @@
fileFormatVersion: 2
guid: 63a9d4fa9c3846e3704029822b94973f
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude WeixinMiniGame: 1
Exclude Win: 1
Exclude Win64: 1
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Facebook: WebGL
second:
enabled: 0
settings: {}
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: x86
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: x86_64
- first:
WebGL: WebGL
second:
enabled: 1
settings: {}
- first:
WeixinMiniGame: WeixinMiniGame
second:
enabled: 1
settings: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -3119,6 +3119,26 @@
 是否结束  是否结束
</summary> </summary>
</member> </member>
<member name="F:WeChatWASM.LoadOption.openlink">
<summary>
从不同渠道获得的OPENLINK字符串
</summary>
</member>
<member name="F:WeChatWASM.LoadOption.query">
<summary>
选填部分活动、功能允许接收自定义query参数请参阅渠道说明默认可不填
</summary>
</member>
<member name="F:WeChatWASM.ShowOption.openlink">
<summary>
从不同渠道获得的OPENLINK字符串
</summary>
</member>
<member name="F:WeChatWASM.ShowOption.query">
<summary>
选填部分活动、功能允许接收自定义query参数请参阅渠道说明默认可不填
</summary>
</member>
<member name="F:WeChatWASM.VirtualPaymentError.errMsg"> <member name="F:WeChatWASM.VirtualPaymentError.errMsg">
错误信息 错误信息
@ -4207,26 +4227,6 @@
取值为0/1取值为0表示会把 `App`、`Page` 的生命周期函数和 `wx` 命名空间下的函数调用写入日志取值为1则不会。默认值是 0 取值为0/1取值为0表示会把 `App`、`Page` 的生命周期函数和 `wx` 命名空间下的函数调用写入日志取值为1则不会。默认值是 0
</summary> </summary>
</member> </member>
<member name="F:WeChatWASM.LoadOption.openlink">
<summary>
从不同渠道获得的OPENLINK字符串
</summary>
</member>
<member name="F:WeChatWASM.LoadOption.query">
<summary>
选填部分活动、功能允许接收自定义query参数请参阅渠道说明默认可不填
</summary>
</member>
<member name="F:WeChatWASM.ShowOption.openlink">
<summary>
从不同渠道获得的OPENLINK字符串
</summary>
</member>
<member name="F:WeChatWASM.ShowOption.query">
<summary>
选填部分活动、功能允许接收自定义query参数请参阅渠道说明默认可不填
</summary>
</member>
<member name="F:WeChatWASM.OnCheckForUpdateListenerResult.hasUpdate"> <member name="F:WeChatWASM.OnCheckForUpdateListenerResult.hasUpdate">
<summary> <summary>
是否有新版本 是否有新版本

Binary file not shown.

View File

@ -3125,6 +3125,26 @@
 是否结束  是否结束
</summary> </summary>
</member> </member>
<member name="F:WeChatWASM.LoadOption.openlink">
<summary>
从不同渠道获得的OPENLINK字符串
</summary>
</member>
<member name="F:WeChatWASM.LoadOption.query">
<summary>
选填部分活动、功能允许接收自定义query参数请参阅渠道说明默认可不填
</summary>
</member>
<member name="F:WeChatWASM.ShowOption.openlink">
<summary>
从不同渠道获得的OPENLINK字符串
</summary>
</member>
<member name="F:WeChatWASM.ShowOption.query">
<summary>
选填部分活动、功能允许接收自定义query参数请参阅渠道说明默认可不填
</summary>
</member>
<member name="F:WeChatWASM.VirtualPaymentError.errMsg"> <member name="F:WeChatWASM.VirtualPaymentError.errMsg">
错误信息 错误信息
@ -4213,26 +4233,6 @@
取值为0/1取值为0表示会把 `App`、`Page` 的生命周期函数和 `wx` 命名空间下的函数调用写入日志取值为1则不会。默认值是 0 取值为0/1取值为0表示会把 `App`、`Page` 的生命周期函数和 `wx` 命名空间下的函数调用写入日志取值为1则不会。默认值是 0
</summary> </summary>
</member> </member>
<member name="F:WeChatWASM.LoadOption.openlink">
<summary>
从不同渠道获得的OPENLINK字符串
</summary>
</member>
<member name="F:WeChatWASM.LoadOption.query">
<summary>
选填部分活动、功能允许接收自定义query参数请参阅渠道说明默认可不填
</summary>
</member>
<member name="F:WeChatWASM.ShowOption.openlink">
<summary>
从不同渠道获得的OPENLINK字符串
</summary>
</member>
<member name="F:WeChatWASM.ShowOption.query">
<summary>
选填部分活动、功能允许接收自定义query参数请参阅渠道说明默认可不填
</summary>
</member>
<member name="F:WeChatWASM.OnCheckForUpdateListenerResult.hasUpdate"> <member name="F:WeChatWASM.OnCheckForUpdateListenerResult.hasUpdate">
<summary> <summary>
是否有新版本 是否有新版本

View File

@ -4036,32 +4036,6 @@ namespace WeChatWASM
return WXSDKManagerHandler.Instance.GetLogManager(option); return WXSDKManagerHandler.Instance.GetLogManager(option);
} }
/// <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)
/// 需要基础库: `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);
/// })
/// ```
/// </summary>
/// <returns></returns>
public static WXPageManager CreatePageManager()
{
return WXSDKManagerHandler.Instance.CreatePageManager();
}
/// <summary> /// <summary>
/// [[RealtimeLogManager](https://developers.weixin.qq.com/minigame/dev/api/base/debug/RealtimeLogManager.html) wx.getRealtimeLogManager()](https://developers.weixin.qq.com/minigame/dev/api/base/debug/wx.getRealtimeLogManager.html) /// [[RealtimeLogManager](https://developers.weixin.qq.com/minigame/dev/api/base/debug/RealtimeLogManager.html) wx.getRealtimeLogManager()](https://developers.weixin.qq.com/minigame/dev/api/base/debug/wx.getRealtimeLogManager.html)
/// 需要基础库: `2.14.4` /// 需要基础库: `2.14.4`

View File

@ -1136,6 +1136,32 @@ namespace WeChatWASM
WXSDKManagerHandler.Instance.RequestVirtualPayment(option); WXSDKManagerHandler.Instance.RequestVirtualPayment(option);
} }
#endregion #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)
/// 需要基础库: `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);
/// })
/// ```
/// </summary>
/// <returns></returns>
public static WXPageManager CreatePageManager()
{
return WXSDKManagerHandler.Instance.CreatePageManager();
}
} }
} }
#endif #endif

View File

@ -8,6 +8,10 @@ using UnityEngine;
using UnityEngine.Scripting; using UnityEngine.Scripting;
using System.IO; using System.IO;
using Unity.Profiling;
using UnityEngine.Profiling;
using Debug = UnityEngine.Debug;
#if PLATFORM_WEIXINMINIGAME || PLATFORM_WEBGL || UNITY_EDITOR #if PLATFORM_WEIXINMINIGAME || PLATFORM_WEBGL || UNITY_EDITOR
@ -20,17 +24,17 @@ namespace WXSDKPerf
public class WXPerfEngine public class WXPerfEngine
{ {
#if !UNITY_EDITOR #if !UNITY_EDITOR
static WXPerfEngine_Implementation m_PerfEngineImplementation = null; static WXPerfEngine_Implementation m_PerfEngineImplementation = null;
#endif #endif
[RuntimeInitializeOnLoadMethod] [RuntimeInitializeOnLoadMethod]
public static void StartWXPerfEngine() public static void StartWXPerfEngine()
{ {
#if UNITY_EDITOR #if UNITY_EDITOR
return; return;
#else #else
m_PerfEngineImplementation = new WXPerfEngine_Implementation(); m_PerfEngineImplementation = new WXPerfEngine_Implementation();
m_PerfEngineImplementation.StartPerfEngine(); m_PerfEngineImplementation.StartPerfEngine();
#endif #endif
} }
@ -45,7 +49,7 @@ namespace WXSDKPerf
public static void Annotation(string InAnnotationString) public static void Annotation(string InAnnotationString)
{ {
#if UNITY_EDITOR #if UNITY_EDITOR
return; return;
#else #else
// Don't record annotation if we are not recording. // Don't record annotation if we are not recording.
if (!IsRecording()) if (!IsRecording())
@ -68,7 +72,7 @@ namespace WXSDKPerf
#endif #endif
} }
/// <summary> /// <summary>
/// 检查是否正在录制性能数据 /// 检查是否正在录制性能数据
/// </summary> /// </summary>
@ -89,14 +93,14 @@ namespace WXSDKPerf
#else #else
DateTime timestamp = DateTime.Now; DateTime timestamp = DateTime.Now;
var dateString = timestamp.ToLocalTime().ToString("yyyy-MM-dd_HH-mm-ss", System.Globalization.CultureInfo.InvariantCulture); 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 #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); WXPerfEngine_Implementation.CaptureSnapshotCallback, (UnityEngine.Profiling.Memory.Experimental.CaptureFlags)31);
#elif UNITY_2022_2_OR_NEWER #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); WXPerfEngine_Implementation.CaptureSnapshotCallback, (Unity.Profiling.Memory.CaptureFlags)31);
#endif #endif
#endif #endif
@ -109,7 +113,7 @@ namespace WXSDKPerf
public static void SetLuaState(IntPtr L) public static void SetLuaState(IntPtr L)
{ {
#if UNITY_EDITOR #if UNITY_EDITOR
return; return;
#else #else
if (m_PerfEngineImplementation == null) if (m_PerfEngineImplementation == null)
{ {
@ -120,7 +124,7 @@ namespace WXSDKPerf
m_PerfEngineImplementation.SetLuaState(L); m_PerfEngineImplementation.SetLuaState(L);
#endif #endif
} }
/// <summary> /// <summary>
/// 声明自定义性能指标 /// 声明自定义性能指标
/// </summary> /// </summary>
@ -130,7 +134,7 @@ namespace WXSDKPerf
public static void DeclareCustomStatInfo(string inStatName, string inStatCategory, int inStatInterpType = 1) public static void DeclareCustomStatInfo(string inStatName, string inStatCategory, int inStatInterpType = 1)
{ {
#if UNITY_EDITOR #if UNITY_EDITOR
return; return;
#else #else
if (m_PerfEngineImplementation == null) if (m_PerfEngineImplementation == null)
{ {
@ -151,7 +155,7 @@ namespace WXSDKPerf
public static void SetCustomStatValue(string inStatName, float inValue) public static void SetCustomStatValue(string inStatName, float inValue)
{ {
#if UNITY_EDITOR #if UNITY_EDITOR
return; return;
#else #else
if (m_PerfEngineImplementation == null) if (m_PerfEngineImplementation == null)
{ {
@ -171,7 +175,7 @@ namespace WXSDKPerf
public static void AddCustomStatInfoBy(string inStatName, float inValue) public static void AddCustomStatInfoBy(string inStatName, float inValue)
{ {
#if UNITY_EDITOR #if UNITY_EDITOR
return; return;
#else #else
if (m_PerfEngineImplementation == null) if (m_PerfEngineImplementation == null)
{ {
@ -179,9 +183,9 @@ namespace WXSDKPerf
return; return;
} }
m_PerfEngineImplementation.AddCustomStatInfoBy(inStatName, inValue); m_PerfEngineImplementation.AddCustomStatInfoBy(inStatName, inValue);
#endif #endif
} }
@ -195,11 +199,11 @@ namespace WXSDKPerf
/// <param name="inEnableCaptureResource">是否启用资源捕获</param> /// <param name="inEnableCaptureResource">是否启用资源捕获</param>
/// <param name="inEnableLuaMemoryMonitor">是否启用Lua内存监控</param> /// <param name="inEnableLuaMemoryMonitor">是否启用Lua内存监控</param>
/// <param name="inEnableLuaFunctionMemoryTracking">是否启用Lua函数内存跟踪</param> /// <param name="inEnableLuaFunctionMemoryTracking">是否启用Lua函数内存跟踪</param>
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) bool inEnableCaptureResource, bool inEnableLuaMemoryMonitor, bool inEnableLuaFunctionMemoryTracking)
{ {
#if UNITY_EDITOR #if UNITY_EDITOR
return; return;
#else #else
if (m_PerfEngineImplementation == null) if (m_PerfEngineImplementation == null)
{ {
@ -207,7 +211,7 @@ namespace WXSDKPerf
return; return;
} }
m_PerfEngineImplementation.StartRecordManually(inEnableStackTrace, inEnableStatInfo, inFrequentScreenShot, inEnablebRenderInst, m_PerfEngineImplementation.StartRecordManually(inEnableStackTrace, inEnableStatInfo, inFrequentScreenShot, inEnablebRenderInst,
inEnableCaptureResource, inEnableLuaMemoryMonitor, inEnableLuaFunctionMemoryTracking); inEnableCaptureResource, inEnableLuaMemoryMonitor, inEnableLuaFunctionMemoryTracking);
#endif #endif
} }
@ -218,7 +222,7 @@ namespace WXSDKPerf
public static void StopRecordManually() public static void StopRecordManually()
{ {
#if UNITY_EDITOR #if UNITY_EDITOR
return; return;
#else #else
if (m_PerfEngineImplementation == null) if (m_PerfEngineImplementation == null)
{ {

View File

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

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 0273befd5791516c05640b866a4057ac guid: 116a761a11af83b62d64d31eb1216fcd
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 1733540c209d595b3ab52b8544f99ccf guid: 3714a29fbf252fced66107cd990273c4
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 1bfedd710a3141ba041ec8ce627e881e guid: 8bc5d4bc6317bb3b1367bb377eea5384
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

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

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 8f3c548306bb5865531ec0dfa57a4601 guid: efa54f8930fa19d7d7c3d62c59820499
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 58e8112378dcb245e5f92d1e32bf3755 guid: 9c00bc52d5a9231490108e8ad766e80b
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 8f2157165a963f0ac3851f68300211a1 guid: 172f58c32796cea06b51f1b551ae95ce
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

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

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 8954cb475219cd733b5feb7838e93297 guid: 869c0a408b403433e15c94d06cea8932
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: b91bf512bf93766b8ae2b1bc103783f1 guid: 19032ac9bf6e2c329e7ab2a82d1d5854
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -47,6 +47,10 @@
{ {
"type": "suffix", "type": "suffix",
"value": ".symbols.unityweb" "value": ".symbols.unityweb"
},
{
"type": "suffix",
"value": ".symbols.unityweb.br"
} }
] ]
}, },

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 5ed43956bca4d25a4dfd913e6ffe441f guid: 5183a6f4ad66fe66d42f94019babf69f
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 6e49ed334eff587a11d24bbfc9b91ae5 guid: 4b8cd9b6d86e438658098179b9e8ce2a
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 547f104335a479e3c688d52edbaeb145 guid: 46515e429173979d20bbeb727f6e7c90
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 31f9cc6cd458af9ae649ac0f4cc8772e guid: 9fddc8bef696a08e5ed115ded86bdcf1
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 3165b5d1838c31b5e6065247722bf373 guid: 89d38dc858da935c3bfbcf9c93f7bb46
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: d0a26195cb9a986d48760de79dc69c05 guid: 4741896403631fb108ad1234703387d4
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: ceec02b40e3331d02d75fa809a9760a7 guid: 37ca5ebf8cf6cd2ef3330af5565e4b08
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 4e17d1e017486236d84ef24230908746 guid: c408dc0bfe4670b989460ad0b4f790bc
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: e6e71cf8ebd8590eb4c0b65cf3e032c2 guid: 5f4c298da9a4838da70ba93d10727b64
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

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

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 50f6dada1d46f9abfada1adc58fe61a4 guid: 6ecc4c0ddf3bda9f7ca883aedc9a9e96
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

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

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: b3638d6694250ef3c78b38d5225c1b15 guid: 88051b2c271cac65a7a4bdcb971f2b34
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

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

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: a6566b11de4e6aea909e1f1ae16dbf14 guid: 042533faa3b6cf0a224ea361becbcb7e
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 315c03cd0c3bad4b4d8914400bd9b3f4 guid: 545ec5f158f68df3f2095a3f44bfa523
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

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

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 27264c34a4c96da670efee2169d735d7 guid: d1fe144ecd5fd0ad04f648fec272e8b2
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 247838973fcc19e79e9ce4b72b9be3af guid: 6ba20278e7056775fd008c4131ad57ea
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 2f4733d841c7bce0747ebb2f48f78b37 guid: 8de2d24d4837e220100de3ecb56d5518
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 4882045d475f895700d5eb9a65a26931 guid: 2faac88b460cbdd88baacbd7683b5259
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 0397e88d91694d51f0f5fb7b5fee0409 guid: 79841ff75fbade2601548414c54780a8
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 481df7275cffcd473c8a1114f7d73979 guid: 43d46ace4f2d993404dee05f893ba6c0
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

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

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 499d98341f6fb29daafafbdbc07e1397 guid: 5af491497d8e429d4b668a19fa58165b
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

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

View File

@ -1,4 +1,11 @@
export const ResType = { export const ResType = {
Gamepad: {
axes: 'IAnyObject[]',
buttons: 'IAnyObject[]',
connected: 'bool',
id: 'string',
index: 'string',
},
AccountInfo: { AccountInfo: {
miniProgram: 'MiniProgram', miniProgram: 'MiniProgram',
plugin: 'Plugin', plugin: 'Plugin',
@ -496,7 +503,7 @@ export const ResType = {
headUrl: 'string', headUrl: 'string',
nickname: 'string', nickname: 'string',
nonceId: 'string', nonceId: 'string',
otherInfos: 'AnyKeyword[]', otherInfos: 'any[]',
replayStatus: 'number', replayStatus: 'number',
status: 'number', status: 'number',
errMsg: 'string', errMsg: 'string',
@ -505,7 +512,7 @@ export const ResType = {
headUrl: 'string', headUrl: 'string',
nickname: 'string', nickname: 'string',
noticeId: 'string', noticeId: 'string',
otherInfos: 'AnyKeyword[]', otherInfos: 'any[]',
reservable: 'bool', reservable: 'bool',
startTime: 'string', startTime: 'string',
status: 'number', status: 'number',
@ -574,6 +581,11 @@ export const ResType = {
weakNet: 'bool', weakNet: 'bool',
errMsg: 'string', errMsg: 'string',
}, },
GetPhoneNumberSuccessCallbackResult: {
code: 'string',
errMsg: 'string',
errno: 'number',
},
GetPrivacySettingSuccessCallbackResult: { GetPrivacySettingSuccessCallbackResult: {
needAuthorization: 'bool', needAuthorization: 'bool',
privacyContractName: 'string', privacyContractName: 'string',
@ -598,6 +610,10 @@ export const ResType = {
mainSwitch: 'bool', mainSwitch: 'bool',
itemSettings: 'object', itemSettings: 'object',
}, },
GetShowSplashAdStatusSuccessCallbackResult: {
status: 'string',
errMsg: 'string',
},
GetStorageInfoSuccessCallbackOption: { GetStorageInfoSuccessCallbackOption: {
currentSize: 'number', currentSize: 'number',
keys: 'string[]', keys: 'string[]',
@ -724,6 +740,12 @@ export const ResType = {
message: 'string', message: 'string',
stack: 'string', stack: 'string',
}, },
OnGamepadConnectedListenerResult: {
gamepad: 'string',
},
OnGamepadDisconnectedListenerResult: {
gamepad: 'string',
},
OnHandoffListenerResult: { OnHandoffListenerResult: {
query: 'string', query: 'string',
}, },
@ -741,14 +763,6 @@ export const ResType = {
OnMemoryWarningListenerResult: { OnMemoryWarningListenerResult: {
level: 'number', level: 'number',
}, },
OnMenuButtonBoundingClientRectWeightChangeListenerResult: {
bottom: 'number',
height: 'number',
left: 'number',
right: 'number',
top: 'number',
width: 'number',
},
OnMouseDownListenerResult: { OnMouseDownListenerResult: {
button: 'number', button: 'number',
timeStamp: 'long', timeStamp: 'long',
@ -849,17 +863,6 @@ export const ResType = {
subscriptionsSetting: 'SubscriptionsSetting', subscriptionsSetting: 'SubscriptionsSetting',
errMsg: 'string', errMsg: 'string',
}, },
OperateGameRecorderVideoOption: {
atempo: 'number',
audioMix: 'bool',
bgm: 'string',
desc: 'string',
path: 'string',
query: 'string',
timeRange: 'number[]',
title: 'string',
volume: 'number',
},
MediaSource: { MediaSource: {
url: 'string', url: 'string',
poster: 'string', poster: 'string',

View File

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

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: bd7a4d84db1b1e0c919afba300eaba1f guid: 3e2aee358e6f06ee34666fbfff790937
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 6fc1ebc53e8fa2bda35b61b96139d402 guid: 55363052163d36636845294797aebc3a
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -23,7 +23,7 @@ function getClassObject(className, id) {
// eslint-disable-next-line @typescript-eslint/naming-convention // eslint-disable-next-line @typescript-eslint/naming-convention
function WX_OneWayNoFunction(functionName, ...params) { 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 // eslint-disable-next-line @typescript-eslint/naming-convention
function WX_SyncFunction(functionName, ...params) { 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 // eslint-disable-next-line @typescript-eslint/naming-convention
@ -42,13 +42,22 @@ function WX_ClassOneWayNoFunction(className, functionName, id, ...params) {
if (!obj) { if (!obj) {
return; return;
} }
obj[functionName.replace(/^\w/, a => a.toLowerCase())](...params); 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) || '',
});
} }
export default { export default {
WX_OneWayFunction(functionName, successType, failType, completeType, conf, callbackId) { 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); const config = formatJsonStr(conf);
// specialJS
if (lowerFunctionName === 'login') { if (lowerFunctionName === 'login') {
if (!config.timeout) { if (!config.timeout) {
delete config.timeout; delete config.timeout;
@ -111,7 +120,7 @@ export default {
moduleHelper.send(`_${functionName}Callback`, resStr); moduleHelper.send(`_${functionName}Callback`, resStr);
}; };
onEventLists[functionName].push(callback); onEventLists[functionName].push(callback);
wx[functionName.replace(/^\w/, a => a.toLowerCase())](callback); wx[functionName.replace(/^\w/, (a) => a.toLowerCase())](callback);
}, },
WX_OffEventRegister(functionName) { WX_OffEventRegister(functionName) {
(onEventLists[functionName] || []).forEach((v) => { (onEventLists[functionName] || []).forEach((v) => {
@ -225,7 +234,7 @@ export default {
}, },
WX_SyncFunction_t(functionName, returnType) { WX_SyncFunction_t(functionName, returnType) {
const res = WX_SyncFunction(functionName); 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))); formatResponse(returnType, JSON.parse(JSON.stringify(res)));
return JSON.stringify(res); return JSON.stringify(res);
} }
@ -262,10 +271,10 @@ export default {
formatResponse(returnType, res); formatResponse(returnType, res);
return JSON.stringify(res); return JSON.stringify(res);
}, },
WX_ClassOneWayFunction(functionName, returnType, successType, failType, completeType, conf) { WX_ClassConstructor(functionName, returnType, successType, failType, completeType, conf) {
const config = formatJsonStr(conf); const config = formatJsonStr(conf);
const callbackId = uid(); const callbackId = uid();
const obj = wx[functionName.replace(/^\w/, a => a.toLowerCase())]({ const obj = wx[functionName.replace(/^\w/, (a) => a.toLowerCase())]({
...config, ...config,
success(res) { success(res) {
formatResponse(successType, res); formatResponse(successType, res);
@ -293,7 +302,7 @@ export default {
return callbackId; return callbackId;
}, },
WX_ClassFunction(functionName, returnType, option) { 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(); const id = uid();
if (!ClassLists[returnType]) { if (!ClassLists[returnType]) {
ClassLists[returnType] = {}; ClassLists[returnType] = {};
@ -347,10 +356,10 @@ export default {
ClassOnEventLists[className + functionName][id + eventName].push(callback); ClassOnEventLists[className + functionName][id + eventName].push(callback);
// WXVideoDecoder OnEvent 不规范 特殊处理 // WXVideoDecoder OnEvent 不规范 特殊处理
if (className === 'WXVideoDecoder') { if (className === 'WXVideoDecoder') {
obj[functionName.replace(/^\w/, a => a.toLowerCase())](eventName, callback); obj[functionName.replace(/^\w/, (a) => a.toLowerCase())](eventName, callback);
} }
else { else {
obj[functionName.replace(/^\w/, a => a.toLowerCase())](callback); obj[functionName.replace(/^\w/, (a) => a.toLowerCase())](callback);
} }
}, },
WX_ClassOffEventFunction(className, functionName, id, eventName) { WX_ClassOffEventFunction(className, functionName, id, eventName) {
@ -389,7 +398,7 @@ export default {
if (!obj) { if (!obj) {
return JSON.stringify(formatResponse(returnType)); 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)); return JSON.stringify(formatResponse(returnType, res, id));
}, },
WX_ClassOneWayNoFunction_vt(className, functionName, id, param1) { WX_ClassOneWayNoFunction_vt(className, functionName, id, param1) {
@ -399,4 +408,41 @@ export default {
WX_ClassOneWayNoFunction_vn(className, functionName, id, param1) { WX_ClassOneWayNoFunction_vn(className, functionName, id, param1) {
WX_ClassOneWayNoFunction(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);
},
});
}
},
}; };

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 3d8249945a076ae87eb97417f544b0b9 guid: e6d7817938851235a2cc9e0d328b61df
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 08dcc4b922a53ec4ab114fa1d8cb91d6 guid: c74f4ce0c8216bb35ea8c7fa6cf75edd
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

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

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 4b807ee5567f2a193edfca4bdffbd798 guid: e36dcf0ae1a7003cc6e095dc1b79fe6e
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 07cd0339a9efd7ea18075c1afce5975c guid: 282a68dfa18c70c86b28babb267f16d5
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: a1db39c7ebe7fd47d4ffcb2c17bb06f2 guid: 644f55eafcd3edbef9f99bbdf3a8a46f
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 26f75172b5b150c9ba3156873ec0514e guid: c2f8bbe90d7e891df2d4b0b8dfcc1bef
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 8b6c9eb7d4afa64b18aeb341b0740b85 guid: 004e7d287ac31d0b465c96fcd7b0949a
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 4b8a6a9e53972c103f0eb844fed1ea99 guid: cd6a16907528a6df47de06030b8da7e7
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

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

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 88c2c4f8b42d569b8094feb74e6da2a1 guid: 3d39706c572cc3170639bc054c1645c7
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 2f73838ecd8faae4a3b9c6561e93dc49 guid: 3c3f9568d3bfbc7c1ab88229ff2a8f8f
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 445ac3638ee0c6911e2f76cb5bbf8705 guid: 2a5bdc1badb22390c4c97bfa28340db2
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

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

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 67ff1f029018f30663345cd163b89865 guid: 1269ccd9fc1c8a93dc06b29f267f4bfd
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: cc6277ca01c8895aeddcb4a14887b054 guid: 86587c492bfb516e1582923d0f61267b
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 6d2f7015f29d1797cf4415979b11aea1 guid: b0dbdb82ad2dbeabb28ca417f217f938
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

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

View File

@ -23,7 +23,7 @@
], ],
"plugins": { "plugins": {
"UnityPlugin": { "UnityPlugin": {
"version": "1.2.74", "version": "1.2.78",
"provider": "wxe5a48f1ed5f544b7", "provider": "wxe5a48f1ed5f544b7",
"contexts": [ "contexts": [
{ {
@ -32,7 +32,7 @@
] ]
}, },
"Layout": { "Layout": {
"version": "1.0.15", "version": "1.0.16",
"provider": "wx7a727ff7d940bb3f", "provider": "wx7a727ff7d940bb3f",
"contexts": [ "contexts": [
{ {

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 95d355bf227103f2b48a164c6e22ab25 guid: 593e3c2233db31f54f562b9f2b834887
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: ebace106ae81525b2d597de54b319641 guid: 885015c19f585f53add640e590d7899f
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 3ba37def41f2bb4ef46fd2042d068a2c guid: b504f9df46f6694922dc0548e335f792
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 3099c7b4e614d9c684c9a7dcd0c9b536 guid: 4416ed9e0e85c612599f793f2c7ebca9
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 9b7a4b7182bc265e1f19186313e10f47 guid: eb3a70f9908faac5a5ce2abb1774c983
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 0b8738d6b9bb9fd55482c734e21beb13 guid: 7199b3dabab71eaacfddaa39a5464f6f
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 07aaacc15c1343cdbeb115583a744995 guid: 96b6b3702e4f22c2427d5e19d194e8fd
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 8a584ae2163b62a535dbda1e2689cdb1 guid: 78edce1bc9ddd9f84391437f47bb6e90
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: dbdd561176e8c8116fd212a778a20786 guid: 05994393451164a99ea32e633bcda280
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 4e7cdbe705798efe10bbf241a8ceebe6 guid: cae77321d6dd43038b3ef34b38f19e86
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 265b02284af89623aa1b169e677032c8 guid: a3c10d5022b6bb35e64cf1f9ce865472
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 7ccdb341414889d8b130b75eb976bf93 guid: d107e729f54541c1b9dd95e531765bbc
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

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

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 6c594eb41bfb222122f4800c3af64267 guid: a8a51687bff3f2b044bb9f732fd52dab
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: d04409d5c85f7f72c0311e40c1ecab69 guid: 3f0fcc1381de05131352db3094beb09c
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

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

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 6e24a6c756defadd387cad3fc6e37d42 guid: 60cbeaa424f6c10466f73f53c4c42611
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 4fa7afe0e4f4dc558a36b0d095aa7636 guid: 4f901873c90c0f5ebde32fc80bbf4237
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 8b1a2346741f840189413f0f240459f6 guid: f85fa25f302c27503822461acd5f7390
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

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

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 9e3ec4c25f91d6b4eb364fd667af70d5 guid: d4818f0ca64a0ede1847e61bd938a8be
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: d91f1ddca04d7ea13ce58510e477e028 guid: 78433e4e79f63997dbe400600dbe69e0
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 4b8c8b9738cf1d4003d1889eb1bd0535 guid: f8ea2f6d90326d668b4b54ffc6abd2ca
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

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

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