Auto-publish release WXSDK.

This commit is contained in:
nebulaliu 2025-08-13 16:42:03 +08:00
parent 45e7581c92
commit 6016610f20
202 changed files with 1835 additions and 1493 deletions

View File

@ -6,13 +6,22 @@ Removed - 删除功能/接口
Fixed - 修复问题 Fixed - 修复问题
Others - 其他 Others - 其他
--> -->
## v0.1.27 【普通更新】 ## 2025-8-12 v0.1.28 【重要更新】
### Feature
* 普通PageManager.Show支持Promise
* 普通:性能工具实时数据流支持
* 普通适配插件版本升至1.2.79
### Fixed
* 重要修复Touch时进行IOS音频resume造成的卡顿问题
* 重要UnityWebRequest、AssetBundle、Addressables等加载已缓存资源时读文件报错导致游戏异常
## 2025-7-10 v0.1.27 【普通更新】
### Feature ### Feature
* 普通:新增 JS_Sound_GetPosition 方法用于获取音频播放位置 * 普通:新增 JS_Sound_GetPosition 方法用于获取音频播放位置
* 普通WebGL2变更为正式特性 * 普通WebGL2变更为正式特性
* 普通:支持小游戏试玩导出 * 普通:支持小游戏试玩导出
## v0.1.26 【普通更新】 ## 2025-5-8 v0.1.26 【普通更新】
### Feature ### Feature
* 普通:增加禁止多点触控的配置 * 普通:增加禁止多点触控的配置
### Fixed ### Fixed

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

@ -5,134 +5,134 @@ using UnityEngine;
namespace WeChatWASM namespace WeChatWASM
{ {
public class WXPlayableConvertCore public class WXPlayableConvertCore
{
static WXPlayableConvertCore() { }
public static WXPlayableEditorScriptObject config => UnityUtil.GetPlayableEditorConf();
public static WXConvertCore.WXExportError DoExport(bool buildWebGL = true)
{ {
WXConvertCore.isPlayableBuild = true; static WXPlayableConvertCore() { }
// var preCheckResult = WXConvertCore.PreCheck(); public static WXPlayableEditorScriptObject config => UnityUtil.GetPlayableEditorConf();
// if (preCheckResult != WXConvertCore.WXExportError.SUCCEED)
// {
// WXConvertCore.isPlayableBuild = false;
// return preCheckResult;
// }
// WXConvertCore.PreInit();
var exportResult = WXConvertCore.DoExport();
WXConvertCore.isPlayableBuild = false; public static WXConvertCore.WXExportError DoExport(bool buildWebGL = true)
return exportResult;
}
public static WXEditorScriptObject GetFakeScriptObject()
{
return SetDefaultProperties(ConvertPlayableConfigToCommon(config));
}
public static WXEditorScriptObject ConvertPlayableConfigToCommon(
WXPlayableEditorScriptObject source,
WXEditorScriptObject target = null)
{
// 创建或使用现有的目标实例
var newTarget = target ?? ScriptableObject.CreateInstance<WXEditorScriptObject>();
// 使用序列化方式深度拷贝公共字段
var so = new SerializedObject(newTarget);
// 遍历源对象的所有字段
var sourceType = source.GetType();
foreach (var sourceField in sourceType.GetFields(
System.Reflection.BindingFlags.Public |
System.Reflection.BindingFlags.Instance |
System.Reflection.BindingFlags.NonPublic))
{
// 跳过readonly字段
if (sourceField.IsInitOnly) continue;
// 查找目标对象中的对应字段
var targetField = typeof(WXEditorScriptObject).GetField(
sourceField.Name,
System.Reflection.BindingFlags.Public |
System.Reflection.BindingFlags.Instance |
System.Reflection.BindingFlags.NonPublic);
// if (targetField != null && !targetField.FieldType.IsValueType && !targetField.FieldType.IsEnum)
// {
// // // 复制字段值
// // var value = sourceField.GetValue(source);
// // targetField.SetValue(newTarget, value);
// // 递归复制子对象属性
// var subObj = targetField.GetValue(newTarget) ?? Activator.CreateInstance(targetField.FieldType);
// CopySubObjectProperties(value, subObj);
// targetField.SetValue(newTarget, subObj);
// }
// if (targetField != null &&
// (targetField.FieldType.IsAssignableFrom(sourceField.FieldType) ||
// (targetField.FieldType.IsValueType && sourceField.FieldType.IsValueType &&
// targetField.FieldType == sourceField.FieldType)))
// {
// 复制字段值
var value = sourceField.GetValue(source);
// 特殊处理嵌套对象类型的字段
if (value != null && !targetField.FieldType.IsValueType && !targetField.FieldType.IsEnum)
{
// 递归复制子对象属性
var subObj = targetField.GetValue(newTarget) ?? Activator.CreateInstance(targetField.FieldType);
CopySubObjectProperties(value, subObj);
targetField.SetValue(newTarget, subObj);
}
else
{
targetField.SetValue(newTarget, value);
}
// }
}
// 应用修改到序列化对象
so.ApplyModifiedProperties();
return newTarget;
}
private static void CopySubObjectProperties(object source, object target)
{
var sourceType = source.GetType();
var targetType = target.GetType();
foreach (var sourceField in sourceType.GetFields(
System.Reflection.BindingFlags.Public |
System.Reflection.BindingFlags.Instance |
System.Reflection.BindingFlags.NonPublic))
{ {
if (sourceField.IsInitOnly) continue; WXConvertCore.isPlayableBuild = true;
// var preCheckResult = WXConvertCore.PreCheck();
// if (preCheckResult != WXConvertCore.WXExportError.SUCCEED)
// {
// WXConvertCore.isPlayableBuild = false;
// return preCheckResult;
// }
// WXConvertCore.PreInit();
var exportResult = WXConvertCore.DoExport();
var targetField = targetType.GetField( WXConvertCore.isPlayableBuild = false;
sourceField.Name, return exportResult;
}
public static WXEditorScriptObject GetFakeScriptObject()
{
return SetDefaultProperties(ConvertPlayableConfigToCommon(config));
}
public static WXEditorScriptObject ConvertPlayableConfigToCommon(
WXPlayableEditorScriptObject source,
WXEditorScriptObject target = null)
{
// 创建或使用现有的目标实例
var newTarget = target ?? ScriptableObject.CreateInstance<WXEditorScriptObject>();
// 使用序列化方式深度拷贝公共字段
var so = new SerializedObject(newTarget);
// 遍历源对象的所有字段
var sourceType = source.GetType();
foreach (var sourceField in sourceType.GetFields(
System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Public |
System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Instance |
System.Reflection.BindingFlags.NonPublic); System.Reflection.BindingFlags.NonPublic))
if (targetField != null &&
(targetField.FieldType.IsAssignableFrom(sourceField.FieldType) ||
(targetField.FieldType.IsValueType && sourceField.FieldType.IsValueType &&
targetField.FieldType == sourceField.FieldType)))
{ {
// 跳过readonly字段
if (sourceField.IsInitOnly) continue;
// 查找目标对象中的对应字段
var targetField = typeof(WXEditorScriptObject).GetField(
sourceField.Name,
System.Reflection.BindingFlags.Public |
System.Reflection.BindingFlags.Instance |
System.Reflection.BindingFlags.NonPublic);
// if (targetField != null && !targetField.FieldType.IsValueType && !targetField.FieldType.IsEnum)
// {
// // // 复制字段值
// // var value = sourceField.GetValue(source);
// // targetField.SetValue(newTarget, value);
// // 递归复制子对象属性
// var subObj = targetField.GetValue(newTarget) ?? Activator.CreateInstance(targetField.FieldType);
// CopySubObjectProperties(value, subObj);
// targetField.SetValue(newTarget, subObj);
// }
// if (targetField != null &&
// (targetField.FieldType.IsAssignableFrom(sourceField.FieldType) ||
// (targetField.FieldType.IsValueType && sourceField.FieldType.IsValueType &&
// targetField.FieldType == sourceField.FieldType)))
// {
// 复制字段值
var value = sourceField.GetValue(source); var value = sourceField.GetValue(source);
targetField.SetValue(target, value); // 特殊处理嵌套对象类型的字段
if (value != null && !targetField.FieldType.IsValueType && !targetField.FieldType.IsEnum)
{
// 递归复制子对象属性
var subObj = targetField.GetValue(newTarget) ?? Activator.CreateInstance(targetField.FieldType);
CopySubObjectProperties(value, subObj);
targetField.SetValue(newTarget, subObj);
}
else
{
targetField.SetValue(newTarget, value);
}
// }
}
// 应用修改到序列化对象
so.ApplyModifiedProperties();
return newTarget;
}
private static void CopySubObjectProperties(object source, object target)
{
var sourceType = source.GetType();
var targetType = target.GetType();
foreach (var sourceField in sourceType.GetFields(
System.Reflection.BindingFlags.Public |
System.Reflection.BindingFlags.Instance |
System.Reflection.BindingFlags.NonPublic))
{
if (sourceField.IsInitOnly) continue;
var targetField = targetType.GetField(
sourceField.Name,
System.Reflection.BindingFlags.Public |
System.Reflection.BindingFlags.Instance |
System.Reflection.BindingFlags.NonPublic);
if (targetField != null &&
(targetField.FieldType.IsAssignableFrom(sourceField.FieldType) ||
(targetField.FieldType.IsValueType && sourceField.FieldType.IsValueType &&
targetField.FieldType == sourceField.FieldType)))
{
var value = sourceField.GetValue(source);
targetField.SetValue(target, value);
}
} }
} }
}
public static WXEditorScriptObject SetDefaultProperties(WXEditorScriptObject target) public static WXEditorScriptObject SetDefaultProperties(WXEditorScriptObject target)
{ {
target.ProjectConf.CDN = ""; target.ProjectConf.CDN = "";
target.ProjectConf.assetLoadType = 1; target.ProjectConf.assetLoadType = 1;
target.ProjectConf.compressDataPackage = true; target.ProjectConf.compressDataPackage = true;
target.CompileOptions.showMonitorSuggestModal = false; target.CompileOptions.showMonitorSuggestModal = false;
return target; return target;
}
} }
}
} }

View File

@ -6,358 +6,354 @@ using UnityEngine;
namespace WeChatWASM namespace WeChatWASM
{ {
[InitializeOnLoad] [InitializeOnLoad]
public class WXPlayableSettingsHelperInterface public class WXPlayableSettingsHelperInterface
{
public static WXPlayableSettingsHelper helper = new WXPlayableSettingsHelper();
}
public class WXPlayableSettingsHelper
{
public static string projectRootPath;
private static WXPlayableEditorScriptObject config;
private static bool m_EnablePerfTool = false;
private static string _dstCache;
public static bool UseIL2CPP
{ {
get public static WXPlayableSettingsHelper helper = new WXPlayableSettingsHelper();
{ }
public class WXPlayableSettingsHelper
{
public static string projectRootPath;
private static WXPlayableEditorScriptObject config;
private static bool m_EnablePerfTool = false;
public static bool UseIL2CPP
{
get
{
#if TUANJIE_2022_3_OR_NEWER #if TUANJIE_2022_3_OR_NEWER
return PlayerSettings.GetScriptingBackend(BuildTargetGroup.WeixinMiniGame) == ScriptingImplementation.IL2CPP; return PlayerSettings.GetScriptingBackend(BuildTargetGroup.WeixinMiniGame) == ScriptingImplementation.IL2CPP;
#else #else
return true; return true;
#endif #endif
} }
}
public WXPlayableSettingsHelper()
{
projectRootPath = System.IO.Path.GetFullPath(Application.dataPath + "/../");
_dstCache = "";
}
public void OnFocus()
{
loadData();
}
public void OnLostFocus()
{
saveData();
}
public void OnDisable()
{
EditorUtility.SetDirty(config);
}
private Vector2 scrollRoot;
private bool foldBaseInfo = true;
private bool foldDebugOptions = true;
public void OnSettingsGUI(EditorWindow window)
{
scrollRoot = EditorGUILayout.BeginScrollView(scrollRoot);
GUIStyle linkStyle = new GUIStyle(GUI.skin.label);
linkStyle.normal.textColor = Color.yellow;
linkStyle.hover.textColor = Color.yellow;
linkStyle.stretchWidth = false;
linkStyle.alignment = TextAnchor.UpperLeft;
linkStyle.wordWrap = true;
foldBaseInfo = EditorGUILayout.Foldout(foldBaseInfo, "基本信息");
if (foldBaseInfo)
{
EditorGUILayout.BeginVertical("frameBox", GUILayout.ExpandWidth(true));
this.formInput("appid", "小游戏试玩AppID");
this.formInput("projectName", "小游戏试玩项目名");
this.formIntPopup("orientation", "游戏方向", new[] { "Portrait", "Landscape" }, new[] { 0, 1, 2, 3 });
this.formInput("memorySize", "UnityHeap预留内存(?)", "单位MB预分配内存值超休闲游戏256/中轻度496/重度游戏768需预估游戏最大UnityHeap值以防止内存自动扩容带来的峰值尖刺。预估方法请查看GIT文档《优化Unity WebGL的内存》");
GUILayout.BeginHorizontal();
string targetDst = "dst";
if (!formInputData.ContainsKey(targetDst))
{
formInputData[targetDst] = "";
} }
EditorGUILayout.LabelField(string.Empty, GUILayout.Width(10));
GUILayout.Label(new GUIContent("导出路径(?)", "支持输入相对于项目根目录的相对路径wxbuild"), GUILayout.Width(140)); public WXPlayableSettingsHelper()
formInputData[targetDst] = GUILayout.TextField(formInputData[targetDst], GUILayout.MaxWidth(EditorGUIUtility.currentViewWidth - 270));
if (GUILayout.Button(new GUIContent("打开"), GUILayout.Width(40)))
{ {
if (!formInputData[targetDst].Trim().Equals(string.Empty)) projectRootPath = System.IO.Path.GetFullPath(Application.dataPath + "/../");
{
EditorUtility.RevealInFinder(GetAbsolutePath(formInputData[targetDst]));
}
GUIUtility.ExitGUI();
} }
if (GUILayout.Button(new GUIContent("选择"), GUILayout.Width(40)))
public void OnFocus()
{ {
var dstPath = EditorUtility.SaveFolderPanel("选择你的游戏导出目录", string.Empty, string.Empty); loadData();
if (dstPath != string.Empty)
{
formInputData[targetDst] = dstPath;
this.saveData();
}
GUIUtility.ExitGUI();
} }
GUILayout.EndHorizontal();
public void OnLostFocus()
EditorGUILayout.EndVertical();
}
foldDebugOptions = EditorGUILayout.Foldout(foldDebugOptions, "调试编译选项");
if (foldDebugOptions)
{
EditorGUILayout.BeginVertical("frameBox", GUILayout.ExpandWidth(true));
this.formCheckbox("developBuild", "Development Build", "", false, null, OnDevelopmentBuildToggleChanged);
this.formCheckbox("il2CppOptimizeSize", "Il2Cpp Optimize Size(?)", "对应于Il2CppCodeGeneration选项勾选时使用OptimizeSize(默认推荐)生成代码小15%左右取消勾选则使用OptimizeSpeed。游戏中大量泛型集合的高频访问建议OptimizeSpeed在使用HybridCLR等第三方组件时只能用OptimizeSpeed。(Dotnet Runtime模式下该选项无效)", !UseIL2CPP);
this.formCheckbox("profilingFuncs", "Profiling Funcs");
this.formCheckbox("webgl2", "WebGL2.0(beta)");
EditorGUILayout.EndVertical();
}
EditorGUILayout.EndScrollView();
}
public void OnBuildButtonGUI(EditorWindow window)
{
GUIStyle linkStyle = new GUIStyle(GUI.skin.label);
linkStyle.normal.textColor = Color.yellow;
linkStyle.hover.textColor = Color.yellow;
linkStyle.stretchWidth = false;
linkStyle.alignment = TextAnchor.UpperLeft;
linkStyle.wordWrap = true;
EditorGUILayout.BeginHorizontal();
EditorGUILayout.LabelField(string.Empty, GUILayout.MinWidth(10));
if (GUILayout.Button(new GUIContent("生成并转换"), GUILayout.Width(100), GUILayout.Height(25)))
{
this.saveData();
if (WXPlayableConvertCore.DoExport() == WXConvertCore.WXExportError.SUCCEED)
{ {
window.ShowNotification(new GUIContent("转换完成")); saveData();
} }
GUIUtility.ExitGUI();
}
EditorGUILayout.EndHorizontal();
}
private void OnDevelopmentBuildToggleChanged(bool InNewValue)
{
// 针对non-dev build取消性能分析工具的集成
if (!InNewValue)
{
this.setData("enablePerfAnalysis", false);
}
}
private string SDKFilePath; public void OnDisable()
private void loadData()
{
SDKFilePath = Path.Combine(UnityUtil.GetWxSDKRootPath(), "Runtime", "wechat-playable-default", "unity-sdk", "index.js");
config = UnityUtil.GetPlayableEditorConf();
_dstCache = config.ProjectConf.DST;
this.setData("projectName", config.ProjectConf.projectName);
this.setData("appid", config.ProjectConf.Appid);
this.setData("orientation", (int)config.ProjectConf.Orientation);
this.setData("dst", _dstCache);
this.setData("developBuild", config.CompileOptions.DevelopBuild);
this.setData("il2CppOptimizeSize", config.CompileOptions.Il2CppOptimizeSize);
this.setData("profilingFuncs", config.CompileOptions.profilingFuncs);
this.setData("webgl2", config.CompileOptions.Webgl2);
this.setData("customNodePath", config.CompileOptions.CustomNodePath);
this.setData("memorySize", config.ProjectConf.MemorySize.ToString());
}
private void saveData()
{
config.ProjectConf.projectName = this.getDataInput("projectName");
config.ProjectConf.Appid = this.getDataInput("appid");
config.ProjectConf.Orientation = (WXScreenOritation)this.getDataPop("orientation");
_dstCache = this.getDataInput("dst");
config.ProjectConf.DST = GetAbsolutePath(_dstCache);
config.CompileOptions.DevelopBuild = this.getDataCheckbox("developBuild");
config.CompileOptions.Il2CppOptimizeSize = this.getDataCheckbox("il2CppOptimizeSize");
config.CompileOptions.profilingFuncs = this.getDataCheckbox("profilingFuncs");
config.CompileOptions.CustomNodePath = this.getDataInput("customNodePath");
config.CompileOptions.Webgl2 = this.getDataCheckbox("webgl2");
config.ProjectConf.MemorySize = int.Parse(this.getDataInput("memorySize"));
}
private Dictionary<string, string> formInputData = new Dictionary<string, string>();
private Dictionary<string, int> formIntPopupData = new Dictionary<string, int>();
private Dictionary<string, bool> formCheckboxData = new Dictionary<string, bool>();
private string getDataInput(string target)
{
if (this.formInputData.ContainsKey(target))
return this.formInputData[target];
return "";
}
private int getDataPop(string target)
{
if (this.formIntPopupData.ContainsKey(target))
return this.formIntPopupData[target];
return 0;
}
private bool getDataCheckbox(string target)
{
if (this.formCheckboxData.ContainsKey(target))
return this.formCheckboxData[target];
return false;
}
private void formCheckbox(string target, string label, string help = null, bool disable = false, Action<bool> setting = null, Action<bool> onValueChanged = null)
{
if (!formCheckboxData.ContainsKey(target))
{
formCheckboxData[target] = false;
}
GUILayout.BeginHorizontal();
EditorGUILayout.LabelField(string.Empty, GUILayout.Width(10));
if (help == null)
{
GUILayout.Label(label, GUILayout.Width(140));
}
else
{
GUILayout.Label(new GUIContent(label, help), GUILayout.Width(140));
}
EditorGUI.BeginDisabledGroup(disable);
// Toggle the checkbox value based on the disable condition
bool newValue = EditorGUILayout.Toggle(disable ? false : formCheckboxData[target]);
// Update the checkbox data if the value has changed and invoke the onValueChanged action
if (newValue != formCheckboxData[target])
{
formCheckboxData[target] = newValue;
onValueChanged?.Invoke(newValue);
}
if (setting != null)
{
EditorGUILayout.LabelField("", GUILayout.Width(10));
// 配置按钮
if (GUILayout.Button(new GUIContent("设置"), GUILayout.Width(40), GUILayout.Height(18)))
{ {
setting?.Invoke(true); EditorUtility.SetDirty(config);
} }
EditorGUILayout.LabelField("", GUILayout.MinWidth(10));
}
EditorGUI.EndDisabledGroup(); private Vector2 scrollRoot;
private bool foldBaseInfo = true;
private bool foldDebugOptions = true;
public void OnSettingsGUI(EditorWindow window)
{
scrollRoot = EditorGUILayout.BeginScrollView(scrollRoot);
GUIStyle linkStyle = new GUIStyle(GUI.skin.label);
linkStyle.normal.textColor = Color.yellow;
linkStyle.hover.textColor = Color.yellow;
linkStyle.stretchWidth = false;
linkStyle.alignment = TextAnchor.UpperLeft;
linkStyle.wordWrap = true;
if (setting == null) foldBaseInfo = EditorGUILayout.Foldout(foldBaseInfo, "基本信息");
EditorGUILayout.LabelField(string.Empty); if (foldBaseInfo)
GUILayout.EndHorizontal(); {
EditorGUILayout.BeginVertical("frameBox", GUILayout.ExpandWidth(true));
this.formInput("appid", "小游戏试玩AppID");
this.formInput("projectName", "小游戏试玩项目名");
this.formIntPopup("orientation", "游戏方向", new[] { "Portrait", "Landscape" }, new[] { 0, 1, 2, 3 });
this.formInput("memorySize", "UnityHeap预留内存(?)", "单位MB预分配内存值超休闲游戏256/中轻度496/重度游戏768需预估游戏最大UnityHeap值以防止内存自动扩容带来的峰值尖刺。预估方法请查看GIT文档《优化Unity WebGL的内存》");
GUILayout.BeginHorizontal();
string targetDst = "dst";
if (!formInputData.ContainsKey(targetDst))
{
formInputData[targetDst] = "";
}
EditorGUILayout.LabelField(string.Empty, GUILayout.Width(10));
GUILayout.Label(new GUIContent("导出路径(?)", "支持输入相对于项目根目录的相对路径wxbuild"), GUILayout.Width(140));
formInputData[targetDst] = GUILayout.TextField(formInputData[targetDst], GUILayout.MaxWidth(EditorGUIUtility.currentViewWidth - 270));
if (GUILayout.Button(new GUIContent("打开"), GUILayout.Width(40)))
{
if (!formInputData[targetDst].Trim().Equals(string.Empty))
{
EditorUtility.RevealInFinder(GetAbsolutePath(formInputData[targetDst]));
}
GUIUtility.ExitGUI();
}
if (GUILayout.Button(new GUIContent("选择"), GUILayout.Width(40)))
{
var dstPath = EditorUtility.SaveFolderPanel("选择你的游戏导出目录", string.Empty, string.Empty);
if (dstPath != string.Empty)
{
formInputData[targetDst] = dstPath;
this.saveData();
}
GUIUtility.ExitGUI();
}
GUILayout.EndHorizontal();
EditorGUILayout.EndVertical();
}
foldDebugOptions = EditorGUILayout.Foldout(foldDebugOptions, "调试编译选项");
if (foldDebugOptions)
{
EditorGUILayout.BeginVertical("frameBox", GUILayout.ExpandWidth(true));
this.formCheckbox("developBuild", "Development Build", "", false, null, OnDevelopmentBuildToggleChanged);
this.formCheckbox("il2CppOptimizeSize", "Il2Cpp Optimize Size(?)", "对应于Il2CppCodeGeneration选项勾选时使用OptimizeSize(默认推荐)生成代码小15%左右取消勾选则使用OptimizeSpeed。游戏中大量泛型集合的高频访问建议OptimizeSpeed在使用HybridCLR等第三方组件时只能用OptimizeSpeed。(Dotnet Runtime模式下该选项无效)", !UseIL2CPP);
this.formCheckbox("profilingFuncs", "Profiling Funcs");
this.formCheckbox("webgl2", "WebGL2.0");
EditorGUILayout.EndVertical();
}
EditorGUILayout.EndScrollView();
}
public void OnBuildButtonGUI(EditorWindow window)
{
GUIStyle linkStyle = new GUIStyle(GUI.skin.label);
linkStyle.normal.textColor = Color.yellow;
linkStyle.hover.textColor = Color.yellow;
linkStyle.stretchWidth = false;
linkStyle.alignment = TextAnchor.UpperLeft;
linkStyle.wordWrap = true;
EditorGUILayout.BeginHorizontal();
EditorGUILayout.LabelField(string.Empty, GUILayout.MinWidth(10));
if (GUILayout.Button(new GUIContent("生成并转换"), GUILayout.Width(100), GUILayout.Height(25)))
{
this.saveData();
if (WXPlayableConvertCore.DoExport() == WXConvertCore.WXExportError.SUCCEED)
{
window.ShowNotification(new GUIContent("转换完成"));
}
GUIUtility.ExitGUI();
}
EditorGUILayout.EndHorizontal();
}
private void OnDevelopmentBuildToggleChanged(bool InNewValue)
{
// 针对non-dev build取消性能分析工具的集成
if (!InNewValue)
{
this.setData("enablePerfAnalysis", false);
}
}
private string SDKFilePath;
private void loadData()
{
SDKFilePath = Path.Combine(UnityUtil.GetWxSDKRootPath(), "Runtime", "wechat-playable-default", "unity-sdk", "index.js");
config = UnityUtil.GetPlayableEditorConf();
this.setData("projectName", config.ProjectConf.projectName);
this.setData("appid", config.ProjectConf.Appid);
this.setData("orientation", (int)config.ProjectConf.Orientation);
this.setData("dst", config.ProjectConf.relativeDST);
this.setData("developBuild", config.CompileOptions.DevelopBuild);
this.setData("il2CppOptimizeSize", config.CompileOptions.Il2CppOptimizeSize);
this.setData("profilingFuncs", config.CompileOptions.profilingFuncs);
this.setData("webgl2", config.CompileOptions.Webgl2);
this.setData("customNodePath", config.CompileOptions.CustomNodePath);
this.setData("memorySize", config.ProjectConf.MemorySize.ToString());
}
private void saveData()
{
config.ProjectConf.projectName = this.getDataInput("projectName");
config.ProjectConf.Appid = this.getDataInput("appid");
config.ProjectConf.Orientation = (WXScreenOritation)this.getDataPop("orientation");
config.ProjectConf.relativeDST = this.getDataInput("dst");
config.ProjectConf.DST = GetAbsolutePath(config.ProjectConf.relativeDST);
config.CompileOptions.DevelopBuild = this.getDataCheckbox("developBuild");
config.CompileOptions.Il2CppOptimizeSize = this.getDataCheckbox("il2CppOptimizeSize");
config.CompileOptions.profilingFuncs = this.getDataCheckbox("profilingFuncs");
config.CompileOptions.CustomNodePath = this.getDataInput("customNodePath");
config.CompileOptions.Webgl2 = this.getDataCheckbox("webgl2");
config.ProjectConf.MemorySize = int.Parse(this.getDataInput("memorySize"));
}
private Dictionary<string, string> formInputData = new Dictionary<string, string>();
private Dictionary<string, int> formIntPopupData = new Dictionary<string, int>();
private Dictionary<string, bool> formCheckboxData = new Dictionary<string, bool>();
private string getDataInput(string target)
{
if (this.formInputData.ContainsKey(target))
return this.formInputData[target];
return "";
}
private int getDataPop(string target)
{
if (this.formIntPopupData.ContainsKey(target))
return this.formIntPopupData[target];
return 0;
}
private bool getDataCheckbox(string target)
{
if (this.formCheckboxData.ContainsKey(target))
return this.formCheckboxData[target];
return false;
}
private void formCheckbox(string target, string label, string help = null, bool disable = false, Action<bool> setting = null, Action<bool> onValueChanged = null)
{
if (!formCheckboxData.ContainsKey(target))
{
formCheckboxData[target] = false;
}
GUILayout.BeginHorizontal();
EditorGUILayout.LabelField(string.Empty, GUILayout.Width(10));
if (help == null)
{
GUILayout.Label(label, GUILayout.Width(140));
}
else
{
GUILayout.Label(new GUIContent(label, help), GUILayout.Width(140));
}
EditorGUI.BeginDisabledGroup(disable);
// Toggle the checkbox value based on the disable condition
bool newValue = EditorGUILayout.Toggle(disable ? false : formCheckboxData[target]);
// Update the checkbox data if the value has changed and invoke the onValueChanged action
if (newValue != formCheckboxData[target])
{
formCheckboxData[target] = newValue;
onValueChanged?.Invoke(newValue);
}
if (setting != null)
{
EditorGUILayout.LabelField("", GUILayout.Width(10));
// 配置按钮
if (GUILayout.Button(new GUIContent("设置"), GUILayout.Width(40), GUILayout.Height(18)))
{
setting?.Invoke(true);
}
EditorGUILayout.LabelField("", GUILayout.MinWidth(10));
}
EditorGUI.EndDisabledGroup();
if (setting == null)
EditorGUILayout.LabelField(string.Empty);
GUILayout.EndHorizontal();
}
private void setData(string target, string value)
{
if (formInputData.ContainsKey(target))
{
formInputData[target] = value;
}
else
{
formInputData.Add(target, value);
}
}
private void setData(string target, bool value)
{
if (formCheckboxData.ContainsKey(target))
{
formCheckboxData[target] = value;
}
else
{
formCheckboxData.Add(target, value);
}
}
private void setData(string target, int value)
{
if (formIntPopupData.ContainsKey(target))
{
formIntPopupData[target] = value;
}
else
{
formIntPopupData.Add(target, value);
}
}
private void formInput(string target, string label, string help = null)
{
if (!formInputData.ContainsKey(target))
{
formInputData[target] = "";
}
GUILayout.BeginHorizontal();
EditorGUILayout.LabelField(string.Empty, GUILayout.Width(10));
if (help == null)
{
GUILayout.Label(label, GUILayout.Width(140));
}
else
{
GUILayout.Label(new GUIContent(label, help), GUILayout.Width(140));
}
formInputData[target] = GUILayout.TextField(formInputData[target], GUILayout.MaxWidth(EditorGUIUtility.currentViewWidth - 195));
GUILayout.EndHorizontal();
}
private void formIntPopup(string target, string label, string[] options, int[] values)
{
if (!formIntPopupData.ContainsKey(target))
{
formIntPopupData[target] = 0;
}
GUILayout.BeginHorizontal();
EditorGUILayout.LabelField(string.Empty, GUILayout.Width(10));
GUILayout.Label(label, GUILayout.Width(140));
formIntPopupData[target] = EditorGUILayout.IntPopup(formIntPopupData[target], options, values, GUILayout.MaxWidth(EditorGUIUtility.currentViewWidth - 195));
GUILayout.EndHorizontal();
}
public static bool IsAbsolutePath(string path)
{
// 检查是否为空或空白
if (string.IsNullOrWhiteSpace(path))
{
return false;
}
// 在 Windows 上,检查驱动器字母或网络路径
if (Application.platform == RuntimePlatform.WindowsEditor && Path.IsPathRooted(path))
{
return true;
}
// 在 Unix/Linux 和 macOS 上,检查是否以 '/' 开头
if (Application.platform == RuntimePlatform.OSXEditor && path.StartsWith("/"))
{
return true;
}
return false; // 否则为相对路径
}
public static string GetAbsolutePath(string path)
{
if (IsAbsolutePath(path))
{
return path;
}
return Path.Combine(projectRootPath, path);
}
} }
private void setData(string target, string value)
{
if (formInputData.ContainsKey(target))
{
formInputData[target] = value;
}
else
{
formInputData.Add(target, value);
}
}
private void setData(string target, bool value)
{
if (formCheckboxData.ContainsKey(target))
{
formCheckboxData[target] = value;
}
else
{
formCheckboxData.Add(target, value);
}
}
private void setData(string target, int value)
{
if (formIntPopupData.ContainsKey(target))
{
formIntPopupData[target] = value;
}
else
{
formIntPopupData.Add(target, value);
}
}
private void formInput(string target, string label, string help = null)
{
if (!formInputData.ContainsKey(target))
{
formInputData[target] = "";
}
GUILayout.BeginHorizontal();
EditorGUILayout.LabelField(string.Empty, GUILayout.Width(10));
if (help == null)
{
GUILayout.Label(label, GUILayout.Width(140));
}
else
{
GUILayout.Label(new GUIContent(label, help), GUILayout.Width(140));
}
formInputData[target] = GUILayout.TextField(formInputData[target], GUILayout.MaxWidth(EditorGUIUtility.currentViewWidth - 195));
GUILayout.EndHorizontal();
}
private void formIntPopup(string target, string label, string[] options, int[] values)
{
if (!formIntPopupData.ContainsKey(target))
{
formIntPopupData[target] = 0;
}
GUILayout.BeginHorizontal();
EditorGUILayout.LabelField(string.Empty, GUILayout.Width(10));
GUILayout.Label(label, GUILayout.Width(140));
formIntPopupData[target] = EditorGUILayout.IntPopup(formIntPopupData[target], options, values, GUILayout.MaxWidth(EditorGUIUtility.currentViewWidth - 195));
GUILayout.EndHorizontal();
}
public static bool IsAbsolutePath(string path)
{
// 检查是否为空或空白
if (string.IsNullOrWhiteSpace(path))
{
return false;
}
// 在 Windows 上,检查驱动器字母或网络路径
if (Application.platform == RuntimePlatform.WindowsEditor && Path.IsPathRooted(path))
{
return true;
}
// 在 Unix/Linux 和 macOS 上,检查是否以 '/' 开头
if (Application.platform == RuntimePlatform.OSXEditor && path.StartsWith("/"))
{
return true;
}
return false; // 否则为相对路径
}
public static string GetAbsolutePath(string path)
{
if (IsAbsolutePath(path))
{
return path;
}
return Path.Combine(projectRootPath, path);
}
}
} }

View File

@ -99,6 +99,14 @@ namespace WeChatWASM
#endif #endif
} }
} }
// 是否使用 iOS Metal 渲染
public static bool UseiOSMetal
{
get
{
return config.CompileOptions.enableiOSMetal;
}
}
// public static void SetPlayableEnabled(bool enabled) // public static void SetPlayableEnabled(bool enabled)
// { // {
// isPlayableBuild = enabled; // isPlayableBuild = enabled;
@ -112,9 +120,12 @@ namespace WeChatWASM
CheckBuildTarget(); CheckBuildTarget();
Init(); Init();
// 可能有顺序要求?如果没要求,可挪到此函数外 // 可能有顺序要求?如果没要求,可挪到此函数外
if (!isPlayableBuild) { if (!isPlayableBuild)
{
ProcessWxPerfBinaries(); ProcessWxPerfBinaries();
} }
// iOS metal 的相关特性
ProcessWxiOSMetalBinaries();
MakeEnvForLuaAdaptor(); MakeEnvForLuaAdaptor();
// JSLib // JSLib
SettingWXTextureMinJSLib(); SettingWXTextureMinJSLib();
@ -140,7 +151,7 @@ namespace WeChatWASM
return WXExportError.BUILD_WEBGL_FAILED; return WXExportError.BUILD_WEBGL_FAILED;
} }
dynamic config = isPlayableBuild ? UnityUtil.GetPlayableEditorConf() : UnityUtil.GetEditorConf(); dynamic config = isPlayableBuild ? UnityUtil.GetPlayableEditorConf() : UnityUtil.GetEditorConf();
if (config.ProjectConf.DST == string.Empty) if (config.ProjectConf.relativeDST == string.Empty)
{ {
Debug.LogError("请先配置游戏导出路径"); Debug.LogError("请先配置游戏导出路径");
return WXExportError.BUILD_WEBGL_FAILED; return WXExportError.BUILD_WEBGL_FAILED;
@ -400,6 +411,41 @@ namespace WeChatWASM
return true; 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) private static string GetLuaAdaptorPath(string filename)
{ {
string DS = WXAssetsTextTools.DS; string DS = WXAssetsTextTools.DS;
@ -523,13 +569,28 @@ namespace WeChatWASM
GraphicsDeviceType[] targets = new GraphicsDeviceType[] { }; GraphicsDeviceType[] targets = new GraphicsDeviceType[] { };
#if PLATFORM_WEIXINMINIGAME #if PLATFORM_WEIXINMINIGAME
PlayerSettings.SetUseDefaultGraphicsAPIs(BuildTarget.WeixinMiniGame, false); PlayerSettings.SetUseDefaultGraphicsAPIs(BuildTarget.WeixinMiniGame, false);
if (config.CompileOptions.Webgl2) // 启用 iOS Metal 渲染
if (UseiOSMetal)
{ {
PlayerSettings.SetGraphicsAPIs(BuildTarget.WeixinMiniGame, new GraphicsDeviceType[] { GraphicsDeviceType.OpenGLES3 }); 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 else
{ {
PlayerSettings.SetGraphicsAPIs(BuildTarget.WeixinMiniGame, new GraphicsDeviceType[] { GraphicsDeviceType.OpenGLES2 }); if (config.CompileOptions.Webgl2)
{
PlayerSettings.SetGraphicsAPIs(BuildTarget.WeixinMiniGame, new GraphicsDeviceType[] { GraphicsDeviceType.OpenGLES3 });
}
else
{
PlayerSettings.SetGraphicsAPIs(BuildTarget.WeixinMiniGame, new GraphicsDeviceType[] { GraphicsDeviceType.OpenGLES2 });
}
} }
#else #else
PlayerSettings.SetUseDefaultGraphicsAPIs(BuildTarget.WebGL, false); PlayerSettings.SetUseDefaultGraphicsAPIs(BuildTarget.WebGL, false);
@ -819,6 +880,22 @@ namespace WeChatWASM
} }
} }
{
Rule[] rules =
{
new Rule()
{
old = "if (GameGlobal.unityNamespace.enableProfileStats)",
newStr = "if (GameGlobal.unityNamespace.enableProfileStats || (typeof GameGlobal.manager.getWXAppCheatMonitor === 'function' && GameGlobal.manager.getWXAppCheatMonitor().shouldForceShowPerfMonitor()))"
}
};
foreach (var rule in rules)
{
text = text.Replace(rule.old, rule.newStr);
}
}
File.WriteAllText(targetPath, text, new UTF8Encoding(false)); File.WriteAllText(targetPath, text, new UTF8Encoding(false));
UnityEngine.Debug.LogFormat("[Converter] adapt framework done! "); UnityEngine.Debug.LogFormat("[Converter] adapt framework done! ");
@ -1194,7 +1271,8 @@ namespace WeChatWASM
public static void convertDataPackageJS() public static void convertDataPackageJS()
{ {
if (!isPlayableBuild) { if (!isPlayableBuild)
{
checkNeedRmovePackageParallelPreload(); checkNeedRmovePackageParallelPreload();
} }
@ -1317,7 +1395,8 @@ 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
@ -1649,7 +1728,8 @@ namespace WeChatWASM
content = content.Replace("$unityVersion$", Application.unityVersion); content = content.Replace("$unityVersion$", Application.unityVersion);
File.WriteAllText(Path.Combine(dst, "unity-sdk", "index.js"), content, Encoding.UTF8); 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); // 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); 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) : "[]"; var PreLoadKeys = config.PlayerPrefsKeys.Count > 0 ? JsonMapper.ToJson(config.PlayerPrefsKeys) : "[]";
content = content.Replace("'$PreLoadKeys'", PreLoadKeys); content = content.Replace("'$PreLoadKeys'", PreLoadKeys);
@ -1903,7 +1983,7 @@ namespace WeChatWASM
config.ProjectConf.bundleHashLength.ToString(), config.ProjectConf.bundleHashLength.ToString(),
bundlePathIdentifierStr, bundlePathIdentifierStr,
excludeFileExtensionsStr, excludeFileExtensionsStr,
config.CompileOptions.Webgl2 ? "2" : "1", config.CompileOptions.enableiOSMetal ? "5" : (config.CompileOptions.Webgl2 ? "2" : "1"),
Application.unityVersion, Application.unityVersion,
WXExtEnvDef.pluginVersion, WXExtEnvDef.pluginVersion,
config.ProjectConf.dataFileSubPrefix, config.ProjectConf.dataFileSubPrefix,
@ -1951,11 +2031,14 @@ 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);
List<string> files = new List<string> { "game.js", "game.json", "project.config.json", "unity-namespace.js", "check-version.js", "unity-sdk/font/index.js" }; 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" }; files = new List<string> { "game.js", "game.json", "project.config.json", "unity-namespace.js", "check-version.js" };
} }

View File

@ -54,15 +54,11 @@ namespace WeChatWASM
foldInstantGame = WXConvertCore.IsInstantGameAutoStreaming(); foldInstantGame = WXConvertCore.IsInstantGameAutoStreaming();
projectRootPath = System.IO.Path.GetFullPath(Application.dataPath + "/../"); projectRootPath = System.IO.Path.GetFullPath(Application.dataPath + "/../");
_dstCache = "";
} }
private static WXEditorScriptObject config; private static WXEditorScriptObject config;
private static bool m_EnablePerfTool = false; private static bool m_EnablePerfTool = false;
private static string _dstCache;
public void OnFocus() public void OnFocus()
{ {
loadData(); loadData();
@ -189,6 +185,7 @@ namespace WeChatWASM
this.formCheckbox("profilingMemory", "Profiling Memory"); this.formCheckbox("profilingMemory", "Profiling Memory");
this.formCheckbox("webgl2", "WebGL2.0"); this.formCheckbox("webgl2", "WebGL2.0");
this.formCheckbox("iOSPerformancePlus", "iOSPerformancePlus(?)", "是否使用iOS高性能+渲染方案有助于提升渲染兼容性、降低WebContent进程内存"); this.formCheckbox("iOSPerformancePlus", "iOSPerformancePlus(?)", "是否使用iOS高性能+渲染方案有助于提升渲染兼容性、降低WebContent进程内存");
// this.formCheckbox("iOSMetal", "iOSMetal(?)", "是否使用iOSMetal渲染方案需要开启iOS高性能+模式有助于提升运行性能降低iOS功耗");
this.formCheckbox("deleteStreamingAssets", "Clear Streaming Assets"); this.formCheckbox("deleteStreamingAssets", "Clear Streaming Assets");
this.formCheckbox("cleanBuild", "Clean WebGL Build"); this.formCheckbox("cleanBuild", "Clean WebGL Build");
// this.formCheckbox("cleanCloudDev", "Clean Cloud Dev"); // this.formCheckbox("cleanCloudDev", "Clean Cloud Dev");
@ -394,7 +391,6 @@ namespace WeChatWASM
// SDKFilePath = Path.Combine(Application.dataPath, "WX-WASM-SDK-V2", "Runtime", "wechat-default", "unity-sdk", "index.js"); // SDKFilePath = Path.Combine(Application.dataPath, "WX-WASM-SDK-V2", "Runtime", "wechat-default", "unity-sdk", "index.js");
SDKFilePath = Path.Combine(UnityUtil.GetWxSDKRootPath(), "Runtime", "wechat-default", "unity-sdk", "index.js"); SDKFilePath = Path.Combine(UnityUtil.GetWxSDKRootPath(), "Runtime", "wechat-default", "unity-sdk", "index.js");
config = UnityUtil.GetEditorConf(); config = UnityUtil.GetEditorConf();
_dstCache = config.ProjectConf.DST;
// Instant Game // Instant Game
if (WXConvertCore.IsInstantGameAutoStreaming()) if (WXConvertCore.IsInstantGameAutoStreaming())
@ -436,7 +432,7 @@ namespace WeChatWASM
this.setData("compressDataPackage", config.ProjectConf.compressDataPackage); this.setData("compressDataPackage", config.ProjectConf.compressDataPackage);
this.setData("videoUrl", config.ProjectConf.VideoUrl); this.setData("videoUrl", config.ProjectConf.VideoUrl);
this.setData("orientation", (int)config.ProjectConf.Orientation); this.setData("orientation", (int)config.ProjectConf.Orientation);
this.setData("dst", _dstCache); this.setData("dst", config.ProjectConf.relativeDST);
this.setData("bundleHashLength", config.ProjectConf.bundleHashLength.ToString()); this.setData("bundleHashLength", config.ProjectConf.bundleHashLength.ToString());
this.setData("bundlePathIdentifier", config.ProjectConf.bundlePathIdentifier); this.setData("bundlePathIdentifier", config.ProjectConf.bundlePathIdentifier);
this.setData("bundleExcludeExtensions", config.ProjectConf.bundleExcludeExtensions); this.setData("bundleExcludeExtensions", config.ProjectConf.bundleExcludeExtensions);
@ -452,6 +448,7 @@ namespace WeChatWASM
this.setData("customNodePath", config.CompileOptions.CustomNodePath); this.setData("customNodePath", config.CompileOptions.CustomNodePath);
this.setData("webgl2", config.CompileOptions.Webgl2); this.setData("webgl2", config.CompileOptions.Webgl2);
this.setData("iOSPerformancePlus", config.CompileOptions.enableIOSPerformancePlus); this.setData("iOSPerformancePlus", config.CompileOptions.enableIOSPerformancePlus);
this.setData("iOSMetal", config.CompileOptions.enableiOSMetal);
this.setData("fbslim", config.CompileOptions.fbslim); this.setData("fbslim", config.CompileOptions.fbslim);
this.setData("useFriendRelation", config.SDKOptions.UseFriendRelation); this.setData("useFriendRelation", config.SDKOptions.UseFriendRelation);
this.setData("useMiniGameChat", config.SDKOptions.UseMiniGameChat); this.setData("useMiniGameChat", config.SDKOptions.UseMiniGameChat);
@ -513,8 +510,8 @@ namespace WeChatWASM
config.ProjectConf.compressDataPackage = this.getDataCheckbox("compressDataPackage"); config.ProjectConf.compressDataPackage = this.getDataCheckbox("compressDataPackage");
config.ProjectConf.VideoUrl = this.getDataInput("videoUrl"); config.ProjectConf.VideoUrl = this.getDataInput("videoUrl");
config.ProjectConf.Orientation = (WXScreenOritation)this.getDataPop("orientation"); config.ProjectConf.Orientation = (WXScreenOritation)this.getDataPop("orientation");
_dstCache = this.getDataInput("dst"); config.ProjectConf.relativeDST = this.getDataInput("dst");
config.ProjectConf.DST = GetAbsolutePath(_dstCache); config.ProjectConf.DST = GetAbsolutePath(config.ProjectConf.relativeDST);
config.ProjectConf.bundleHashLength = int.Parse(this.getDataInput("bundleHashLength")); config.ProjectConf.bundleHashLength = int.Parse(this.getDataInput("bundleHashLength"));
config.ProjectConf.bundlePathIdentifier = this.getDataInput("bundlePathIdentifier"); config.ProjectConf.bundlePathIdentifier = this.getDataInput("bundlePathIdentifier");
config.ProjectConf.bundleExcludeExtensions = this.getDataInput("bundleExcludeExtensions"); config.ProjectConf.bundleExcludeExtensions = this.getDataInput("bundleExcludeExtensions");
@ -530,6 +527,7 @@ namespace WeChatWASM
config.CompileOptions.CustomNodePath = this.getDataInput("customNodePath"); config.CompileOptions.CustomNodePath = this.getDataInput("customNodePath");
config.CompileOptions.Webgl2 = this.getDataCheckbox("webgl2"); config.CompileOptions.Webgl2 = this.getDataCheckbox("webgl2");
config.CompileOptions.enableIOSPerformancePlus = this.getDataCheckbox("iOSPerformancePlus"); config.CompileOptions.enableIOSPerformancePlus = this.getDataCheckbox("iOSPerformancePlus");
config.CompileOptions.enableiOSMetal = this.getDataCheckbox("iOSMetal");
config.CompileOptions.fbslim = this.getDataCheckbox("fbslim"); config.CompileOptions.fbslim = this.getDataCheckbox("fbslim");
config.SDKOptions.UseFriendRelation = this.getDataCheckbox("useFriendRelation"); config.SDKOptions.UseFriendRelation = this.getDataCheckbox("useFriendRelation");
config.SDKOptions.UseMiniGameChat = this.getDataCheckbox("useMiniGameChat"); config.SDKOptions.UseMiniGameChat = this.getDataCheckbox("useMiniGameChat");

View File

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

View File

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

Binary file not shown.

View File

@ -381,6 +381,11 @@
视频url 视频url
</summary> </summary>
</member> </member>
<member name="F:WeChatWASM.WXProjectConf.relativeDST">
<summary>
导出路径(相对路径)
</summary>
</member>
<member name="F:WeChatWASM.WXProjectConf.DST"> <member name="F:WeChatWASM.WXProjectConf.DST">
<summary> <summary>
导出路径(绝对路径) 导出路径(绝对路径)
@ -643,6 +648,11 @@
是否使用iOS高性能Plus 是否使用iOS高性能Plus
</summary> </summary>
</member> </member>
<member name="F:WeChatWASM.CompileOptions.enableiOSMetal">
<summary>
是否使用iOS metal指令流
</summary>
</member>
<member name="F:WeChatWASM.CompileOptions.brotliMT"> <member name="F:WeChatWASM.CompileOptions.brotliMT">
<summary> <summary>
是否使用brotli多线程压缩 是否使用brotli多线程压缩
@ -773,6 +783,11 @@
试玩 appid 试玩 appid
</summary> </summary>
</member> </member>
<member name="F:WeChatWASM.WXPlayableProjectConf.relativeDST">
<summary>
导出路径(相对路径)
</summary>
</member>
<member name="F:WeChatWASM.WXPlayableProjectConf.DST"> <member name="F:WeChatWASM.WXPlayableProjectConf.DST">
<summary> <summary>
导出路径(绝对路径) 导出路径(绝对路径)

View File

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

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

@ -1699,26 +1699,6 @@
如果返回的是字符串,则数据在这个字段 如果返回的是字符串,则数据在这个字段
</summary> </summary>
</member> </member>
<member name="F:WeChatWASM.WXStatInfo.mode">
<summary>
文件的类型和存取的权限,对应 POSIX stat.st_mode
</summary>
</member>
<member name="F:WeChatWASM.WXStatInfo.size">
<summary>
文件大小单位B对应 POSIX stat.st_size
</summary>
</member>
<member name="F:WeChatWASM.WXStatInfo.lastAccessedTime">
<summary>
文件最近一次被存取或被执行的时间UNIX 时间戳,对应 POSIX stat.st_atime
</summary>
</member>
<member name="F:WeChatWASM.WXStatInfo.lastModifiedTime">
<summary>
文件最后一次被修改的时间UNIX 时间戳,对应 POSIX stat.st_mtime
</summary>
</member>
<member name="F:WeChatWASM.WXStat.path"> <member name="F:WeChatWASM.WXStat.path">
<summary> <summary>
文件的路径 文件的路径
@ -3129,19 +3109,24 @@
 是否结束  是否结束
</summary> </summary>
</member> </member>
<member name="P:WeChatWASM.NotifyMiniProgramPlayableStatusOption.complete"> <member name="F:WeChatWASM.LoadOption.openlink">
<summary> <summary>
接口调用结束的回调函数(调用成功、失败都会执行) 从不同渠道获得的OPENLINK字符串
</summary> </summary>
</member> </member>
<member name="P:WeChatWASM.NotifyMiniProgramPlayableStatusOption.fail"> <member name="F:WeChatWASM.LoadOption.query">
<summary> <summary>
接口调用失败的回调函数 选填部分活动、功能允许接收自定义query参数请参阅渠道说明默认可不填
</summary> </summary>
</member> </member>
<member name="P:WeChatWASM.NotifyMiniProgramPlayableStatusOption.success"> <member name="F:WeChatWASM.ShowOption.openlink">
<summary> <summary>
接口调用成功的回调函数 从不同渠道获得的OPENLINK字符串
</summary>
</member>
<member name="F:WeChatWASM.ShowOption.query">
<summary>
选填部分活动、功能允许接收自定义query参数请参阅渠道说明默认可不填
</summary> </summary>
</member> </member>
<member name="F:WeChatWASM.Gamepad.axes"> <member name="F:WeChatWASM.Gamepad.axes">
@ -4138,26 +4123,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

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: a18857814588f027fbba2af025670e61 guid: 97f6a2a83987331a726aafacdb65cb9a
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

Binary file not shown.

View File

@ -1705,26 +1705,6 @@
如果返回的是字符串,则数据在这个字段 如果返回的是字符串,则数据在这个字段
</summary> </summary>
</member> </member>
<member name="F:WeChatWASM.WXStatInfo.mode">
<summary>
文件的类型和存取的权限,对应 POSIX stat.st_mode
</summary>
</member>
<member name="F:WeChatWASM.WXStatInfo.size">
<summary>
文件大小单位B对应 POSIX stat.st_size
</summary>
</member>
<member name="F:WeChatWASM.WXStatInfo.lastAccessedTime">
<summary>
文件最近一次被存取或被执行的时间UNIX 时间戳,对应 POSIX stat.st_atime
</summary>
</member>
<member name="F:WeChatWASM.WXStatInfo.lastModifiedTime">
<summary>
文件最后一次被修改的时间UNIX 时间戳,对应 POSIX stat.st_mtime
</summary>
</member>
<member name="F:WeChatWASM.WXStat.path"> <member name="F:WeChatWASM.WXStat.path">
<summary> <summary>
文件的路径 文件的路径
@ -3135,19 +3115,24 @@
 是否结束  是否结束
</summary> </summary>
</member> </member>
<member name="P:WeChatWASM.NotifyMiniProgramPlayableStatusOption.complete"> <member name="F:WeChatWASM.LoadOption.openlink">
<summary> <summary>
接口调用结束的回调函数(调用成功、失败都会执行) 从不同渠道获得的OPENLINK字符串
</summary> </summary>
</member> </member>
<member name="P:WeChatWASM.NotifyMiniProgramPlayableStatusOption.fail"> <member name="F:WeChatWASM.LoadOption.query">
<summary> <summary>
接口调用失败的回调函数 选填部分活动、功能允许接收自定义query参数请参阅渠道说明默认可不填
</summary> </summary>
</member> </member>
<member name="P:WeChatWASM.NotifyMiniProgramPlayableStatusOption.success"> <member name="F:WeChatWASM.ShowOption.openlink">
<summary> <summary>
接口调用成功的回调函数 从不同渠道获得的OPENLINK字符串
</summary>
</member>
<member name="F:WeChatWASM.ShowOption.query">
<summary>
选填部分活动、功能允许接收自定义query参数请参阅渠道说明默认可不填
</summary> </summary>
</member> </member>
<member name="F:WeChatWASM.Gamepad.axes"> <member name="F:WeChatWASM.Gamepad.axes">
@ -4144,26 +4129,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

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

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

@ -1127,6 +1127,32 @@ namespace WeChatWASM
WXSDKManagerHandler.Instance.NotifyMiniProgramPlayableStatus(option); WXSDKManagerHandler.Instance.NotifyMiniProgramPlayableStatus(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: e5108f88099bb61c1ac7bce85c058bbb guid: c15400694abb8fabf306a6fd2b158846
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

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

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 92af1c93c32d8868b037a614a7c51557 guid: cb06e837a3facbeb24e11fe6582e9128
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 82a6bdd86dff7182973b291cb71e97cf guid: db5ef70357d98c71ca6dcf102c41cd04
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 531515f3324b0cf5a249ca868fbb957e guid: fa66f830a3ba6fc3e58b5436e7d485e4
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

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

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: d04f0a28a0ef5cdd7a1d23182b85b42f guid: 67574d2a36b01e45df2de9492b3a6922
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

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

View File

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

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: bbec39b14da95d130e2852e718bcee52 guid: 580363ef68ba8c1d13a790410e9cf1b4
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 5811c5c2d62fc7802c64f1d2b23745f1 guid: 195d5ca3f442cee88591f5e8c7d2f1ff
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

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

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 854f4bd8ff1dd4750841937bcddeaf70 guid: b92e6aa91743fdbf008f8bede8d3df2d
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 3a4d82e9de0cb38b0c9224360f3ad139 guid: 156df6b301e047025af847512ddb3015
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 23b767c936834d1b790a40ea00e26d64 guid: 7e612dde8d2e994f1ac96b77bae752fe
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 968b47eba0189213d3a4cfabbadee54c guid: b6a5cb1128fa120b6e843be3f9fba0a0
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 710313a81f77482d26012751c5d6592a guid: b68523d55ba6f8ae5a659f967f82133d
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 8342caa71b7edf46f906aa855aea4ef3 guid: 2ac9f2b83002d1ec2e2247e0cdb228f0
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

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

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 6e3f60a883fb2f8249ce74acf2c14acd guid: 72dea42cf6a92563c2eb35bfc705b1cd
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

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

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 95650874bc818949f578987590377532 guid: 65df04284413d48ee42446044234868a
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 7e863e19487a6cda9d53bbfc8e3fbd03 guid: 68b177c389523b0309164feca7e7ab27
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 9733080f2e9cef0f03c3d0ee1dad8983 guid: 6e9148ca36d7c15db666b4e0db71b892
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: d1ab83ac4fb090597d227ff725dbb6f7 guid: 977c8e671b8efe8f47b0fb976752e230
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 745ed2f1262c74198123f00a889f2b22 guid: a60d6852bd367e3badb30ab96b18ec48
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 23879d36971922e903eddd9885892fb3 guid: 6a7cf5b3ddf8d71de32c6e2f477b490d
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

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

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 62febf55450b14dd5e6d76f19bbd702a guid: 11508d8304ad8bd6c42dcade03900713
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: faeaa5621fd2c89ab8be9d59a5bfd49b guid: 30c6bdb4bc431dee2b0f4a24f407b0b0
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 1ce4ef1463f0ff2eb0b56e23d2871901 guid: 7dcfcce75eb8eaf257ef2ee6e1e725ad
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: 4804e01bf66b4037ae3257077b1fa612 guid: c56540bc7d11e552772f243a3490e7b6
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

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

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: c0bdb6ec2e9b51a1de21189c1df0b82d guid: 301d2ea00c15d6807a740b81efa9ddd6
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: 45586bcf2aec8da319b74e07858c2427 guid: 218606c3f450c1c1cf4e24f7603acf4b
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 38fecf1cc6b371057e50349b5f3551cd guid: a4bc08212e082d832b4fad30fed91b86
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: f142ec01c4dba069b031185ebf7b072b guid: 50dece5633fe35aec0aff2bf14a6c7e6
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

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

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 8a6e150eef26403510c814e0e93a2694 guid: 9fb686830068e264983c54fa39f1a6ec
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 4c10ebb6213c7a7fa92a91ba5c9649ee guid: 5c10a14c900e002c7ed8fa34e904bf2e
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: e9a5598b8047e5073d8baa4c8df0c978 guid: 1850ab455b109b41cfe2d70eeaf5b212
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 828f84320fa56abfa00ee9a5c916cbb9 guid: 340b135265e0ca2292b8a0a6bb895e32
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

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

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: d85c26bfbd9a3283f6bb30cceca5ea5e guid: 611e375716b229ed25dc8fff8de79335
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

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

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 498e07525985bb6ced0bd9306b09f6a4 guid: 803d3ed9db0fee6f0d1f46fa5bd2f68c
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 73905f6b06e6cb50adcc24a126ed8b65 guid: 88f79760b0dc874e50a34438f6646874
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 042f851fc2cd2b760f52c343668c5cc8 guid: 71c303a9b6ceb6af38ed3f2963863fee
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

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

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: b6e2f562aef79212d81c2ba7a7edd3ff guid: 60e7ec750adc1671a9b3184afc3b5ded
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: c21e4f9445ab1354e004ee6806d36b1c guid: 68a61267bcf68ded2999c78b8b95de4b
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: c4e3d01e4d70fba53c1b8add5d1d79d6 guid: f69933a23345a2f38ea85e2b9cae50b8
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.79",
"provider": "wxe5a48f1ed5f544b7", "provider": "wxe5a48f1ed5f544b7",
"contexts": [ "contexts": [
{ {
@ -32,7 +32,7 @@
] ]
}, },
"Layout": { "Layout": {
"version": "1.0.7", "version": "1.0.15",
"provider": "wx7a727ff7d940bb3f", "provider": "wx7a727ff7d940bb3f",
"contexts": [ "contexts": [
{ {

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: e336f4b63e6dfc217c3b2a4de7b8811b guid: 66ab3f68f34e328d166a0ac70db943ac
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

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

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 961219c24017591be9f7387b32c99dda guid: 286356c420fc755199796db12e189ae2
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 1512252be1263bff0bad2706fd57721b guid: c8ef69887d05d9b999a0387322895dfa
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

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

View File

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

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 5b2baee358014e8ac3e76cf8b8a2efda guid: 31b4a3f0fa5aa23453827bda568a7c1e
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

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

View File

@ -56,7 +56,6 @@ function LayoutWithTplAndStyle(xml, style) {
Layout.clear(); Layout.clear();
Layout.init(xml, style); Layout.init(xml, style);
Layout.layout(sharedContext); Layout.layout(sharedContext);
console.log(Layout);
} }
// 仅仅渲染一些提示,比如数据加载中、当前无授权等 // 仅仅渲染一些提示,比如数据加载中、当前无授权等
function renderTips(tips = '') { function renderTips(tips = '') {

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 0c3f625fe020655264dfb668d2f443af guid: 568dcd6043e459a961187326659081b8
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