diff --git a/CHANGELOG.md b/CHANGELOG.md index c647f3dc3..1177ca286 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,13 +6,22 @@ Removed - 删除功能/接口 Fixed - 修复问题 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 * 普通:新增 JS_Sound_GetPosition 方法用于获取音频播放位置 * 普通:WebGL2变更为正式特性 * 普通:支持小游戏试玩导出 -## v0.1.26 【普通更新】 +## 2025-5-8 v0.1.26 【普通更新】 ### Feature * 普通:增加禁止多点触控的配置 ### Fixed diff --git a/Editor/BuildProfile.meta b/Editor/BuildProfile.meta new file mode 100644 index 000000000..252f755cb --- /dev/null +++ b/Editor/BuildProfile.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: DytLvSj8UC9CKob0XUy9Y3usKDmX8US1YgxYmBxa1iAZ/I8JbM5wZwE= +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Editor/BuildProfile/lib.meta b/Editor/BuildProfile/lib.meta new file mode 100644 index 000000000..87b4cc3cf --- /dev/null +++ b/Editor/BuildProfile/lib.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: XSwesi78AS28ymfR2HEhHpEBAC2DHupI1hIKP7HApjHRaZgGw+DTwWI= +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Editor/BuildProfile/lib/libwx-metal-cpp.bc b/Editor/BuildProfile/lib/libwx-metal-cpp.bc new file mode 100644 index 000000000..e8ae12117 Binary files /dev/null and b/Editor/BuildProfile/lib/libwx-metal-cpp.bc differ diff --git a/Editor/BuildProfile/lib/libwx-metal-cpp.bc.meta b/Editor/BuildProfile/lib/libwx-metal-cpp.bc.meta new file mode 100644 index 000000000..28e81d7a7 --- /dev/null +++ b/Editor/BuildProfile/lib/libwx-metal-cpp.bc.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c113acfee35db6b5c61fd4a76596cfd3 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Editor/BuildProfile/lib/mtl_library.jslib b/Editor/BuildProfile/lib/mtl_library.jslib new file mode 100644 index 000000000..b6f7cf5df --- /dev/null +++ b/Editor/BuildProfile/lib/mtl_library.jslib @@ -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(); + } + }); \ No newline at end of file diff --git a/Editor/BuildProfile/lib/mtl_library.jslib.meta b/Editor/BuildProfile/lib/mtl_library.jslib.meta new file mode 100644 index 000000000..3882fefc8 --- /dev/null +++ b/Editor/BuildProfile/lib/mtl_library.jslib.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: dda1926f3454e003333e8085a4f2c0fd +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Editor/Playable/WXPlayableConvertCore.cs b/Editor/Playable/WXPlayableConvertCore.cs index 0adcf9a50..673f8716c 100644 --- a/Editor/Playable/WXPlayableConvertCore.cs +++ b/Editor/Playable/WXPlayableConvertCore.cs @@ -5,134 +5,134 @@ using UnityEngine; namespace WeChatWASM { - public class WXPlayableConvertCore - { - static WXPlayableConvertCore() { } - public static WXPlayableEditorScriptObject config => UnityUtil.GetPlayableEditorConf(); - - public static WXConvertCore.WXExportError DoExport(bool buildWebGL = true) + public class WXPlayableConvertCore { - WXConvertCore.isPlayableBuild = true; - // var preCheckResult = WXConvertCore.PreCheck(); - // if (preCheckResult != WXConvertCore.WXExportError.SUCCEED) - // { - // WXConvertCore.isPlayableBuild = false; - // return preCheckResult; - // } - // WXConvertCore.PreInit(); - var exportResult = WXConvertCore.DoExport(); + static WXPlayableConvertCore() { } + public static WXPlayableEditorScriptObject config => UnityUtil.GetPlayableEditorConf(); - WXConvertCore.isPlayableBuild = false; - return exportResult; - } - - public static WXEditorScriptObject GetFakeScriptObject() - { - return SetDefaultProperties(ConvertPlayableConfigToCommon(config)); - } - - public static WXEditorScriptObject ConvertPlayableConfigToCommon( - WXPlayableEditorScriptObject source, - WXEditorScriptObject target = null) - { - // 创建或使用现有的目标实例 - var newTarget = target ?? ScriptableObject.CreateInstance(); - - // 使用序列化方式深度拷贝公共字段 - 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)) + public static WXConvertCore.WXExportError DoExport(bool buildWebGL = true) { - 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( - sourceField.Name, + WXConvertCore.isPlayableBuild = false; + return exportResult; + } + + public static WXEditorScriptObject GetFakeScriptObject() + { + return SetDefaultProperties(ConvertPlayableConfigToCommon(config)); + } + + public static WXEditorScriptObject ConvertPlayableConfigToCommon( + WXPlayableEditorScriptObject source, + WXEditorScriptObject target = null) + { + // 创建或使用现有的目标实例 + var newTarget = target ?? ScriptableObject.CreateInstance(); + + // 使用序列化方式深度拷贝公共字段 + 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); - - if (targetField != null && - (targetField.FieldType.IsAssignableFrom(sourceField.FieldType) || - (targetField.FieldType.IsValueType && sourceField.FieldType.IsValueType && - targetField.FieldType == sourceField.FieldType))) + 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); - 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) - { - target.ProjectConf.CDN = ""; - target.ProjectConf.assetLoadType = 1; - target.ProjectConf.compressDataPackage = true; + public static WXEditorScriptObject SetDefaultProperties(WXEditorScriptObject target) + { + target.ProjectConf.CDN = ""; + target.ProjectConf.assetLoadType = 1; + target.ProjectConf.compressDataPackage = true; - target.CompileOptions.showMonitorSuggestModal = false; - return target; + target.CompileOptions.showMonitorSuggestModal = false; + return target; + } } - } } \ No newline at end of file diff --git a/Editor/Playable/WXPlayableEditorSettingHelper.cs b/Editor/Playable/WXPlayableEditorSettingHelper.cs index 9c8db576e..382f08698 100644 --- a/Editor/Playable/WXPlayableEditorSettingHelper.cs +++ b/Editor/Playable/WXPlayableEditorSettingHelper.cs @@ -6,358 +6,354 @@ using UnityEngine; namespace WeChatWASM { - [InitializeOnLoad] - 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 + [InitializeOnLoad] + public class WXPlayableSettingsHelperInterface { - 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 return PlayerSettings.GetScriptingBackend(BuildTargetGroup.WeixinMiniGame) == ScriptingImplementation.IL2CPP; #else - return true; + return true; #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)); - formInputData[targetDst] = GUILayout.TextField(formInputData[targetDst], GUILayout.MaxWidth(EditorGUIUtility.currentViewWidth - 270)); - if (GUILayout.Button(new GUIContent("打开"), GUILayout.Width(40))) + + public WXPlayableSettingsHelper() { - if (!formInputData[targetDst].Trim().Equals(string.Empty)) - { - EditorUtility.RevealInFinder(GetAbsolutePath(formInputData[targetDst])); - } - GUIUtility.ExitGUI(); + projectRootPath = System.IO.Path.GetFullPath(Application.dataPath + "/../"); } - if (GUILayout.Button(new GUIContent("选择"), GUILayout.Width(40))) + + public void OnFocus() { - var dstPath = EditorUtility.SaveFolderPanel("选择你的游戏导出目录", string.Empty, string.Empty); - if (dstPath != string.Empty) - { - formInputData[targetDst] = dstPath; - this.saveData(); - } - GUIUtility.ExitGUI(); + loadData(); } - 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(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) + public void OnLostFocus() { - 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; - - 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 formInputData = new Dictionary(); - private Dictionary formIntPopupData = new Dictionary(); - private Dictionary formCheckboxData = new Dictionary(); - - 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 setting = null, Action 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))) + public void OnDisable() { - 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) - EditorGUILayout.LabelField(string.Empty); - GUILayout.EndHorizontal(); + 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)); + 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 formInputData = new Dictionary(); + private Dictionary formIntPopupData = new Dictionary(); + private Dictionary formCheckboxData = new Dictionary(); + + 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 setting = null, Action 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); - } - } } \ No newline at end of file diff --git a/Editor/WXConvertCore.cs b/Editor/WXConvertCore.cs index 2c76b9327..5c83d2639 100644 --- a/Editor/WXConvertCore.cs +++ b/Editor/WXConvertCore.cs @@ -99,6 +99,14 @@ namespace WeChatWASM #endif } } + // 是否使用 iOS Metal 渲染 + public static bool UseiOSMetal + { + get + { + return config.CompileOptions.enableiOSMetal; + } + } // public static void SetPlayableEnabled(bool enabled) // { // isPlayableBuild = enabled; @@ -112,9 +120,12 @@ namespace WeChatWASM CheckBuildTarget(); Init(); // 可能有顺序要求?如果没要求,可挪到此函数外 - if (!isPlayableBuild) { + if (!isPlayableBuild) + { ProcessWxPerfBinaries(); } + // iOS metal 的相关特性 + ProcessWxiOSMetalBinaries(); MakeEnvForLuaAdaptor(); // JSLib SettingWXTextureMinJSLib(); @@ -140,7 +151,7 @@ namespace WeChatWASM return WXExportError.BUILD_WEBGL_FAILED; } dynamic config = isPlayableBuild ? UnityUtil.GetPlayableEditorConf() : UnityUtil.GetEditorConf(); - if (config.ProjectConf.DST == string.Empty) + if (config.ProjectConf.relativeDST == string.Empty) { Debug.LogError("请先配置游戏导出路径"); return WXExportError.BUILD_WEBGL_FAILED; @@ -400,6 +411,41 @@ namespace WeChatWASM return true; } + private static void ProcessWxiOSMetalBinaries() + { + string[] glLibs; + string DS = WXAssetsTextTools.DS; + if (UnityUtil.GetSDKMode() == UnityUtil.SDKMode.Package) + { + glLibs = new string[] + { + $"Packages{DS}com.qq.weixin.minigame{DS}Editor{DS}BuildProfile{DS}lib{DS}libwx-metal-cpp.bc", + $"Packages{DS}com.qq.weixin.minigame{DS}Editor{DS}BuildProfile{DS}lib{DS}mtl_library.jslib", + }; + } + else + { + string glLibRootDir = $"Assets{DS}WX-WASM-SDK-V2{DS}Editor{DS}BuildProfile{DS}lib{DS}"; + glLibs = new string[] + { + $"{glLibRootDir}libwx-metal-cpp.bc", + $"{glLibRootDir}mtl_library.jslib", + }; + } + for (int i = 0; i < glLibs.Length; i++) + { + var importer = AssetImporter.GetAtPath(glLibs[i]) as PluginImporter; +#if PLATFORM_WEIXINMINIGAME + importer.SetCompatibleWithPlatform(BuildTarget.WeixinMiniGame, config.CompileOptions.enableiOSMetal); +#else + importer.SetCompatibleWithPlatform(BuildTarget.WebGL, config.CompileOptions.enableiOSMetal); +#endif + // importer.SaveAndReimport(); + SetPluginCompatibilityByModifyingMetadataFile(glLibs[i], config.CompileOptions.enableiOSMetal); + } + AssetDatabase.Refresh(); + } + private static string GetLuaAdaptorPath(string filename) { string DS = WXAssetsTextTools.DS; @@ -523,13 +569,28 @@ namespace WeChatWASM GraphicsDeviceType[] targets = new GraphicsDeviceType[] { }; #if PLATFORM_WEIXINMINIGAME 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 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)); UnityEngine.Debug.LogFormat("[Converter] adapt framework done! "); @@ -1194,7 +1271,8 @@ namespace WeChatWASM public static void convertDataPackageJS() { - if (!isPlayableBuild) { + if (!isPlayableBuild) + { checkNeedRmovePackageParallelPreload(); } @@ -1317,7 +1395,8 @@ namespace WeChatWASM var buildTemplate = new BuildTemplate( Path.Combine(UnityUtil.GetWxSDKRootPath(), "Runtime", defaultTemplateDir), 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(); // FIX: 2021.2版本生成symbol有bug,导出时生成symbol报错,有symbol才copy @@ -1649,7 +1728,8 @@ namespace WeChatWASM content = content.Replace("$unityVersion$", Application.unityVersion); File.WriteAllText(Path.Combine(dst, "unity-sdk", "index.js"), content, Encoding.UTF8); // content = File.ReadAllText(Path.Combine(Application.dataPath, "WX-WASM-SDK-V2", "Runtime", "wechat-default", "unity-sdk", "storage.js"), Encoding.UTF8); - if (!isPlayableBuild) { + if (!isPlayableBuild) + { content = File.ReadAllText(Path.Combine(UnityUtil.GetWxSDKRootPath(), "Runtime", defaultTemplateDir, "unity-sdk", "storage.js"), Encoding.UTF8); var PreLoadKeys = config.PlayerPrefsKeys.Count > 0 ? JsonMapper.ToJson(config.PlayerPrefsKeys) : "[]"; content = content.Replace("'$PreLoadKeys'", PreLoadKeys); @@ -1903,7 +1983,7 @@ namespace WeChatWASM config.ProjectConf.bundleHashLength.ToString(), bundlePathIdentifierStr, excludeFileExtensionsStr, - config.CompileOptions.Webgl2 ? "2" : "1", + config.CompileOptions.enableiOSMetal ? "5" : (config.CompileOptions.Webgl2 ? "2" : "1"), Application.unityVersion, WXExtEnvDef.pluginVersion, config.ProjectConf.dataFileSubPrefix, @@ -1951,11 +2031,14 @@ namespace WeChatWASM config.CompileOptions.enablePerfAnalysis ? "true" : "false", config.ProjectConf.MemorySize.ToString(), config.SDKOptions.disableMultiTouch ? "true" : "false", + // Perfstream,暂时设为false + "false" }); List replaceList = new List(replaceArrayList); List files = new List { "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 { "game.js", "game.json", "project.config.json", "unity-namespace.js", "check-version.js" }; } diff --git a/Editor/WXEditorSettingHelper.cs b/Editor/WXEditorSettingHelper.cs index 3eed3e3fa..ccfe4ea6a 100644 --- a/Editor/WXEditorSettingHelper.cs +++ b/Editor/WXEditorSettingHelper.cs @@ -54,15 +54,11 @@ namespace WeChatWASM foldInstantGame = WXConvertCore.IsInstantGameAutoStreaming(); projectRootPath = System.IO.Path.GetFullPath(Application.dataPath + "/../"); - - _dstCache = ""; } private static WXEditorScriptObject config; private static bool m_EnablePerfTool = false; - private static string _dstCache; - public void OnFocus() { loadData(); @@ -189,6 +185,7 @@ namespace WeChatWASM this.formCheckbox("profilingMemory", "Profiling Memory"); this.formCheckbox("webgl2", "WebGL2.0"); this.formCheckbox("iOSPerformancePlus", "iOSPerformancePlus(?)", "是否使用iOS高性能+渲染方案,有助于提升渲染兼容性、降低WebContent进程内存"); + // this.formCheckbox("iOSMetal", "iOSMetal(?)", "是否使用iOSMetal渲染方案,需要开启iOS高性能+模式,有助于提升运行性能,降低iOS功耗"); this.formCheckbox("deleteStreamingAssets", "Clear Streaming Assets"); this.formCheckbox("cleanBuild", "Clean WebGL Build"); // this.formCheckbox("cleanCloudDev", "Clean Cloud Dev"); @@ -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(UnityUtil.GetWxSDKRootPath(), "Runtime", "wechat-default", "unity-sdk", "index.js"); config = UnityUtil.GetEditorConf(); - _dstCache = config.ProjectConf.DST; // Instant Game if (WXConvertCore.IsInstantGameAutoStreaming()) @@ -436,7 +432,7 @@ namespace WeChatWASM this.setData("compressDataPackage", config.ProjectConf.compressDataPackage); this.setData("videoUrl", config.ProjectConf.VideoUrl); 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("bundlePathIdentifier", config.ProjectConf.bundlePathIdentifier); this.setData("bundleExcludeExtensions", config.ProjectConf.bundleExcludeExtensions); @@ -452,6 +448,7 @@ namespace WeChatWASM this.setData("customNodePath", config.CompileOptions.CustomNodePath); this.setData("webgl2", config.CompileOptions.Webgl2); this.setData("iOSPerformancePlus", config.CompileOptions.enableIOSPerformancePlus); + this.setData("iOSMetal", config.CompileOptions.enableiOSMetal); this.setData("fbslim", config.CompileOptions.fbslim); this.setData("useFriendRelation", config.SDKOptions.UseFriendRelation); this.setData("useMiniGameChat", config.SDKOptions.UseMiniGameChat); @@ -513,8 +510,8 @@ namespace WeChatWASM config.ProjectConf.compressDataPackage = this.getDataCheckbox("compressDataPackage"); config.ProjectConf.VideoUrl = this.getDataInput("videoUrl"); config.ProjectConf.Orientation = (WXScreenOritation)this.getDataPop("orientation"); - _dstCache = this.getDataInput("dst"); - config.ProjectConf.DST = GetAbsolutePath(_dstCache); + config.ProjectConf.relativeDST = this.getDataInput("dst"); + config.ProjectConf.DST = GetAbsolutePath(config.ProjectConf.relativeDST); config.ProjectConf.bundleHashLength = int.Parse(this.getDataInput("bundleHashLength")); config.ProjectConf.bundlePathIdentifier = this.getDataInput("bundlePathIdentifier"); config.ProjectConf.bundleExcludeExtensions = this.getDataInput("bundleExcludeExtensions"); @@ -530,6 +527,7 @@ namespace WeChatWASM config.CompileOptions.CustomNodePath = this.getDataInput("customNodePath"); config.CompileOptions.Webgl2 = this.getDataCheckbox("webgl2"); config.CompileOptions.enableIOSPerformancePlus = this.getDataCheckbox("iOSPerformancePlus"); + config.CompileOptions.enableiOSMetal = this.getDataCheckbox("iOSMetal"); config.CompileOptions.fbslim = this.getDataCheckbox("fbslim"); config.SDKOptions.UseFriendRelation = this.getDataCheckbox("useFriendRelation"); config.SDKOptions.UseMiniGameChat = this.getDataCheckbox("useMiniGameChat"); diff --git a/Editor/WXExtDef.cs b/Editor/WXExtDef.cs index 3763d7e74..08a5888e4 100644 --- a/Editor/WXExtDef.cs +++ b/Editor/WXExtDef.cs @@ -125,6 +125,10 @@ namespace WeChatWASM { return WXConvertCore.UseIL2CPP; }); + WXExtEnvDef.RegisterAction("WXConvertCore.UseiOSMetal", (args) => + { + return WXConvertCore.UseiOSMetal; + }); WXExtEnvDef.RegisterAction("UnityUtil.GetWxSDKRootPath", (args) => { #if UNITY_2018 diff --git a/Editor/WXPluginVersion.cs b/Editor/WXPluginVersion.cs index 786ec751c..a80dc7ae3 100644 --- a/Editor/WXPluginVersion.cs +++ b/Editor/WXPluginVersion.cs @@ -2,7 +2,7 @@ namespace WeChatWASM { public class WXPluginVersion { - public static string pluginVersion = "202507230322"; // 这一行不要改他,导出的时候会自动替换 + public static string pluginVersion = "202508130841"; // 这一行不要改他,导出的时候会自动替换 } public class WXPluginConf diff --git a/Editor/wx-editor.dll b/Editor/wx-editor.dll index 319c1f9f8..101b01f0f 100644 Binary files a/Editor/wx-editor.dll and b/Editor/wx-editor.dll differ diff --git a/Editor/wx-editor.xml b/Editor/wx-editor.xml index 05b31bf33..8bd12eb5f 100644 --- a/Editor/wx-editor.xml +++ b/Editor/wx-editor.xml @@ -381,6 +381,11 @@ 视频url + + + 导出路径(相对路径) + + 导出路径(绝对路径) @@ -643,6 +648,11 @@ 是否使用iOS高性能Plus + + + 是否使用iOS metal指令流 + + 是否使用brotli多线程压缩 @@ -773,6 +783,11 @@ 试玩 appid + + + 导出路径(相对路径) + + 导出路径(绝对路径) diff --git a/Editor/wx-editor.xml.meta b/Editor/wx-editor.xml.meta index 17dea8b90..4073c900b 100644 --- a/Editor/wx-editor.xml.meta +++ b/Editor/wx-editor.xml.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4a90389cebd5db8b1ab58b0a3ca5cdc8 +guid: d62d55801270387da185f082bfba7833 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/Plugins/SDK-Call-JS.jslib b/Runtime/Plugins/SDK-Call-JS.jslib index 3256e5b87..7c5f0a0bb 100644 --- a/Runtime/Plugins/SDK-Call-JS.jslib +++ b/Runtime/Plugins/SDK-Call-JS.jslib @@ -115,8 +115,8 @@ WX_SyncFunction_tnn: function(functionName, returnType, param1, param2){ stringToUTF8((res || ''), buffer, bufferSize); return buffer; }, -WX_ClassOneWayFunction: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)); +WX_ClassConstructor:function(functionName, returnType, successType, failType, completeType, 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 buffer = _malloc(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) { 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); }, }) \ No newline at end of file diff --git a/Runtime/Plugins/WxGameDataMonitor.jslib b/Runtime/Plugins/WxGameDataMonitor.jslib new file mode 100644 index 000000000..f9b504c7f --- /dev/null +++ b/Runtime/Plugins/WxGameDataMonitor.jslib @@ -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) + }, +}); \ No newline at end of file diff --git a/Runtime/Plugins/WxGameDataMonitor.jslib.meta b/Runtime/Plugins/WxGameDataMonitor.jslib.meta new file mode 100644 index 000000000..a0a033d4b --- /dev/null +++ b/Runtime/Plugins/WxGameDataMonitor.jslib.meta @@ -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: diff --git a/Runtime/Plugins/wx-perf.dll b/Runtime/Plugins/wx-perf.dll index 467d744c3..1649254cb 100644 Binary files a/Runtime/Plugins/wx-perf.dll and b/Runtime/Plugins/wx-perf.dll differ diff --git a/Runtime/Plugins/wx-runtime-editor.dll b/Runtime/Plugins/wx-runtime-editor.dll index 26d8f6e99..0c903308c 100644 Binary files a/Runtime/Plugins/wx-runtime-editor.dll and b/Runtime/Plugins/wx-runtime-editor.dll differ diff --git a/Runtime/Plugins/wx-runtime-editor.xml b/Runtime/Plugins/wx-runtime-editor.xml index ccaca068c..498b52a2d 100644 --- a/Runtime/Plugins/wx-runtime-editor.xml +++ b/Runtime/Plugins/wx-runtime-editor.xml @@ -1699,26 +1699,6 @@ 如果返回的是字符串,则数据在这个字段 - - - 文件的类型和存取的权限,对应 POSIX stat.st_mode - - - - - 文件大小,单位:B,对应 POSIX stat.st_size - - - - - 文件最近一次被存取或被执行的时间,UNIX 时间戳,对应 POSIX stat.st_atime - - - - - 文件最后一次被修改的时间,UNIX 时间戳,对应 POSIX stat.st_mtime - - 文件的路径 @@ -3129,19 +3109,24 @@  是否结束 - + - 接口调用结束的回调函数(调用成功、失败都会执行) + 从不同渠道获得的OPENLINK字符串 - + - 接口调用失败的回调函数 + 选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填 - + - 接口调用成功的回调函数 + 从不同渠道获得的OPENLINK字符串 + + + + + 选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填 @@ -4138,26 +4123,6 @@ 取值为0/1,取值为0表示会把 `App`、`Page` 的生命周期函数和 `wx` 命名空间下的函数调用写入日志,取值为1则不会。默认值是 0 - - - 从不同渠道获得的OPENLINK字符串 - - - - - 选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填 - - - - - 从不同渠道获得的OPENLINK字符串 - - - - - 选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填 - - 是否有新版本 diff --git a/Runtime/Plugins/wx-runtime-editor.xml.meta b/Runtime/Plugins/wx-runtime-editor.xml.meta index f377905e6..5a3e323b2 100644 --- a/Runtime/Plugins/wx-runtime-editor.xml.meta +++ b/Runtime/Plugins/wx-runtime-editor.xml.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: a18857814588f027fbba2af025670e61 +guid: 97f6a2a83987331a726aafacdb65cb9a DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/Plugins/wx-runtime.dll b/Runtime/Plugins/wx-runtime.dll index fa9e3951e..bc6e70bea 100644 Binary files a/Runtime/Plugins/wx-runtime.dll and b/Runtime/Plugins/wx-runtime.dll differ diff --git a/Runtime/Plugins/wx-runtime.xml b/Runtime/Plugins/wx-runtime.xml index a73f981c2..d4e4841fa 100644 --- a/Runtime/Plugins/wx-runtime.xml +++ b/Runtime/Plugins/wx-runtime.xml @@ -1705,26 +1705,6 @@ 如果返回的是字符串,则数据在这个字段 - - - 文件的类型和存取的权限,对应 POSIX stat.st_mode - - - - - 文件大小,单位:B,对应 POSIX stat.st_size - - - - - 文件最近一次被存取或被执行的时间,UNIX 时间戳,对应 POSIX stat.st_atime - - - - - 文件最后一次被修改的时间,UNIX 时间戳,对应 POSIX stat.st_mtime - - 文件的路径 @@ -3135,19 +3115,24 @@  是否结束 - + - 接口调用结束的回调函数(调用成功、失败都会执行) + 从不同渠道获得的OPENLINK字符串 - + - 接口调用失败的回调函数 + 选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填 - + - 接口调用成功的回调函数 + 从不同渠道获得的OPENLINK字符串 + + + + + 选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填 @@ -4144,26 +4129,6 @@ 取值为0/1,取值为0表示会把 `App`、`Page` 的生命周期函数和 `wx` 命名空间下的函数调用写入日志,取值为1则不会。默认值是 0 - - - 从不同渠道获得的OPENLINK字符串 - - - - - 选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填 - - - - - 从不同渠道获得的OPENLINK字符串 - - - - - 选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填 - - 是否有新版本 diff --git a/Runtime/Plugins/wx-runtime.xml.meta b/Runtime/Plugins/wx-runtime.xml.meta index 9fed031e5..75bab8e4e 100644 --- a/Runtime/Plugins/wx-runtime.xml.meta +++ b/Runtime/Plugins/wx-runtime.xml.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: b521413075c053e47a06a3b8bc3b7725 +guid: 9f3ae80f5f6e468ce243239a00cf79d8 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/WX.cs b/Runtime/WX.cs index cbb9acb6f..9261cb09f 100644 --- a/Runtime/WX.cs +++ b/Runtime/WX.cs @@ -4036,32 +4036,6 @@ namespace WeChatWASM return WXSDKManagerHandler.Instance.GetLogManager(option); } - /// - /// [[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); - /// }) - /// ``` - /// - /// - public static WXPageManager CreatePageManager() - { - return WXSDKManagerHandler.Instance.CreatePageManager(); - } - /// /// [[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` diff --git a/Runtime/WXBase.cs b/Runtime/WXBase.cs index 3daf90bc9..31be7b595 100644 --- a/Runtime/WXBase.cs +++ b/Runtime/WXBase.cs @@ -1127,6 +1127,32 @@ namespace WeChatWASM WXSDKManagerHandler.Instance.NotifyMiniProgramPlayableStatus(option); } #endregion + + /// + /// [[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); + /// }) + /// ``` + /// + /// + public static WXPageManager CreatePageManager() + { + return WXSDKManagerHandler.Instance.CreatePageManager(); + } } } #endif diff --git a/Runtime/WXSDKPerf/WXPerfEngine.cs b/Runtime/WXSDKPerf/WXPerfEngine.cs index 88cdd1586..19a1f7cf9 100644 --- a/Runtime/WXSDKPerf/WXPerfEngine.cs +++ b/Runtime/WXSDKPerf/WXPerfEngine.cs @@ -8,6 +8,10 @@ using UnityEngine; using UnityEngine.Scripting; using System.IO; +using Unity.Profiling; +using UnityEngine.Profiling; +using Debug = UnityEngine.Debug; + #if PLATFORM_WEIXINMINIGAME || PLATFORM_WEBGL || UNITY_EDITOR @@ -20,17 +24,17 @@ namespace WXSDKPerf public class WXPerfEngine { #if !UNITY_EDITOR - static WXPerfEngine_Implementation m_PerfEngineImplementation = null; + static WXPerfEngine_Implementation m_PerfEngineImplementation = null; #endif [RuntimeInitializeOnLoadMethod] public static void StartWXPerfEngine() { #if UNITY_EDITOR - return; + return; #else m_PerfEngineImplementation = new WXPerfEngine_Implementation(); - m_PerfEngineImplementation.StartPerfEngine(); + m_PerfEngineImplementation.StartPerfEngine(); #endif } @@ -45,7 +49,7 @@ namespace WXSDKPerf public static void Annotation(string InAnnotationString) { #if UNITY_EDITOR - return; + return; #else // Don't record annotation if we are not recording. if (!IsRecording()) @@ -68,7 +72,7 @@ namespace WXSDKPerf #endif } - + /// /// 检查是否正在录制性能数据 /// @@ -89,14 +93,14 @@ namespace WXSDKPerf #else DateTime timestamp = DateTime.Now; 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 - 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); - + #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); #endif #endif @@ -109,7 +113,7 @@ namespace WXSDKPerf public static void SetLuaState(IntPtr L) { #if UNITY_EDITOR - return; + return; #else if (m_PerfEngineImplementation == null) { @@ -120,7 +124,7 @@ namespace WXSDKPerf m_PerfEngineImplementation.SetLuaState(L); #endif } - + /// /// 声明自定义性能指标 /// @@ -130,7 +134,7 @@ namespace WXSDKPerf public static void DeclareCustomStatInfo(string inStatName, string inStatCategory, int inStatInterpType = 1) { #if UNITY_EDITOR - return; + return; #else if (m_PerfEngineImplementation == null) { @@ -151,7 +155,7 @@ namespace WXSDKPerf public static void SetCustomStatValue(string inStatName, float inValue) { #if UNITY_EDITOR - return; + return; #else if (m_PerfEngineImplementation == null) { @@ -171,7 +175,7 @@ namespace WXSDKPerf public static void AddCustomStatInfoBy(string inStatName, float inValue) { #if UNITY_EDITOR - return; + return; #else if (m_PerfEngineImplementation == null) { @@ -179,9 +183,9 @@ namespace WXSDKPerf return; } - m_PerfEngineImplementation.AddCustomStatInfoBy(inStatName, inValue); + m_PerfEngineImplementation.AddCustomStatInfoBy(inStatName, inValue); #endif - + } @@ -195,11 +199,11 @@ namespace WXSDKPerf /// 是否启用资源捕获 /// 是否启用Lua内存监控 /// 是否启用Lua函数内存跟踪 - 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) { #if UNITY_EDITOR - return; + return; #else if (m_PerfEngineImplementation == null) { @@ -207,7 +211,7 @@ namespace WXSDKPerf return; } - m_PerfEngineImplementation.StartRecordManually(inEnableStackTrace, inEnableStatInfo, inFrequentScreenShot, inEnablebRenderInst, + m_PerfEngineImplementation.StartRecordManually(inEnableStackTrace, inEnableStatInfo, inFrequentScreenShot, inEnablebRenderInst, inEnableCaptureResource, inEnableLuaMemoryMonitor, inEnableLuaFunctionMemoryTracking); #endif } @@ -218,7 +222,7 @@ namespace WXSDKPerf public static void StopRecordManually() { #if UNITY_EDITOR - return; + return; #else if (m_PerfEngineImplementation == null) { diff --git a/Runtime/playable-default/check-version.js.meta b/Runtime/playable-default/check-version.js.meta index cb3eef9b9..f05c37133 100644 --- a/Runtime/playable-default/check-version.js.meta +++ b/Runtime/playable-default/check-version.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: e5108f88099bb61c1ac7bce85c058bbb -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: c15400694abb8fabf306a6fd2b158846 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/data-package.meta b/Runtime/playable-default/data-package.meta index c420d8876..18afb1d37 100644 --- a/Runtime/playable-default/data-package.meta +++ b/Runtime/playable-default/data-package.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 0273befd5791516c05640b866a4057ac +guid: c4a88a636abf822f34d574d6ee34e295 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/playable-default/data-package/game.js.meta b/Runtime/playable-default/data-package/game.js.meta index 642706f47..fca95712a 100644 --- a/Runtime/playable-default/data-package/game.js.meta +++ b/Runtime/playable-default/data-package/game.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 92af1c93c32d8868b037a614a7c51557 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: cb06e837a3facbeb24e11fe6582e9128 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/events.js.meta b/Runtime/playable-default/events.js.meta index 510a84ef9..22ad78819 100644 --- a/Runtime/playable-default/events.js.meta +++ b/Runtime/playable-default/events.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 82a6bdd86dff7182973b291cb71e97cf -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: db5ef70357d98c71ca6dcf102c41cd04 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/game.js.meta b/Runtime/playable-default/game.js.meta index 5673d7fd9..dc23a6964 100644 --- a/Runtime/playable-default/game.js.meta +++ b/Runtime/playable-default/game.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 531515f3324b0cf5a249ca868fbb957e -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: fa66f830a3ba6fc3e58b5436e7d485e4 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/game.json.meta b/Runtime/playable-default/game.json.meta index 201839a98..19bd0cd24 100644 --- a/Runtime/playable-default/game.json.meta +++ b/Runtime/playable-default/game.json.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 3b395b6e591cc8b3668e0b64e63fc88b -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 1c39cef4a112f4a28d1cb70fc1a0f260 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/playable-fix.js.meta b/Runtime/playable-default/playable-fix.js.meta index 83e9f5e7c..525894773 100644 --- a/Runtime/playable-default/playable-fix.js.meta +++ b/Runtime/playable-default/playable-fix.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: d04f0a28a0ef5cdd7a1d23182b85b42f -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 67574d2a36b01e45df2de9492b3a6922 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/plugin-config.js.meta b/Runtime/playable-default/plugin-config.js.meta index de6042ee1..3bd4964f9 100644 --- a/Runtime/playable-default/plugin-config.js.meta +++ b/Runtime/playable-default/plugin-config.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 9bcc1936d8e45b5791c599fe8253919c -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: e8fe6206eebb31cd0b02f29934d68a81 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/plugins.meta b/Runtime/playable-default/plugins.meta index 3ecc6d920..04e0a5c61 100644 --- a/Runtime/playable-default/plugins.meta +++ b/Runtime/playable-default/plugins.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d52a1b6e1c06472f3a3a461209736492 +guid: 78cb062ead4e1a68b222c42e86f3881d folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/playable-default/plugins/check-update.js.meta b/Runtime/playable-default/plugins/check-update.js.meta index 28e737324..a3915ed9d 100644 --- a/Runtime/playable-default/plugins/check-update.js.meta +++ b/Runtime/playable-default/plugins/check-update.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: bbec39b14da95d130e2852e718bcee52 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 580363ef68ba8c1d13a790410e9cf1b4 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/plugins/screen-adapter.js.meta b/Runtime/playable-default/plugins/screen-adapter.js.meta index e4d35a56a..ab2fd8eca 100644 --- a/Runtime/playable-default/plugins/screen-adapter.js.meta +++ b/Runtime/playable-default/plugins/screen-adapter.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 5811c5c2d62fc7802c64f1d2b23745f1 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 195d5ca3f442cee88591f5e8c7d2f1ff + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/project.config.json.meta b/Runtime/playable-default/project.config.json.meta index c9359895f..5d7d4b966 100644 --- a/Runtime/playable-default/project.config.json.meta +++ b/Runtime/playable-default/project.config.json.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 6dae963d59fa4418d09722a93e87d793 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: b5c01d3519079af920526d67210dd551 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/texture-config.js.meta b/Runtime/playable-default/texture-config.js.meta index f56c6670a..1620c4195 100644 --- a/Runtime/playable-default/texture-config.js.meta +++ b/Runtime/playable-default/texture-config.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 854f4bd8ff1dd4750841937bcddeaf70 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: b92e6aa91743fdbf008f8bede8d3df2d + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-namespace.js.meta b/Runtime/playable-default/unity-namespace.js.meta index 98238ed1a..7e7439137 100644 --- a/Runtime/playable-default/unity-namespace.js.meta +++ b/Runtime/playable-default/unity-namespace.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 2c062721204b988f19733cfdcfb64e34 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 1cda8e6144d7e0cb3e9b2e87290a4b15 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-playable-plugin.meta b/Runtime/playable-default/unity-playable-plugin.meta index 5bedee76a..659ec8ab9 100644 --- a/Runtime/playable-default/unity-playable-plugin.meta +++ b/Runtime/playable-default/unity-playable-plugin.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 31f9cc6cd458af9ae649ac0f4cc8772e +guid: 18d1d197cea552ead2def3964b3c8700 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/playable-default/unity-playable-plugin/index.js.meta b/Runtime/playable-default/unity-playable-plugin/index.js.meta index ae879b0ee..ce8ef9fff 100644 --- a/Runtime/playable-default/unity-playable-plugin/index.js.meta +++ b/Runtime/playable-default/unity-playable-plugin/index.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 2a92708403fe30f324cbf69ccf64a5ca -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: eb2813dfe3fa1c6b1d741a5c0c462d3e + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-sdk.meta b/Runtime/playable-default/unity-sdk.meta index 92b56b4ef..3b2af480e 100644 --- a/Runtime/playable-default/unity-sdk.meta +++ b/Runtime/playable-default/unity-sdk.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d0a26195cb9a986d48760de79dc69c05 +guid: e7a7883821bb6e97f969f765de11ff4a folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/playable-default/unity-sdk/audio.meta b/Runtime/playable-default/unity-sdk/audio.meta index 0763cedae..6ff2fb4a5 100644 --- a/Runtime/playable-default/unity-sdk/audio.meta +++ b/Runtime/playable-default/unity-sdk/audio.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ceec02b40e3331d02d75fa809a9760a7 +guid: 1e6005245ccb35fa752302b46787c478 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/playable-default/unity-sdk/audio/common.js.meta b/Runtime/playable-default/unity-sdk/audio/common.js.meta index 4eacd8bca..593d4bdf0 100644 --- a/Runtime/playable-default/unity-sdk/audio/common.js.meta +++ b/Runtime/playable-default/unity-sdk/audio/common.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: a5bfd354ed4424c67e796543113905e3 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 6fb8a5b0bfb4360bd0515097b565e3c8 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-sdk/audio/const.js.meta b/Runtime/playable-default/unity-sdk/audio/const.js.meta index 95b4fa6f1..b4c350192 100644 --- a/Runtime/playable-default/unity-sdk/audio/const.js.meta +++ b/Runtime/playable-default/unity-sdk/audio/const.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 3a4d82e9de0cb38b0c9224360f3ad139 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 156df6b301e047025af847512ddb3015 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-sdk/audio/index.js.meta b/Runtime/playable-default/unity-sdk/audio/index.js.meta index e91d0155f..e183e3f69 100644 --- a/Runtime/playable-default/unity-sdk/audio/index.js.meta +++ b/Runtime/playable-default/unity-sdk/audio/index.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 23b767c936834d1b790a40ea00e26d64 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 7e612dde8d2e994f1ac96b77bae752fe + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-sdk/audio/inner-audio.js.meta b/Runtime/playable-default/unity-sdk/audio/inner-audio.js.meta index 394be452d..e6b3f553a 100644 --- a/Runtime/playable-default/unity-sdk/audio/inner-audio.js.meta +++ b/Runtime/playable-default/unity-sdk/audio/inner-audio.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 968b47eba0189213d3a4cfabbadee54c -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: b6a5cb1128fa120b6e843be3f9fba0a0 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-sdk/audio/store.js.meta b/Runtime/playable-default/unity-sdk/audio/store.js.meta index 4454dee39..72baa735e 100644 --- a/Runtime/playable-default/unity-sdk/audio/store.js.meta +++ b/Runtime/playable-default/unity-sdk/audio/store.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 710313a81f77482d26012751c5d6592a -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: b68523d55ba6f8ae5a659f967f82133d + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-sdk/audio/unity-audio.js.meta b/Runtime/playable-default/unity-sdk/audio/unity-audio.js.meta index 2ed354708..affca29a1 100644 --- a/Runtime/playable-default/unity-sdk/audio/unity-audio.js.meta +++ b/Runtime/playable-default/unity-sdk/audio/unity-audio.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 8342caa71b7edf46f906aa855aea4ef3 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 2ac9f2b83002d1ec2e2247e0cdb228f0 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-sdk/audio/utils.js.meta b/Runtime/playable-default/unity-sdk/audio/utils.js.meta index 71871e238..baa418449 100644 --- a/Runtime/playable-default/unity-sdk/audio/utils.js.meta +++ b/Runtime/playable-default/unity-sdk/audio/utils.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: c92653458db092aae35564ef3edd6252 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: adbeb6401225275231ddaaaa9f6b6f03 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-sdk/canvas-context.js.meta b/Runtime/playable-default/unity-sdk/canvas-context.js.meta index 4d41da479..6f1a4feb7 100644 --- a/Runtime/playable-default/unity-sdk/canvas-context.js.meta +++ b/Runtime/playable-default/unity-sdk/canvas-context.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 6e3f60a883fb2f8249ce74acf2c14acd -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 72dea42cf6a92563c2eb35bfc705b1cd + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-sdk/canvas.js.meta b/Runtime/playable-default/unity-sdk/canvas.js.meta index 2ae4eb817..6b6e9ca52 100644 --- a/Runtime/playable-default/unity-sdk/canvas.js.meta +++ b/Runtime/playable-default/unity-sdk/canvas.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: cdaa05d30f80a46dddcc25d674615153 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 7fdd2dd7566416f949f8356d331746ac + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-sdk/conf.js.meta b/Runtime/playable-default/unity-sdk/conf.js.meta index 04cdeb089..b4c1da0fb 100644 --- a/Runtime/playable-default/unity-sdk/conf.js.meta +++ b/Runtime/playable-default/unity-sdk/conf.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 95650874bc818949f578987590377532 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 65df04284413d48ee42446044234868a + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-sdk/file-info.js.meta b/Runtime/playable-default/unity-sdk/file-info.js.meta index ea23a1717..95e339956 100644 --- a/Runtime/playable-default/unity-sdk/file-info.js.meta +++ b/Runtime/playable-default/unity-sdk/file-info.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 7e863e19487a6cda9d53bbfc8e3fbd03 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 68b177c389523b0309164feca7e7ab27 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-sdk/fix.js.meta b/Runtime/playable-default/unity-sdk/fix.js.meta index 9ba2119e5..a64548e0b 100644 --- a/Runtime/playable-default/unity-sdk/fix.js.meta +++ b/Runtime/playable-default/unity-sdk/fix.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 9733080f2e9cef0f03c3d0ee1dad8983 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 6e9148ca36d7c15db666b4e0db71b892 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-sdk/fs.js.meta b/Runtime/playable-default/unity-sdk/fs.js.meta index 88754bd69..51207c127 100644 --- a/Runtime/playable-default/unity-sdk/fs.js.meta +++ b/Runtime/playable-default/unity-sdk/fs.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: d1ab83ac4fb090597d227ff725dbb6f7 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 977c8e671b8efe8f47b0fb976752e230 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-sdk/index.js.meta b/Runtime/playable-default/unity-sdk/index.js.meta index 00a143387..486abfae8 100644 --- a/Runtime/playable-default/unity-sdk/index.js.meta +++ b/Runtime/playable-default/unity-sdk/index.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 745ed2f1262c74198123f00a889f2b22 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: a60d6852bd367e3badb30ab96b18ec48 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-sdk/logger.js.meta b/Runtime/playable-default/unity-sdk/logger.js.meta index 4cde22df8..92b93724e 100644 --- a/Runtime/playable-default/unity-sdk/logger.js.meta +++ b/Runtime/playable-default/unity-sdk/logger.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 23879d36971922e903eddd9885892fb3 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 6a7cf5b3ddf8d71de32c6e2f477b490d + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-sdk/mobileKeyboard.meta b/Runtime/playable-default/unity-sdk/mobileKeyboard.meta index 6502a8843..21492d6c2 100644 --- a/Runtime/playable-default/unity-sdk/mobileKeyboard.meta +++ b/Runtime/playable-default/unity-sdk/mobileKeyboard.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 481df7275cffcd473c8a1114f7d73979 +guid: fb7a6ff3ecfe9b79b0eaddccc4328777 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/playable-default/unity-sdk/mobileKeyboard/index.js.meta b/Runtime/playable-default/unity-sdk/mobileKeyboard/index.js.meta index 1b1f330cf..88663a2bd 100644 --- a/Runtime/playable-default/unity-sdk/mobileKeyboard/index.js.meta +++ b/Runtime/playable-default/unity-sdk/mobileKeyboard/index.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 62febf55450b14dd5e6d76f19bbd702a -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 11508d8304ad8bd6c42dcade03900713 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-sdk/module-helper.js.meta b/Runtime/playable-default/unity-sdk/module-helper.js.meta index f55220b70..e87a9467c 100644 --- a/Runtime/playable-default/unity-sdk/module-helper.js.meta +++ b/Runtime/playable-default/unity-sdk/module-helper.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: faeaa5621fd2c89ab8be9d59a5bfd49b -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 30c6bdb4bc431dee2b0f4a24f407b0b0 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-sdk/recorder.js.meta b/Runtime/playable-default/unity-sdk/recorder.js.meta index 0498b1f55..05e2e7669 100644 --- a/Runtime/playable-default/unity-sdk/recorder.js.meta +++ b/Runtime/playable-default/unity-sdk/recorder.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 1ce4ef1463f0ff2eb0b56e23d2871901 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 7dcfcce75eb8eaf257ef2ee6e1e725ad + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-sdk/resType.js b/Runtime/playable-default/unity-sdk/resType.js index e81a85770..1cc38b161 100644 --- a/Runtime/playable-default/unity-sdk/resType.js +++ b/Runtime/playable-default/unity-sdk/resType.js @@ -1,4 +1,11 @@ export const ResType = { + Gamepad: { + axes: 'IAnyObject[]', + buttons: 'IAnyObject[]', + connected: 'bool', + id: 'string', + index: 'string', + }, AccountInfo: { miniProgram: 'MiniProgram', plugin: 'Plugin', @@ -496,7 +503,7 @@ export const ResType = { headUrl: 'string', nickname: 'string', nonceId: 'string', - otherInfos: 'AnyKeyword[]', + otherInfos: 'any[]', replayStatus: 'number', status: 'number', errMsg: 'string', @@ -505,7 +512,7 @@ export const ResType = { headUrl: 'string', nickname: 'string', noticeId: 'string', - otherInfos: 'AnyKeyword[]', + otherInfos: 'any[]', reservable: 'bool', startTime: 'string', status: 'number', @@ -574,6 +581,11 @@ export const ResType = { weakNet: 'bool', errMsg: 'string', }, + GetPhoneNumberSuccessCallbackResult: { + code: 'string', + errMsg: 'string', + errno: 'number', + }, GetPrivacySettingSuccessCallbackResult: { needAuthorization: 'bool', privacyContractName: 'string', @@ -598,6 +610,10 @@ export const ResType = { mainSwitch: 'bool', itemSettings: 'object', }, + GetShowSplashAdStatusSuccessCallbackResult: { + status: 'string', + errMsg: 'string', + }, GetStorageInfoSuccessCallbackOption: { currentSize: 'number', keys: 'string[]', @@ -724,6 +740,12 @@ export const ResType = { message: 'string', stack: 'string', }, + OnGamepadConnectedListenerResult: { + gamepad: 'string', + }, + OnGamepadDisconnectedListenerResult: { + gamepad: 'string', + }, OnHandoffListenerResult: { query: 'string', }, @@ -741,14 +763,6 @@ export const ResType = { OnMemoryWarningListenerResult: { level: 'number', }, - OnMenuButtonBoundingClientRectWeightChangeListenerResult: { - bottom: 'number', - height: 'number', - left: 'number', - right: 'number', - top: 'number', - width: 'number', - }, OnMouseDownListenerResult: { button: 'number', timeStamp: 'long', @@ -849,17 +863,6 @@ export const ResType = { subscriptionsSetting: 'SubscriptionsSetting', errMsg: 'string', }, - OperateGameRecorderVideoOption: { - atempo: 'number', - audioMix: 'bool', - bgm: 'string', - desc: 'string', - path: 'string', - query: 'string', - timeRange: 'number[]', - title: 'string', - volume: 'number', - }, MediaSource: { url: 'string', poster: 'string', diff --git a/Runtime/playable-default/unity-sdk/resType.js.meta b/Runtime/playable-default/unity-sdk/resType.js.meta index 51752895f..f728c4554 100644 --- a/Runtime/playable-default/unity-sdk/resType.js.meta +++ b/Runtime/playable-default/unity-sdk/resType.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 4804e01bf66b4037ae3257077b1fa612 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: c56540bc7d11e552772f243a3490e7b6 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-sdk/resTypeOther.js.meta b/Runtime/playable-default/unity-sdk/resTypeOther.js.meta index 9ccd6f00b..492219f4a 100644 --- a/Runtime/playable-default/unity-sdk/resTypeOther.js.meta +++ b/Runtime/playable-default/unity-sdk/resTypeOther.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: b53fa697f1378a92419ab4cdf86f71f7 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: d45eb9ddd628a3d2b9adf36b4a0d7cb5 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-sdk/response.js.meta b/Runtime/playable-default/unity-sdk/response.js.meta index 76b8485e4..29222d224 100644 --- a/Runtime/playable-default/unity-sdk/response.js.meta +++ b/Runtime/playable-default/unity-sdk/response.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: c0bdb6ec2e9b51a1de21189c1df0b82d -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 301d2ea00c15d6807a740b81efa9ddd6 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-sdk/sdk.js b/Runtime/playable-default/unity-sdk/sdk.js index d1230f719..0c1957ed6 100644 --- a/Runtime/playable-default/unity-sdk/sdk.js +++ b/Runtime/playable-default/unity-sdk/sdk.js @@ -23,7 +23,7 @@ function getClassObject(className, id) { // eslint-disable-next-line @typescript-eslint/naming-convention 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 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 @@ -42,13 +42,22 @@ function WX_ClassOneWayNoFunction(className, functionName, id, ...params) { if (!obj) { 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 { 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); - + // specialJS if (lowerFunctionName === 'login') { if (!config.timeout) { delete config.timeout; @@ -111,7 +120,7 @@ export default { moduleHelper.send(`_${functionName}Callback`, resStr); }; onEventLists[functionName].push(callback); - wx[functionName.replace(/^\w/, a => a.toLowerCase())](callback); + wx[functionName.replace(/^\w/, (a) => a.toLowerCase())](callback); }, WX_OffEventRegister(functionName) { (onEventLists[functionName] || []).forEach((v) => { @@ -225,7 +234,7 @@ export default { }, WX_SyncFunction_t(functionName, returnType) { 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))); return JSON.stringify(res); } @@ -262,10 +271,10 @@ export default { formatResponse(returnType, 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 callbackId = uid(); - const obj = wx[functionName.replace(/^\w/, a => a.toLowerCase())]({ + const obj = wx[functionName.replace(/^\w/, (a) => a.toLowerCase())]({ ...config, success(res) { formatResponse(successType, res); @@ -293,7 +302,7 @@ export default { return callbackId; }, 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(); if (!ClassLists[returnType]) { ClassLists[returnType] = {}; @@ -347,10 +356,10 @@ export default { ClassOnEventLists[className + functionName][id + eventName].push(callback); // WXVideoDecoder OnEvent 不规范 特殊处理 if (className === 'WXVideoDecoder') { - obj[functionName.replace(/^\w/, a => a.toLowerCase())](eventName, callback); + obj[functionName.replace(/^\w/, (a) => a.toLowerCase())](eventName, callback); } else { - obj[functionName.replace(/^\w/, a => a.toLowerCase())](callback); + obj[functionName.replace(/^\w/, (a) => a.toLowerCase())](callback); } }, WX_ClassOffEventFunction(className, functionName, id, eventName) { @@ -389,7 +398,7 @@ export default { if (!obj) { 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)); }, WX_ClassOneWayNoFunction_vt(className, functionName, id, param1) { @@ -399,4 +408,41 @@ export default { WX_ClassOneWayNoFunction_vn(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); + }, + }); + } + }, }; diff --git a/Runtime/playable-default/unity-sdk/sdk.js.meta b/Runtime/playable-default/unity-sdk/sdk.js.meta index 216f77e64..973f80ce4 100644 --- a/Runtime/playable-default/unity-sdk/sdk.js.meta +++ b/Runtime/playable-default/unity-sdk/sdk.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 45586bcf2aec8da319b74e07858c2427 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 218606c3f450c1c1cf4e24f7603acf4b + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-sdk/special-callbacks.js.meta b/Runtime/playable-default/unity-sdk/special-callbacks.js.meta index e964bc584..a667d22a5 100644 --- a/Runtime/playable-default/unity-sdk/special-callbacks.js.meta +++ b/Runtime/playable-default/unity-sdk/special-callbacks.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 38fecf1cc6b371057e50349b5f3551cd -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: a4bc08212e082d832b4fad30fed91b86 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-sdk/texture.js.meta b/Runtime/playable-default/unity-sdk/texture.js.meta index c237e20ea..7aa92c80d 100644 --- a/Runtime/playable-default/unity-sdk/texture.js.meta +++ b/Runtime/playable-default/unity-sdk/texture.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: f142ec01c4dba069b031185ebf7b072b -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 50dece5633fe35aec0aff2bf14a6c7e6 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-sdk/touch.meta b/Runtime/playable-default/unity-sdk/touch.meta index 69900ba45..7aaa67dfb 100644 --- a/Runtime/playable-default/unity-sdk/touch.meta +++ b/Runtime/playable-default/unity-sdk/touch.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4b807ee5567f2a193edfca4bdffbd798 +guid: a03ef41adad69344f6b02da97524a661 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/playable-default/unity-sdk/touch/index.js.meta b/Runtime/playable-default/unity-sdk/touch/index.js.meta index 5b29a241e..eef54d170 100644 --- a/Runtime/playable-default/unity-sdk/touch/index.js.meta +++ b/Runtime/playable-default/unity-sdk/touch/index.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 8a6e150eef26403510c814e0e93a2694 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 9fb686830068e264983c54fa39f1a6ec + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-sdk/util.js.meta b/Runtime/playable-default/unity-sdk/util.js.meta index 1ebb7b57f..8ca723828 100644 --- a/Runtime/playable-default/unity-sdk/util.js.meta +++ b/Runtime/playable-default/unity-sdk/util.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 4c10ebb6213c7a7fa92a91ba5c9649ee -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 5c10a14c900e002c7ed8fa34e904bf2e + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-sdk/utils.js.meta b/Runtime/playable-default/unity-sdk/utils.js.meta index 0c20f49bd..7c845d0af 100644 --- a/Runtime/playable-default/unity-sdk/utils.js.meta +++ b/Runtime/playable-default/unity-sdk/utils.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: e9a5598b8047e5073d8baa4c8df0c978 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 1850ab455b109b41cfe2d70eeaf5b212 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-sdk/video.js.meta b/Runtime/playable-default/unity-sdk/video.js.meta index 8486d4011..e9448eb25 100644 --- a/Runtime/playable-default/unity-sdk/video.js.meta +++ b/Runtime/playable-default/unity-sdk/video.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 828f84320fa56abfa00ee9a5c916cbb9 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 340b135265e0ca2292b8a0a6bb895e32 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-sdk/video.meta b/Runtime/playable-default/unity-sdk/video.meta index d00b60366..21726b0dc 100644 --- a/Runtime/playable-default/unity-sdk/video.meta +++ b/Runtime/playable-default/unity-sdk/video.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4b8a6a9e53972c103f0eb844fed1ea99 +guid: 01e494f408a34441aabbca46e6e43716 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/playable-default/unity-sdk/video/index.js.meta b/Runtime/playable-default/unity-sdk/video/index.js.meta index f4b5664e3..e1a494707 100644 --- a/Runtime/playable-default/unity-sdk/video/index.js.meta +++ b/Runtime/playable-default/unity-sdk/video/index.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: d85c26bfbd9a3283f6bb30cceca5ea5e -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 611e375716b229ed25dc8fff8de79335 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/wasmcode.meta b/Runtime/playable-default/wasmcode.meta index 4e5e5c679..95091f0d9 100644 --- a/Runtime/playable-default/wasmcode.meta +++ b/Runtime/playable-default/wasmcode.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 88c2c4f8b42d569b8094feb74e6da2a1 +guid: 4b5c4dd7dd607d09b161e5c7b9ed56af folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/playable-default/wasmcode/game.js.meta b/Runtime/playable-default/wasmcode/game.js.meta index e4e93d144..a56dd3dea 100644 --- a/Runtime/playable-default/wasmcode/game.js.meta +++ b/Runtime/playable-default/wasmcode/game.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 498e07525985bb6ced0bd9306b09f6a4 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 803d3ed9db0fee6f0d1f46fa5bd2f68c + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/weapp-adapter.js.meta b/Runtime/playable-default/weapp-adapter.js.meta index ad293ebd0..0551a0224 100644 --- a/Runtime/playable-default/weapp-adapter.js.meta +++ b/Runtime/playable-default/weapp-adapter.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 73905f6b06e6cb50adcc24a126ed8b65 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 88f79760b0dc874e50a34438f6646874 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/check-version.js.meta b/Runtime/wechat-default/check-version.js.meta index f136bb0ca..930a70748 100644 --- a/Runtime/wechat-default/check-version.js.meta +++ b/Runtime/wechat-default/check-version.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 042f851fc2cd2b760f52c343668c5cc8 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 71c303a9b6ceb6af38ed3f2963863fee + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/data-package.meta b/Runtime/wechat-default/data-package.meta index 45cd5b31b..a45f3f9ea 100644 --- a/Runtime/wechat-default/data-package.meta +++ b/Runtime/wechat-default/data-package.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 67ff1f029018f30663345cd163b89865 +guid: 5b254657c726ca15e45db90d579e810f folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/data-package/game.js.meta b/Runtime/wechat-default/data-package/game.js.meta index 632a9e91d..9a0348fc9 100644 --- a/Runtime/wechat-default/data-package/game.js.meta +++ b/Runtime/wechat-default/data-package/game.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: b6e2f562aef79212d81c2ba7a7edd3ff -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 60e7ec750adc1671a9b3184afc3b5ded + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/events.js.meta b/Runtime/wechat-default/events.js.meta index 362c4f72a..ea52fcf4e 100644 --- a/Runtime/wechat-default/events.js.meta +++ b/Runtime/wechat-default/events.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: c21e4f9445ab1354e004ee6806d36b1c -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 68a61267bcf68ded2999c78b8b95de4b + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/game.js.meta b/Runtime/wechat-default/game.js.meta index 7e964beae..4b3fee11d 100644 --- a/Runtime/wechat-default/game.js.meta +++ b/Runtime/wechat-default/game.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: c4e3d01e4d70fba53c1b8add5d1d79d6 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: f69933a23345a2f38ea85e2b9cae50b8 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/game.json b/Runtime/wechat-default/game.json index a3fd8feea..e11fd7b6b 100644 --- a/Runtime/wechat-default/game.json +++ b/Runtime/wechat-default/game.json @@ -23,7 +23,7 @@ ], "plugins": { "UnityPlugin": { - "version": "1.2.74", + "version": "1.2.79", "provider": "wxe5a48f1ed5f544b7", "contexts": [ { @@ -32,7 +32,7 @@ ] }, "Layout": { - "version": "1.0.7", + "version": "1.0.15", "provider": "wx7a727ff7d940bb3f", "contexts": [ { diff --git a/Runtime/wechat-default/game.json.meta b/Runtime/wechat-default/game.json.meta index 5a3e54d83..e1d92078b 100644 --- a/Runtime/wechat-default/game.json.meta +++ b/Runtime/wechat-default/game.json.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: e336f4b63e6dfc217c3b2a4de7b8811b -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 66ab3f68f34e328d166a0ac70db943ac + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/images.meta b/Runtime/wechat-default/images.meta index 0f0bb2be8..1f16273f5 100644 --- a/Runtime/wechat-default/images.meta +++ b/Runtime/wechat-default/images.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ebace106ae81525b2d597de54b319641 +guid: 1140948eb9fb2bb3bd89eae21c09b676 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/images/background.jpg.meta b/Runtime/wechat-default/images/background.jpg.meta index bb801cee5..c285fca8e 100644 --- a/Runtime/wechat-default/images/background.jpg.meta +++ b/Runtime/wechat-default/images/background.jpg.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 961219c24017591be9f7387b32c99dda -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 286356c420fc755199796db12e189ae2 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/images/unity_logo.png.meta b/Runtime/wechat-default/images/unity_logo.png.meta index b847cb1cb..7b095baff 100644 --- a/Runtime/wechat-default/images/unity_logo.png.meta +++ b/Runtime/wechat-default/images/unity_logo.png.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 1512252be1263bff0bad2706fd57721b -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: c8ef69887d05d9b999a0387322895dfa + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data.meta b/Runtime/wechat-default/open-data.meta index 1c9892180..20308d2c7 100644 --- a/Runtime/wechat-default/open-data.meta +++ b/Runtime/wechat-default/open-data.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 9b7a4b7182bc265e1f19186313e10f47 +guid: 57f417c909bfa50732cecfef7f0e3632 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/open-data/data.meta b/Runtime/wechat-default/open-data/data.meta index 497d2da76..202577d7f 100644 --- a/Runtime/wechat-default/open-data/data.meta +++ b/Runtime/wechat-default/open-data/data.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 0b8738d6b9bb9fd55482c734e21beb13 +guid: 3d8e3ea7c15b796064a718e105ff0e8a folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/open-data/data/index.js.meta b/Runtime/wechat-default/open-data/data/index.js.meta index 78820ff0b..e3b116ca9 100644 --- a/Runtime/wechat-default/open-data/data/index.js.meta +++ b/Runtime/wechat-default/open-data/data/index.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 5b2baee358014e8ac3e76cf8b8a2efda -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 31b4a3f0fa5aa23453827bda568a7c1e + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/data/utils.js.meta b/Runtime/wechat-default/open-data/data/utils.js.meta index fc8a1ff2a..75f6d7a95 100644 --- a/Runtime/wechat-default/open-data/data/utils.js.meta +++ b/Runtime/wechat-default/open-data/data/utils.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 08c8874633248aebb094108db516d49f -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 0ead98ebd41854380cd3def5c87dd71e + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/index.js b/Runtime/wechat-default/open-data/index.js index 4aef76b65..82fb2cd6c 100644 --- a/Runtime/wechat-default/open-data/index.js +++ b/Runtime/wechat-default/open-data/index.js @@ -56,7 +56,6 @@ function LayoutWithTplAndStyle(xml, style) { Layout.clear(); Layout.init(xml, style); Layout.layout(sharedContext); - console.log(Layout); } // 仅仅渲染一些提示,比如数据加载中、当前无授权等 function renderTips(tips = '') { diff --git a/Runtime/wechat-default/open-data/index.js.meta b/Runtime/wechat-default/open-data/index.js.meta index 26eb3906d..220303c9f 100644 --- a/Runtime/wechat-default/open-data/index.js.meta +++ b/Runtime/wechat-default/open-data/index.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 0c3f625fe020655264dfb668d2f443af -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 568dcd6043e459a961187326659081b8 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/loading.js.meta b/Runtime/wechat-default/open-data/loading.js.meta index 91ed9ceaf..0fc8096ec 100644 --- a/Runtime/wechat-default/open-data/loading.js.meta +++ b/Runtime/wechat-default/open-data/loading.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 2dabfccb636244e46ed52391be317a18 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: f376f0fd22f382f6540ed635ce49de8c + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/render.meta b/Runtime/wechat-default/open-data/render.meta index 802df67c4..98ae1accc 100644 --- a/Runtime/wechat-default/open-data/render.meta +++ b/Runtime/wechat-default/open-data/render.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 265b02284af89623aa1b169e677032c8 +guid: fd0a676552fa95a00210d621528dcff7 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/open-data/render/image.meta b/Runtime/wechat-default/open-data/render/image.meta index e1afbc568..eb415d58b 100644 --- a/Runtime/wechat-default/open-data/render/image.meta +++ b/Runtime/wechat-default/open-data/render/image.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 7ccdb341414889d8b130b75eb976bf93 +guid: 027168127ded778799304f949b15b171 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/open-data/render/image/avatar.png.meta b/Runtime/wechat-default/open-data/render/image/avatar.png.meta index 66871a1f1..35cb9aa2c 100644 --- a/Runtime/wechat-default/open-data/render/image/avatar.png.meta +++ b/Runtime/wechat-default/open-data/render/image/avatar.png.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: cee045e37475f34b21d4c1720ef6c0bc -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: e223733356858b0221a931cb981c5f4c + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/render/image/button1.png.meta b/Runtime/wechat-default/open-data/render/image/button1.png.meta index fabab4d14..95c678345 100644 --- a/Runtime/wechat-default/open-data/render/image/button1.png.meta +++ b/Runtime/wechat-default/open-data/render/image/button1.png.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 6dc42d88f81a82110ca250cfd2e481e5 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 0640b23e55aaf1e9ea47638273b9ec5f + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/render/image/button2.png.meta b/Runtime/wechat-default/open-data/render/image/button2.png.meta index 2b07136c3..a7b84f67a 100644 --- a/Runtime/wechat-default/open-data/render/image/button2.png.meta +++ b/Runtime/wechat-default/open-data/render/image/button2.png.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 4487cdaffd527c46b8025027c25a7694 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 0550dd7e973a62640249fadd67509ca8 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/render/image/button3.png.meta b/Runtime/wechat-default/open-data/render/image/button3.png.meta index e8fc8f31e..a525578a7 100644 --- a/Runtime/wechat-default/open-data/render/image/button3.png.meta +++ b/Runtime/wechat-default/open-data/render/image/button3.png.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 76041096891fdcca03223685726e2ae1 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 2250960be5d27d590c756bb39cb0ff0c + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/render/image/loading.png.meta b/Runtime/wechat-default/open-data/render/image/loading.png.meta index 97a21bf6a..46884982f 100644 --- a/Runtime/wechat-default/open-data/render/image/loading.png.meta +++ b/Runtime/wechat-default/open-data/render/image/loading.png.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: b2f5a26d8cab56bc37d9aa5a89adb5a0 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 86b96eccb3690a34ef9f7b3522884803 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/render/image/nameBg.png.meta b/Runtime/wechat-default/open-data/render/image/nameBg.png.meta index a5e9ac3d6..1d5bb557a 100644 --- a/Runtime/wechat-default/open-data/render/image/nameBg.png.meta +++ b/Runtime/wechat-default/open-data/render/image/nameBg.png.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 2e3ca9c4c4f2fe83371eaa036575267d -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 116b2daa3ae754876af5282e0aa770cb + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/render/image/rankAvatar.png.meta b/Runtime/wechat-default/open-data/render/image/rankAvatar.png.meta index 2953f6f98..8edfd0088 100644 --- a/Runtime/wechat-default/open-data/render/image/rankAvatar.png.meta +++ b/Runtime/wechat-default/open-data/render/image/rankAvatar.png.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 2ad251d35a6ede2c53d28c11d65588c4 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 23388c144e9484de85198443ef74b6ca + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/render/image/rankBg.png.meta b/Runtime/wechat-default/open-data/render/image/rankBg.png.meta index 97a52d909..dd1bdc24c 100644 --- a/Runtime/wechat-default/open-data/render/image/rankBg.png.meta +++ b/Runtime/wechat-default/open-data/render/image/rankBg.png.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: cc705c8a016fee6d8985e8ba225ce371 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 80b32663de0ed235fbb5910b00326cd7 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/render/image/shareBg.png.meta b/Runtime/wechat-default/open-data/render/image/shareBg.png.meta index 6e4c85ba7..6f34fec32 100644 --- a/Runtime/wechat-default/open-data/render/image/shareBg.png.meta +++ b/Runtime/wechat-default/open-data/render/image/shareBg.png.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 5ba45b49351ab15aa5fc8e93e883fa8a -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 66cbee8a374e8941cd0bc84a143ee649 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/render/image/shareBg2.png.meta b/Runtime/wechat-default/open-data/render/image/shareBg2.png.meta index eb37888e5..5f3ad8238 100644 --- a/Runtime/wechat-default/open-data/render/image/shareBg2.png.meta +++ b/Runtime/wechat-default/open-data/render/image/shareBg2.png.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 063969bb60d3e53350ddc08fd88643cd -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: adfe61899ee975ff1327dc67fbd048d1 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/render/styles.meta b/Runtime/wechat-default/open-data/render/styles.meta index db87a4b9f..933a38087 100644 --- a/Runtime/wechat-default/open-data/render/styles.meta +++ b/Runtime/wechat-default/open-data/render/styles.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4b8c8b9738cf1d4003d1889eb1bd0535 +guid: 3481764fadb2fe062f613cd8ad30b323 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/open-data/render/styles/friendRank.js b/Runtime/wechat-default/open-data/render/styles/friendRank.js index 023c7f523..3c54e216d 100644 --- a/Runtime/wechat-default/open-data/render/styles/friendRank.js +++ b/Runtime/wechat-default/open-data/render/styles/friendRank.js @@ -63,9 +63,10 @@ export default function getStyle(data) { width: data.width * 0.35, height: (data.height / 2 / 3) * 0.4, textAlign: 'center', - lineHeight: (data.height / 2 / 3) * 0.4, + verticalAlign: 'center', fontSize: data.width * 0.043, textOverflow: 'ellipsis', + whiteSpace: 'nowrap', color: '#fff', }, rankScoreTip: { diff --git a/Runtime/wechat-default/open-data/render/styles/friendRank.js.meta b/Runtime/wechat-default/open-data/render/styles/friendRank.js.meta index 18122a9d5..0ef55a0f4 100644 --- a/Runtime/wechat-default/open-data/render/styles/friendRank.js.meta +++ b/Runtime/wechat-default/open-data/render/styles/friendRank.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 2c6228df96c79548152450bfa2509794 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: aee35b5217261523f2ebb59e07156bf6 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/render/styles/tips.js.meta b/Runtime/wechat-default/open-data/render/styles/tips.js.meta index 82b75b05e..83c04c61b 100644 --- a/Runtime/wechat-default/open-data/render/styles/tips.js.meta +++ b/Runtime/wechat-default/open-data/render/styles/tips.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 22e790c7a5b3c7c256fb86627288ec0e -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: b79dca063014878bc6841c6734d16f9b + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/render/tpls.meta b/Runtime/wechat-default/open-data/render/tpls.meta index 6d13fe5b0..d3936a72c 100644 --- a/Runtime/wechat-default/open-data/render/tpls.meta +++ b/Runtime/wechat-default/open-data/render/tpls.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: c1c61830093508a2c5cc54e5356b0b66 +guid: 5d28affd49a4408644c2f35426f22442 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/open-data/render/tpls/friendRank.js b/Runtime/wechat-default/open-data/render/tpls/friendRank.js index 34b6a65ba..84cacdbda 100644 --- a/Runtime/wechat-default/open-data/render/tpls/friendRank.js +++ b/Runtime/wechat-default/open-data/render/tpls/friendRank.js @@ -1,11 +1,10 @@ /** - * 下面的内容分成两部分,第一部分是一个模板,模板的好处是能够有一定的语法 - * 坏处是模板引擎一般都依赖 new Function 或者 eval 能力,小游戏下面是没有的 - * 所以模板的编译需要在外部完成,可以将注释内的模板贴到下面的页面内,点击 "run"就能够得到编译后的模板函数 - * https://wechat-miniprogram.github.io/minigame-canvas-engine/playground.html - * 如果觉得模板引擎使用过于麻烦,也可以手动拼接字符串,本文件对应函数的目标仅仅是为了创建出 xml 节点数 - */ -/* + * 模板引擎使用教程可见:https://wechat-miniprogram.github.io/minigame-canvas-engine/tutorial/templateengine.html + * xml经过doT.js编译出的模板函数 + * 因为小游戏不支持new Function,模板函数只能外部编译 + * 可直接拷贝本函数到小游戏中使用 + * 原始的模板如下: + * @@ -29,22 +28,17 @@ -*/ -/** - * xml经过doT.js编译出的模板函数 - * 因为小游戏不支持new Function,模板函数只能外部编译 - * 可直接拷贝本函数到小游戏中使用 + + * */ -export default function anonymous(it) { - let out = ' '; - const arr1 = it.data; +export default function tplFunc(it) { + var out = ' '; + var arr1 = it.data; if (arr1) { - let item; - let index = -1; - const l1 = arr1.length - 1; + var item, index = -1, l1 = arr1.length - 1; while (index < l1) { - item = arr1[(index += 1)]; - out += ` `; + item = arr1[index += 1]; + out += ' '; } } out += ' '; diff --git a/Runtime/wechat-default/open-data/render/tpls/friendRank.js.meta b/Runtime/wechat-default/open-data/render/tpls/friendRank.js.meta index 7d5cd73b5..353206551 100644 --- a/Runtime/wechat-default/open-data/render/tpls/friendRank.js.meta +++ b/Runtime/wechat-default/open-data/render/tpls/friendRank.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 1464cee678f948a7423a81d6594634b5 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: f444ce564b1e80ac7c63a81c3e606a07 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/render/tpls/tips.js.meta b/Runtime/wechat-default/open-data/render/tpls/tips.js.meta index cdc4ec0e7..cc256baaf 100644 --- a/Runtime/wechat-default/open-data/render/tpls/tips.js.meta +++ b/Runtime/wechat-default/open-data/render/tpls/tips.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: d9050cfc8dad50151ceb17d5fae97f24 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 53e813efdb28902830106d7ba6843674 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/plugin-config.js.meta b/Runtime/wechat-default/plugin-config.js.meta index 6fb74366b..436636998 100644 --- a/Runtime/wechat-default/plugin-config.js.meta +++ b/Runtime/wechat-default/plugin-config.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 82221ade2b1cc9ba033f44007e10157f -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 497cad1272d2c482ce27915b5b30e21b + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/plugins.meta b/Runtime/wechat-default/plugins.meta index 994203563..d65f61999 100644 --- a/Runtime/wechat-default/plugins.meta +++ b/Runtime/wechat-default/plugins.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 896f1cfa19eaf326f9f8ab06a1bd27b2 +guid: 87d1d2ba80c6179e7bd131531012dd7e folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/plugins/check-update.js.meta b/Runtime/wechat-default/plugins/check-update.js.meta index 384349d0c..86028da28 100644 --- a/Runtime/wechat-default/plugins/check-update.js.meta +++ b/Runtime/wechat-default/plugins/check-update.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: dcaa80c22cea0bd2b686fff4711070aa -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 683e17a400ab7da5bbc07dee382c3b8e + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/plugins/screen-adapter.js.meta b/Runtime/wechat-default/plugins/screen-adapter.js.meta index c581651fc..77a324dba 100644 --- a/Runtime/wechat-default/plugins/screen-adapter.js.meta +++ b/Runtime/wechat-default/plugins/screen-adapter.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 0b672c0d443ee01b75f6c10dcd31034d -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: acf0720bb2d0694dbff15b1e0c584d12 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/project.config.json.meta b/Runtime/wechat-default/project.config.json.meta index c23f30e15..0ab223e6e 100644 --- a/Runtime/wechat-default/project.config.json.meta +++ b/Runtime/wechat-default/project.config.json.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 1e19fe1dfe018e9f216848b5064fb427 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 4ae5be60b9a32d671843cde6c9501423 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/texture-config.js.meta b/Runtime/wechat-default/texture-config.js.meta index 03e292fd9..e7a0df559 100644 --- a/Runtime/wechat-default/texture-config.js.meta +++ b/Runtime/wechat-default/texture-config.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: a4fb09ba5fa1d19caa7f943846b127bc -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 81a7bb297b6a5f47f133cb960b54ee57 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-namespace.js b/Runtime/wechat-default/unity-namespace.js index 30f8347b6..85a15e686 100644 --- a/Runtime/wechat-default/unity-namespace.js +++ b/Runtime/wechat-default/unity-namespace.js @@ -57,6 +57,8 @@ const unityNamespace = { isProfilingBuild: $Is_Profiling_Build, // 预留的堆内存 unityHeapReservedMemory: $UnityHeapReservedMemory, + // 是否向Perfstream上报数据 + sendData2PerfStream: $SEND_DATA_TO_PERF_STREAM, }; // 最佳实践检测配置 unityNamespace.monitorConfig = { diff --git a/Runtime/wechat-default/unity-namespace.js.meta b/Runtime/wechat-default/unity-namespace.js.meta index c639bf9e3..23a217c39 100644 --- a/Runtime/wechat-default/unity-namespace.js.meta +++ b/Runtime/wechat-default/unity-namespace.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 3a5ae245a6afd3d7090cb78cfe4d4e2a -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 29a4ae56ca3780a99cc9bfb7c10c1f6f + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk.meta b/Runtime/wechat-default/unity-sdk.meta index 923232395..89e2893b2 100644 --- a/Runtime/wechat-default/unity-sdk.meta +++ b/Runtime/wechat-default/unity-sdk.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4845a80f3a9b7bd00a8bae12864922d6 +guid: 87dd3ba9f6d77fff087638313ee315cd folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/unity-sdk/TCPSocket.meta b/Runtime/wechat-default/unity-sdk/TCPSocket.meta index 477b59a98..cc9c0212f 100644 --- a/Runtime/wechat-default/unity-sdk/TCPSocket.meta +++ b/Runtime/wechat-default/unity-sdk/TCPSocket.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 6ffe6010731a471a8ef7824cbac3edbc +guid: 794caed772006b5c971356615182a60e folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/unity-sdk/TCPSocket/index.js.meta b/Runtime/wechat-default/unity-sdk/TCPSocket/index.js.meta index b0f44205b..e6cbaee8e 100644 --- a/Runtime/wechat-default/unity-sdk/TCPSocket/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/TCPSocket/index.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 64bfcdcddd861d5e78f0a1f42e87a134 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: fdf249c82d933d4cfe8616a6382831f9 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/UDPSocket.meta b/Runtime/wechat-default/unity-sdk/UDPSocket.meta index aa14de3c0..1b532a314 100644 --- a/Runtime/wechat-default/unity-sdk/UDPSocket.meta +++ b/Runtime/wechat-default/unity-sdk/UDPSocket.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: cbf9a4b885f787918aa9ab9a1afab951 +guid: 562d7e69ab2c7ef03f34b90ce5918ecb folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/unity-sdk/UDPSocket/index.js.meta b/Runtime/wechat-default/unity-sdk/UDPSocket/index.js.meta index 1cbb91afa..b2581943e 100644 --- a/Runtime/wechat-default/unity-sdk/UDPSocket/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/UDPSocket/index.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: f5ced352c617758efe56ddb7984db838 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 8d9f144933d10c47b9be8b9b0c4e5dd6 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/ad.js.meta b/Runtime/wechat-default/unity-sdk/ad.js.meta index 356b7c964..21edfa683 100644 --- a/Runtime/wechat-default/unity-sdk/ad.js.meta +++ b/Runtime/wechat-default/unity-sdk/ad.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 4c40bb52be655d42ba3d42ca5d2d6063 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: a262aac6242436a6d6b8e7f42ea7d21a + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/audio.meta b/Runtime/wechat-default/unity-sdk/audio.meta index 7daa23946..298af7a47 100644 --- a/Runtime/wechat-default/unity-sdk/audio.meta +++ b/Runtime/wechat-default/unity-sdk/audio.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: f8d63e23bd27dd4af510331c72556e32 +guid: ef66f87b3222d34a8202def39593b27d folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/unity-sdk/audio/common.js.meta b/Runtime/wechat-default/unity-sdk/audio/common.js.meta index ec70048cc..2445f0d59 100644 --- a/Runtime/wechat-default/unity-sdk/audio/common.js.meta +++ b/Runtime/wechat-default/unity-sdk/audio/common.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: cb19cb5970e37b07edbe849a8ec6de7b -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 276189d9f1aee8c4de974756c768301d + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/audio/const.js.meta b/Runtime/wechat-default/unity-sdk/audio/const.js.meta index e2a7c4147..872172722 100644 --- a/Runtime/wechat-default/unity-sdk/audio/const.js.meta +++ b/Runtime/wechat-default/unity-sdk/audio/const.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 4f492f1a284e456df5f48db43c86ea64 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 198d35a1a93b4dbcf9f4473721ba4d97 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/audio/index.js.meta b/Runtime/wechat-default/unity-sdk/audio/index.js.meta index 36cecdef5..dc00d0ebf 100644 --- a/Runtime/wechat-default/unity-sdk/audio/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/audio/index.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: ef0b6c3d6b38e9e5512ff929e17e5c26 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 095dcced6f850ab9a9c0b9f8b8a06f47 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/audio/inner-audio.js.meta b/Runtime/wechat-default/unity-sdk/audio/inner-audio.js.meta index 6a197b52e..ea686e51e 100644 --- a/Runtime/wechat-default/unity-sdk/audio/inner-audio.js.meta +++ b/Runtime/wechat-default/unity-sdk/audio/inner-audio.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: eb8f641892da31c5cd2930eafe3e463e -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: e1e2b6eed64fe1604eae43ff323bce07 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/audio/store.js.meta b/Runtime/wechat-default/unity-sdk/audio/store.js.meta index b7228c23e..0724f2cb2 100644 --- a/Runtime/wechat-default/unity-sdk/audio/store.js.meta +++ b/Runtime/wechat-default/unity-sdk/audio/store.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: ace71dabf6aebddf05ccc1f4bb4e81ad -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 61e1aaaf1fd32a1cd86d705f0919b481 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/audio/unity-audio.js b/Runtime/wechat-default/unity-sdk/audio/unity-audio.js index 83230ae12..077f0e73c 100644 --- a/Runtime/wechat-default/unity-sdk/audio/unity-audio.js +++ b/Runtime/wechat-default/unity-sdk/audio/unity-audio.js @@ -1050,6 +1050,9 @@ export default { if (WEBAudio.audioWebSupport === 0 || WEBAudio.audioWebEnabled === 0) { return; } + if (WEBAudio.audioContext && WEBAudio.audioContext.state !== 'suspended') { + return; + } resumeWebAudio(); }, _JS_Sound_Set3D(channelInstance, threeD) { diff --git a/Runtime/wechat-default/unity-sdk/audio/unity-audio.js.meta b/Runtime/wechat-default/unity-sdk/audio/unity-audio.js.meta index 2751db3e1..4606d645a 100644 --- a/Runtime/wechat-default/unity-sdk/audio/unity-audio.js.meta +++ b/Runtime/wechat-default/unity-sdk/audio/unity-audio.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 57f74f9d33b93f99adf3112e5b556791 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: b329809a81e36b6dbe569e575d42e1d6 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/audio/utils.js.meta b/Runtime/wechat-default/unity-sdk/audio/utils.js.meta index f983ecdb1..ee0675bf0 100644 --- a/Runtime/wechat-default/unity-sdk/audio/utils.js.meta +++ b/Runtime/wechat-default/unity-sdk/audio/utils.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 822d5548bac35dc09162de836bb78b66 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 1e1d84d397943ef67eacb732281d4907 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/authorize.js.meta b/Runtime/wechat-default/unity-sdk/authorize.js.meta index 0281bc912..a5556265b 100644 --- a/Runtime/wechat-default/unity-sdk/authorize.js.meta +++ b/Runtime/wechat-default/unity-sdk/authorize.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 790e62ac559a8c1c2d282282ba18859d -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: da71a1b4ed3baec7dd5377824fd21a9a + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/bluetooth.meta b/Runtime/wechat-default/unity-sdk/bluetooth.meta index 898b6304e..84306083c 100644 --- a/Runtime/wechat-default/unity-sdk/bluetooth.meta +++ b/Runtime/wechat-default/unity-sdk/bluetooth.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: f524a95057eed2d9d649c69233145d2b +guid: 5598cd137151d759c6520149468d6806 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/unity-sdk/bluetooth/index.js.meta b/Runtime/wechat-default/unity-sdk/bluetooth/index.js.meta index 58781b89d..30bd764fe 100644 --- a/Runtime/wechat-default/unity-sdk/bluetooth/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/bluetooth/index.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: c45da990305f18849a0b68791073b1e0 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 7fa8d0b6e46c3d2337be98e0a349d85e + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/camera.js.meta b/Runtime/wechat-default/unity-sdk/camera.js.meta index 344a0175e..9fcb91b59 100644 --- a/Runtime/wechat-default/unity-sdk/camera.js.meta +++ b/Runtime/wechat-default/unity-sdk/camera.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: a06e8687181ef101c26a8c4202785f23 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 95d9ff285836a57b54b7b1b573b9e25a + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/canvas-context.js.meta b/Runtime/wechat-default/unity-sdk/canvas-context.js.meta index 1e484c7c9..6f8125bf2 100644 --- a/Runtime/wechat-default/unity-sdk/canvas-context.js.meta +++ b/Runtime/wechat-default/unity-sdk/canvas-context.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 5d26fa320cef2f051f1d041f8d8b4b0e -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 46d94a029de5093365f9e503bb4dd7c7 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/canvas.js.meta b/Runtime/wechat-default/unity-sdk/canvas.js.meta index 022ac0034..ae94b53a4 100644 --- a/Runtime/wechat-default/unity-sdk/canvas.js.meta +++ b/Runtime/wechat-default/unity-sdk/canvas.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 82063ffc03ef119fe370708a827a4846 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: df6dbf28bf8e5dff6168f363e28b0c8b + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/chat.js.meta b/Runtime/wechat-default/unity-sdk/chat.js.meta index a78924390..e10c56159 100644 --- a/Runtime/wechat-default/unity-sdk/chat.js.meta +++ b/Runtime/wechat-default/unity-sdk/chat.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 0f74bb388cb8020878f0b5616f5c7035 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 0c96551b89fdf197c74efe3f14d3b3aa + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/cloud.js.meta b/Runtime/wechat-default/unity-sdk/cloud.js.meta index c29ba326c..8ed40c1c8 100644 --- a/Runtime/wechat-default/unity-sdk/cloud.js.meta +++ b/Runtime/wechat-default/unity-sdk/cloud.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: c9e96880a1fe99e196cb2a44b62aa519 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 7f61d602c5816297d9399992951364cc + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/conf.js.meta b/Runtime/wechat-default/unity-sdk/conf.js.meta index 3121051bf..c4bd96bdd 100644 --- a/Runtime/wechat-default/unity-sdk/conf.js.meta +++ b/Runtime/wechat-default/unity-sdk/conf.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 73f1e46715728147f018b74878216bf0 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 474b608c8cb3969de750b82f5203f8f8 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/file-info.js.meta b/Runtime/wechat-default/unity-sdk/file-info.js.meta index 43120e06f..04fba5dc7 100644 --- a/Runtime/wechat-default/unity-sdk/file-info.js.meta +++ b/Runtime/wechat-default/unity-sdk/file-info.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 04033f20136baa6bca619baa473be4c2 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 7adc745ce4ae7c886ce8df9573ec694a + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/fix.js.meta b/Runtime/wechat-default/unity-sdk/fix.js.meta index 57caab7f1..8315c7e5c 100644 --- a/Runtime/wechat-default/unity-sdk/fix.js.meta +++ b/Runtime/wechat-default/unity-sdk/fix.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 46137b09f4eff281394528a27a2baf63 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: d8425ac11262d0c5a74047ad4dd95c7c + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/font.meta b/Runtime/wechat-default/unity-sdk/font.meta index ebc1e7ca1..9f763d093 100644 --- a/Runtime/wechat-default/unity-sdk/font.meta +++ b/Runtime/wechat-default/unity-sdk/font.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 86c617a045017ddc206b9d23d940b3c0 +guid: 7bd58934f5b642c238f833ee82f81ceb folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/unity-sdk/font/fix-cmap.js.meta b/Runtime/wechat-default/unity-sdk/font/fix-cmap.js.meta index ac58cb715..121866c93 100644 --- a/Runtime/wechat-default/unity-sdk/font/fix-cmap.js.meta +++ b/Runtime/wechat-default/unity-sdk/font/fix-cmap.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 5bc7b6ad1a7a8c6e9adb9c378f7cb85b -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: f122017f5490ab970376b90fe6512786 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/font/index.js.meta b/Runtime/wechat-default/unity-sdk/font/index.js.meta index 39feda356..349515bb4 100644 --- a/Runtime/wechat-default/unity-sdk/font/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/font/index.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: b4585586ca60c5a90356229dd2dc97da -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: a85a4f0482eae0f6f14a47d64485d4f9 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/font/read-metrics.js.meta b/Runtime/wechat-default/unity-sdk/font/read-metrics.js.meta index 10be69185..e7dc0314d 100644 --- a/Runtime/wechat-default/unity-sdk/font/read-metrics.js.meta +++ b/Runtime/wechat-default/unity-sdk/font/read-metrics.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: abae86c57dee77c7254097b5c977ea5f -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: b14ba01886ad1268cd2e72b760935470 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/font/split-sc.js.meta b/Runtime/wechat-default/unity-sdk/font/split-sc.js.meta index a072e1a51..d506e64c5 100644 --- a/Runtime/wechat-default/unity-sdk/font/split-sc.js.meta +++ b/Runtime/wechat-default/unity-sdk/font/split-sc.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: d4481807d7e40495ba3bed1eb7a4ee55 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: b7f788d23570feaa225c84d2cc5cc19c + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/font/util.js.meta b/Runtime/wechat-default/unity-sdk/font/util.js.meta index a4eb61fc3..6ad6db280 100644 --- a/Runtime/wechat-default/unity-sdk/font/util.js.meta +++ b/Runtime/wechat-default/unity-sdk/font/util.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 7721d2a2f1e6609f25a1980b50e848c6 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: c5b24547ec61cd311df6baefba3d5d1c + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/fs.js.meta b/Runtime/wechat-default/unity-sdk/fs.js.meta index ea7695e3d..ac12aaedf 100644 --- a/Runtime/wechat-default/unity-sdk/fs.js.meta +++ b/Runtime/wechat-default/unity-sdk/fs.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: d1e5e52be91818598a550c9083a43981 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 0c980530333571c8298d83cc76a89692 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/game-club.js.meta b/Runtime/wechat-default/unity-sdk/game-club.js.meta index 91712d657..9fb5ec51c 100644 --- a/Runtime/wechat-default/unity-sdk/game-club.js.meta +++ b/Runtime/wechat-default/unity-sdk/game-club.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: d5d00aed1dfe5812d024d54fea4d63d6 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: a5df2d7b9c2973c49774b83a59c63ee5 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/game-recorder.js.meta b/Runtime/wechat-default/unity-sdk/game-recorder.js.meta index 18914d4ed..f9282e4d0 100644 --- a/Runtime/wechat-default/unity-sdk/game-recorder.js.meta +++ b/Runtime/wechat-default/unity-sdk/game-recorder.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: b9168f62d0416bda872e08a832c7bd6d -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 6801bce52eafcc87f860928c311056c0 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/gyroscope.meta b/Runtime/wechat-default/unity-sdk/gyroscope.meta index a9b6536d7..8217d53cd 100644 --- a/Runtime/wechat-default/unity-sdk/gyroscope.meta +++ b/Runtime/wechat-default/unity-sdk/gyroscope.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d014bb626f02dc1023918589f8a8b058 +guid: b098e1ddf3848387476f675b17c70754 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/unity-sdk/gyroscope/index.js.meta b/Runtime/wechat-default/unity-sdk/gyroscope/index.js.meta index 67f432a3e..5c1ee365d 100644 --- a/Runtime/wechat-default/unity-sdk/gyroscope/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/gyroscope/index.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 67b6b30c21b7546125fe1bada7befda8 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 9422a240771224758276493a87523745 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/index.js.meta b/Runtime/wechat-default/unity-sdk/index.js.meta index cd5a70eb7..cd36a38d2 100644 --- a/Runtime/wechat-default/unity-sdk/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/index.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: ed2901a54b3c57e970c786fff15b8aef -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: e292b6818dbe4cda149cbb70ba124634 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/logger.js.meta b/Runtime/wechat-default/unity-sdk/logger.js.meta index dd7e4807f..7ec3be228 100644 --- a/Runtime/wechat-default/unity-sdk/logger.js.meta +++ b/Runtime/wechat-default/unity-sdk/logger.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: a046b783f70735c944a144d79d23cb43 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: cae19889c72be21af458e4fc61eb02c9 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/mobileKeyboard.meta b/Runtime/wechat-default/unity-sdk/mobileKeyboard.meta index 00c041787..6ef45697d 100644 --- a/Runtime/wechat-default/unity-sdk/mobileKeyboard.meta +++ b/Runtime/wechat-default/unity-sdk/mobileKeyboard.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 1f7cade30676206bf230a153b13d3b54 +guid: 55b7755515ae503ae2ef911852cc7cd6 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/unity-sdk/mobileKeyboard/index.js.meta b/Runtime/wechat-default/unity-sdk/mobileKeyboard/index.js.meta index 2ec205188..980cf2c85 100644 --- a/Runtime/wechat-default/unity-sdk/mobileKeyboard/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/mobileKeyboard/index.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: f2dbe5662eec1a5d3053a000aab664d9 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 3040b6dc328b68e041d06a5199709ef6 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/module-helper.js.meta b/Runtime/wechat-default/unity-sdk/module-helper.js.meta index dd51fe61c..c7b3ee913 100644 --- a/Runtime/wechat-default/unity-sdk/module-helper.js.meta +++ b/Runtime/wechat-default/unity-sdk/module-helper.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 8bdb575914a0ef1f399792e44e9f4a51 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 4378b0d0d4965514fd2822d44e6c3cfc + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/open-data.js.meta b/Runtime/wechat-default/unity-sdk/open-data.js.meta index 752823157..2e65542e7 100644 --- a/Runtime/wechat-default/unity-sdk/open-data.js.meta +++ b/Runtime/wechat-default/unity-sdk/open-data.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 8ef9a223b66ee3aee076a7cbd1cdd132 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: e35fef05977451085c4e6e6871b82279 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/recorder.js.meta b/Runtime/wechat-default/unity-sdk/recorder.js.meta index 4ca6c92fb..efc255f80 100644 --- a/Runtime/wechat-default/unity-sdk/recorder.js.meta +++ b/Runtime/wechat-default/unity-sdk/recorder.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: b9a08203d822434531267797890b5f4b -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 384890d87eca68a177d2da902313ff88 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/resType.js b/Runtime/wechat-default/unity-sdk/resType.js index fbc6da17c..1cc38b161 100644 --- a/Runtime/wechat-default/unity-sdk/resType.js +++ b/Runtime/wechat-default/unity-sdk/resType.js @@ -233,14 +233,6 @@ export const ResType = { GetLogManagerOption: { level: 'number', }, - LoadOption: { - openlink: 'string', - query: 'object', - }, - ShowOption: { - openlink: 'string', - query: 'object', - }, Path2D: {}, OnCheckForUpdateListenerResult: { hasUpdate: 'bool', diff --git a/Runtime/wechat-default/unity-sdk/resType.js.meta b/Runtime/wechat-default/unity-sdk/resType.js.meta index d13dd9566..84d53f2c9 100644 --- a/Runtime/wechat-default/unity-sdk/resType.js.meta +++ b/Runtime/wechat-default/unity-sdk/resType.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: df9799e5445c91086fc6b878b7487495 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: feaebcceb5a8947b786a71bf50b2eba2 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/resTypeOther.js b/Runtime/wechat-default/unity-sdk/resTypeOther.js index 9ca8b5a42..ead21e383 100644 --- a/Runtime/wechat-default/unity-sdk/resTypeOther.js +++ b/Runtime/wechat-default/unity-sdk/resTypeOther.js @@ -86,4 +86,12 @@ export const ResTypeOther = { status: 'number', errMsg: 'string', }, + LoadOption: { + openlink: 'string', + query: 'object', + }, + ShowOption: { + openlink: 'string', + query: 'object', + }, }; diff --git a/Runtime/wechat-default/unity-sdk/resTypeOther.js.meta b/Runtime/wechat-default/unity-sdk/resTypeOther.js.meta index b27fe707e..2c6450fba 100644 --- a/Runtime/wechat-default/unity-sdk/resTypeOther.js.meta +++ b/Runtime/wechat-default/unity-sdk/resTypeOther.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 875cd938bc789c6ad51ed40d01e427d0 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 11173b958c5248a0ce42da72b6dc1056 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/response.js.meta b/Runtime/wechat-default/unity-sdk/response.js.meta index 3c54a44f8..a3654737d 100644 --- a/Runtime/wechat-default/unity-sdk/response.js.meta +++ b/Runtime/wechat-default/unity-sdk/response.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: dd4df043e95b2c2bc8be4c11473b4add -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 2bf943f839e65c63c4c9f009cfa76a32 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/sdk.js b/Runtime/wechat-default/unity-sdk/sdk.js index d1230f719..0c1957ed6 100644 --- a/Runtime/wechat-default/unity-sdk/sdk.js +++ b/Runtime/wechat-default/unity-sdk/sdk.js @@ -23,7 +23,7 @@ function getClassObject(className, id) { // eslint-disable-next-line @typescript-eslint/naming-convention 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 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 @@ -42,13 +42,22 @@ function WX_ClassOneWayNoFunction(className, functionName, id, ...params) { if (!obj) { 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 { 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); - + // specialJS if (lowerFunctionName === 'login') { if (!config.timeout) { delete config.timeout; @@ -111,7 +120,7 @@ export default { moduleHelper.send(`_${functionName}Callback`, resStr); }; onEventLists[functionName].push(callback); - wx[functionName.replace(/^\w/, a => a.toLowerCase())](callback); + wx[functionName.replace(/^\w/, (a) => a.toLowerCase())](callback); }, WX_OffEventRegister(functionName) { (onEventLists[functionName] || []).forEach((v) => { @@ -225,7 +234,7 @@ export default { }, WX_SyncFunction_t(functionName, returnType) { 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))); return JSON.stringify(res); } @@ -262,10 +271,10 @@ export default { formatResponse(returnType, 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 callbackId = uid(); - const obj = wx[functionName.replace(/^\w/, a => a.toLowerCase())]({ + const obj = wx[functionName.replace(/^\w/, (a) => a.toLowerCase())]({ ...config, success(res) { formatResponse(successType, res); @@ -293,7 +302,7 @@ export default { return callbackId; }, 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(); if (!ClassLists[returnType]) { ClassLists[returnType] = {}; @@ -347,10 +356,10 @@ export default { ClassOnEventLists[className + functionName][id + eventName].push(callback); // WXVideoDecoder OnEvent 不规范 特殊处理 if (className === 'WXVideoDecoder') { - obj[functionName.replace(/^\w/, a => a.toLowerCase())](eventName, callback); + obj[functionName.replace(/^\w/, (a) => a.toLowerCase())](eventName, callback); } else { - obj[functionName.replace(/^\w/, a => a.toLowerCase())](callback); + obj[functionName.replace(/^\w/, (a) => a.toLowerCase())](callback); } }, WX_ClassOffEventFunction(className, functionName, id, eventName) { @@ -389,7 +398,7 @@ export default { if (!obj) { 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)); }, WX_ClassOneWayNoFunction_vt(className, functionName, id, param1) { @@ -399,4 +408,41 @@ export default { WX_ClassOneWayNoFunction_vn(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); + }, + }); + } + }, }; diff --git a/Runtime/wechat-default/unity-sdk/sdk.js.meta b/Runtime/wechat-default/unity-sdk/sdk.js.meta index 139415025..da3b028eb 100644 --- a/Runtime/wechat-default/unity-sdk/sdk.js.meta +++ b/Runtime/wechat-default/unity-sdk/sdk.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: dc809d75d5108b66ac515841798e279f -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: c3bfba34d7762a612c497cc072abef0c + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/share.js.meta b/Runtime/wechat-default/unity-sdk/share.js.meta index 14fc2973d..d71c14871 100644 --- a/Runtime/wechat-default/unity-sdk/share.js.meta +++ b/Runtime/wechat-default/unity-sdk/share.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 78ae109e9061913cf550c301a34a217d -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 6783944b8dd964e0cf5eda00b119f38c + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/storage.js.meta b/Runtime/wechat-default/unity-sdk/storage.js.meta index 2e15ef372..0728d262e 100644 --- a/Runtime/wechat-default/unity-sdk/storage.js.meta +++ b/Runtime/wechat-default/unity-sdk/storage.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 02284367da418749fd578a0905129fd0 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 928841b829a77186b969f92a1eca83ff + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/texture.js.meta b/Runtime/wechat-default/unity-sdk/texture.js.meta index 1c99affb0..cf3a8b9ae 100644 --- a/Runtime/wechat-default/unity-sdk/texture.js.meta +++ b/Runtime/wechat-default/unity-sdk/texture.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: c547ddbf75d9dd1fee74b99d94b0a983 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: bfc9332d90371fb29e6f014717ffae8a + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/touch.meta b/Runtime/wechat-default/unity-sdk/touch.meta index 0e3897107..c1276c0c6 100644 --- a/Runtime/wechat-default/unity-sdk/touch.meta +++ b/Runtime/wechat-default/unity-sdk/touch.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 202f96ea350d2f076a5ccdfbee4a5b3e +guid: 2101a3239ded8ef775b0dad11e7f0b00 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/unity-sdk/touch/index.js.meta b/Runtime/wechat-default/unity-sdk/touch/index.js.meta index 3aa47af61..546cb2991 100644 --- a/Runtime/wechat-default/unity-sdk/touch/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/touch/index.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: ab66ec55e851cdcb18487696be4cf046 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: e54278a348638bb17770380b5ede3183 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/upload-file.js.meta b/Runtime/wechat-default/unity-sdk/upload-file.js.meta index adaf9468b..9f12d4ef8 100644 --- a/Runtime/wechat-default/unity-sdk/upload-file.js.meta +++ b/Runtime/wechat-default/unity-sdk/upload-file.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 5290eeccdee639e2b86ebc0d7f596daa -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: e39dbbb0cbf4ecb86cefb8977c2d30a3 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/userinfo.js.meta b/Runtime/wechat-default/unity-sdk/userinfo.js.meta index c1301f368..0672b48b6 100644 --- a/Runtime/wechat-default/unity-sdk/userinfo.js.meta +++ b/Runtime/wechat-default/unity-sdk/userinfo.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 0f46bf43d87f88d20c17c0ffabf1908e -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: a9ccfc4aedeadbb5340c51fd81df116a + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/util.js.meta b/Runtime/wechat-default/unity-sdk/util.js.meta index 97043a3dc..a3240d6b7 100644 --- a/Runtime/wechat-default/unity-sdk/util.js.meta +++ b/Runtime/wechat-default/unity-sdk/util.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 7725bf07cc472760a4d90dc57bcdbf8e -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 1d40a68f61e0b7f10afba17855a94d76 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/utils.js.meta b/Runtime/wechat-default/unity-sdk/utils.js.meta index e5763d3ff..54eb388d4 100644 --- a/Runtime/wechat-default/unity-sdk/utils.js.meta +++ b/Runtime/wechat-default/unity-sdk/utils.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: cd5afdff08f5dc063c82c53fb45aa51f -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 07c00b7f43994c7debc59ed22ac2b335 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/video.js.meta b/Runtime/wechat-default/unity-sdk/video.js.meta index 40b8b8d4a..494683bd3 100644 --- a/Runtime/wechat-default/unity-sdk/video.js.meta +++ b/Runtime/wechat-default/unity-sdk/video.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 9f547907240dda24a1f9f0526852c0ab -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 6f2682271b41a9a372206ddfdf8c19d0 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/video.meta b/Runtime/wechat-default/unity-sdk/video.meta index 1dadaf552..601523a55 100644 --- a/Runtime/wechat-default/unity-sdk/video.meta +++ b/Runtime/wechat-default/unity-sdk/video.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: e7ebf920036a5b1a457d4f5813c4d258 +guid: 3a37908b61a3d1ed3d96173571d56a53 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/unity-sdk/video/index.js.meta b/Runtime/wechat-default/unity-sdk/video/index.js.meta index edb11bb9b..0af0eaedb 100644 --- a/Runtime/wechat-default/unity-sdk/video/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/video/index.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: f00677605a4285193142ce5ef53974c7 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: c3fc8028247da894da0d6413ca9aefca + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/wasmcode.meta b/Runtime/wechat-default/wasmcode.meta index 744b476d1..b6b65b647 100644 --- a/Runtime/wechat-default/wasmcode.meta +++ b/Runtime/wechat-default/wasmcode.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 7c7ca23a1466a6ce505afd3a05c887bd +guid: d2e064cca05f045959a8b834e61444d6 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/wasmcode/game.js.meta b/Runtime/wechat-default/wasmcode/game.js.meta index 0b4d13621..22e0807ff 100644 --- a/Runtime/wechat-default/wasmcode/game.js.meta +++ b/Runtime/wechat-default/wasmcode/game.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: daf54c0ec8eaa9a03de044a807a9aacb -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 274a4479b7b2e76fc7220a39d92305f9 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/weapp-adapter.js.meta b/Runtime/wechat-default/weapp-adapter.js.meta index a9b69f499..6865d2629 100644 --- a/Runtime/wechat-default/weapp-adapter.js.meta +++ b/Runtime/wechat-default/weapp-adapter.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: a2daf5d17e578c4ac91cd97354d4db86 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 27bf5c3a160bfca989a934eaada07d2e + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/workers.meta b/Runtime/wechat-default/workers.meta index ee64328ed..d4a7ecb53 100644 --- a/Runtime/wechat-default/workers.meta +++ b/Runtime/wechat-default/workers.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: da38964cee74287d125a98bc9fe2b1aa +guid: 1bf1a7aa16daf9ca97f9fac1ad345e0c folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/workers/response.meta b/Runtime/wechat-default/workers/response.meta index 8dbfaa41b..0795fff5c 100644 --- a/Runtime/wechat-default/workers/response.meta +++ b/Runtime/wechat-default/workers/response.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 8a5bcc4fc6f2226c0a609a5c443850c2 +guid: 2f1c599cb975e9d3e88d5ba09e277de7 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/workers/response/index.js.meta b/Runtime/wechat-default/workers/response/index.js.meta index f788ec0cd..f8636527d 100644 --- a/Runtime/wechat-default/workers/response/index.js.meta +++ b/Runtime/wechat-default/workers/response/index.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: ff874e897193a5be330f72bdd64fb7f7 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 429c937daa7e4293370420b52291db95 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/WebGLTemplates/WXTemplate/index.html b/WebGLTemplates/WXTemplate/index.html index c0ac2da07..180d4b81e 100644 --- a/WebGLTemplates/WXTemplate/index.html +++ b/WebGLTemplates/WXTemplate/index.html @@ -431,7 +431,7 @@ return ""; }, WX_ClassFunction() {return ""}, - WX_ClassOneWayFunction() {return ""}, + WX_ClassConstructor() {return ""}, WX_ClassSetProperty() {}, WX_ClassOneWayNoFunction_v() {}, WX_ClassOneWayNoFunction_vs() {}, diff --git a/WebGLTemplates/WXTemplate2020/index.html b/WebGLTemplates/WXTemplate2020/index.html index 3c6925cc7..c183a6d96 100644 --- a/WebGLTemplates/WXTemplate2020/index.html +++ b/WebGLTemplates/WXTemplate2020/index.html @@ -503,7 +503,7 @@ return ""; }, WX_ClassFunction() {return ""}, - WX_ClassOneWayFunction() {return ""}, + WX_ClassConstructor() {return ""}, WX_ClassSetProperty() {}, WX_ClassOneWayNoFunction_v() {}, WX_ClassOneWayNoFunction_vs() {}, diff --git a/WebGLTemplates/WXTemplate2022/index.html b/WebGLTemplates/WXTemplate2022/index.html index 1f2a2badf..09c3ae63b 100755 --- a/WebGLTemplates/WXTemplate2022/index.html +++ b/WebGLTemplates/WXTemplate2022/index.html @@ -580,7 +580,7 @@ return ""; }, WX_ClassFunction() {return ""}, - WX_ClassOneWayFunction() {return ""}, + WX_ClassConstructor() {return ""}, WX_ClassSetProperty() {}, WX_ClassOneWayNoFunction_v() {}, WX_ClassOneWayNoFunction_vs() {}, diff --git a/package.json b/package.json index 416564650..5a4736743 100644 --- a/package.json +++ b/package.json @@ -1 +1 @@ -{"name":"com.qq.weixin.minigame","displayName":"WXSDK","description":"WeChat Mini Game Tuanjie Engine Adapter SDK Package.","version":"0.1.27","unity":"2019.4","unityRelease":"29f1","keywords":["Tuanjie","WX"],"dependencies":{}} +{"name":"com.qq.weixin.minigame","displayName":"WXSDK","description":"WeChat Mini Game Tuanjie Engine Adapter SDK Package.","version":"0.1.28","unity":"2019.4","unityRelease":"29f1","keywords":["Tuanjie","WX"],"dependencies":{}}