Auto-publish WXSDK.

This commit is contained in:
M1Pro 2024-04-03 19:42:18 +08:00
parent 947e902e2c
commit bb34625ceb
10 changed files with 26 additions and 7 deletions

View File

@ -6,6 +6,13 @@ Removed - 删除功能/接口
Fixed - 修复问题 Fixed - 修复问题
Others - 其他 Others - 其他
--> -->
## 2024-3-28 【重要更新】
包含重要bugfix、特性支持
### Feature
### Fixed
* 重要修复UDP接口处理buffer
* 重要修复unity-namespace.js部分环境变量丢失问题
## 2024-3-28 【普通更新】 ## 2024-3-28 【普通更新】
* 普通:优化对团结版的导出支持 * 普通:优化对团结版的导出支持
### Fixed ### Fixed

View File

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

Binary file not shown.

Binary file not shown.

View File

@ -127,6 +127,18 @@ function bindGloblException() {
// 上报初始信息 // 上报初始信息
function printSystemInfo(systemInfo) { function printSystemInfo(systemInfo) {
GameGlobal.systemInfoCached = systemInfo; GameGlobal.systemInfoCached = systemInfo;
const { version, SDKVersion, platform, renderer, system } = systemInfo;
unityNamespace.version = version;
unityNamespace.SDKVersion = SDKVersion;
unityNamespace.platform = platform;
unityNamespace.renderer = renderer;
unityNamespace.system = system;
unityNamespace.isPc = platform === 'windows' || platform === 'mac';
unityNamespace.isDevtools = platform === 'devtools';
unityNamespace.isMobile = !unityNamespace.isPc && !unityNamespace.isDevtools;
unityNamespace.isH5Renderer = unityNamespace.isMobile && unityNamespace.renderer === 'h5';
unityNamespace.isIOS = platform === 'ios';
unityNamespace.isAndroid = platform === 'android';
const bootinfo = { const bootinfo = {
renderer: systemInfo.renderer || '', renderer: systemInfo.renderer || '',
isH5Plus: GameGlobal.isIOSHighPerformanceModePlus || false, isH5Plus: GameGlobal.isIOSHighPerformanceModePlus || false,

View File

@ -141,12 +141,12 @@ function WX_TCPSocketOnMessage(id, needInfo) {
if (needInfo) { if (needInfo) {
const localInfoPtr = convertInfoToPointer(res.localInfo); const localInfoPtr = convertInfoToPointer(res.localInfo);
const remoteInfoPtr = convertInfoToPointer(res.remoteInfo); const remoteInfoPtr = convertInfoToPointer(res.remoteInfo);
GameGlobal.Module.dynCall_viiiii(wxTCPSocketOnMessageCallback, idPtr, messagePtr, res.message.byteLength, localInfoPtr, remoteInfoPtr); GameGlobal.Module.dynCall_viiiii(wxTCPSocketOnMessageCallback, idPtr, messagePtr, res.message.length || res.message.byteLength, localInfoPtr, remoteInfoPtr);
GameGlobal.Module._free(localInfoPtr); GameGlobal.Module._free(localInfoPtr);
GameGlobal.Module._free(remoteInfoPtr); GameGlobal.Module._free(remoteInfoPtr);
} }
else { else {
GameGlobal.Module.dynCall_viiiii(wxTCPSocketOnMessageCallback, idPtr, messagePtr, res.message.byteLength, 0, 0); GameGlobal.Module.dynCall_viiiii(wxTCPSocketOnMessageCallback, idPtr, messagePtr, res.message.length || res.message.byteLength, 0, 0);
} }
GameGlobal.Module._free(idPtr); GameGlobal.Module._free(idPtr);
GameGlobal.Module._free(messagePtr); GameGlobal.Module._free(messagePtr);

View File

@ -102,12 +102,12 @@ function WX_UDPSocketOnMessage(id, needInfo) {
if (needInfo) { if (needInfo) {
const localInfoPtr = convertInfoToPointer(res.localInfo); const localInfoPtr = convertInfoToPointer(res.localInfo);
const remoteInfoPtr = convertInfoToPointer(res.remoteInfo); const remoteInfoPtr = convertInfoToPointer(res.remoteInfo);
GameGlobal.Module.dynCall_viiiii(wxUDPSocketOnMessageCallback, idPtr, messagePtr, res.message.byteLength, localInfoPtr, remoteInfoPtr); GameGlobal.Module.dynCall_viiiii(wxUDPSocketOnMessageCallback, idPtr, messagePtr, res.message.length || res.message.byteLength, localInfoPtr, remoteInfoPtr);
GameGlobal.Module._free(localInfoPtr); GameGlobal.Module._free(localInfoPtr);
GameGlobal.Module._free(remoteInfoPtr); GameGlobal.Module._free(remoteInfoPtr);
} }
else { else {
GameGlobal.Module.dynCall_viiiii(wxUDPSocketOnMessageCallback, idPtr, messagePtr, res.message.byteLength, 0, 0); GameGlobal.Module.dynCall_viiiii(wxUDPSocketOnMessageCallback, idPtr, messagePtr, res.message.length || res.message.byteLength, 0, 0);
} }
GameGlobal.Module._free(idPtr); GameGlobal.Module._free(idPtr);
GameGlobal.Module._free(messagePtr); GameGlobal.Module._free(messagePtr);

View File

@ -294,7 +294,7 @@ export function convertDataToPointer(data) {
if (typeof data === 'string') { if (typeof data === 'string') {
return convertStringToPointer(data); return convertStringToPointer(data);
} }
if (data instanceof ArrayBuffer) { if (data instanceof ArrayBuffer || typeof data === 'object') {
return convertArrayBufferToPointer(data); return convertArrayBufferToPointer(data);
} }
return 0; return 0;

View File

@ -1 +1 @@
{"name":"com.qq.weixin.minigame","displayName":"WXSDK","description":"WeChat Mini Game Tuanjie Engine Adapter SDK Package.","version":"0.1.6","unity":"2019.4","unityRelease":"29f1","keywords":["Tuanjie","WX"],"dependencies":{}} {"name":"com.qq.weixin.minigame","displayName":"WXSDK","description":"WeChat Mini Game Tuanjie Engine Adapter SDK Package.","version":"0.1.7","unity":"2019.4","unityRelease":"29f1","keywords":["Tuanjie","WX"],"dependencies":{}}