diff --git a/Editor/BuildProfile/lib/libwx-metal-cpp.bc b/Editor/BuildProfile/lib/libwx-metal-cpp.bc new file mode 100644 index 00000000..4051e2fd 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 00000000..28e81d7a --- /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 00000000..3a662c16 --- /dev/null +++ b/Editor/BuildProfile/lib/mtl_library.jslib @@ -0,0 +1,38 @@ +mergeInto(LibraryManager.library, { + // 定义供 C/C++ 调用的 JS 函数 + js_batchRender_malloc: function(data, size, isSync) { + // 直接从 WASM 内存创建视图(零拷贝) + const targetBuffer = new Uint8Array(Module.HEAPU8.buffer, data, size); + //console.log("processBinaryData invoke"); + const extBuffer = new ArrayBuffer(1); + + if(!isSync){ + mtl.batchRenderAsync(targetBuffer, extBuffer); + return null; + } + const response = mtl.batchRender(targetBuffer, extBuffer); + if (!response) { + return null; + } + const result = response.buffer; + if(!result || 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 00000000..3882fefc --- /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 0adcf9a5..673f8716 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 a56cd34b..390e6462 100644 --- a/Editor/Playable/WXPlayableEditorSettingHelper.cs +++ b/Editor/Playable/WXPlayableEditorSettingHelper.cs @@ -6,354 +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; - 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 + "/../"); - } - - 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(); - - 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))) + 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(beta)"); + EditorGUILayout.EndVertical(); + } + + EditorGUILayout.EndScrollView(); + } + public void OnBuildButtonGUI(EditorWindow window) + { + GUIStyle linkStyle = new GUIStyle(GUI.skin.label); + linkStyle.normal.textColor = Color.yellow; + linkStyle.hover.textColor = Color.yellow; + linkStyle.stretchWidth = false; + linkStyle.alignment = TextAnchor.UpperLeft; + linkStyle.wordWrap = true; + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField(string.Empty, GUILayout.MinWidth(10)); + if (GUILayout.Button(new GUIContent("生成并转换"), GUILayout.Width(100), GUILayout.Height(25))) + { + this.saveData(); + if (WXPlayableConvertCore.DoExport() == WXConvertCore.WXExportError.SUCCEED) + { + window.ShowNotification(new GUIContent("转换完成")); + } + 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 963444e3..9e63a6f5 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; + } + } // 用于replaceRules判断是否需要注入相关的修改 public static bool UseEmscriptenGLX { @@ -120,9 +128,12 @@ namespace WeChatWASM CheckBuildTarget(); Init(); // 可能有顺序要求?如果没要求,可挪到此函数外 - if (!isPlayableBuild) { + if (!isPlayableBuild) + { ProcessWxPerfBinaries(); } + // iOS metal 的相关特性 + ProcessWxiOSMetalBinaries(); // emscriptenglx的相关特性 ProcessWxEmscriptenGLXBinaries(); MakeEnvForLuaAdaptor(); @@ -397,10 +408,10 @@ namespace WeChatWASM #else importer.SetCompatibleWithPlatform(BuildTarget.WebGL, config.CompileOptions.enableEmscriptenGLX); #endif - importer.SaveAndReimport(); - // SetPluginCompatibilityByModifyingMetadataFile(glLibs[i], config.CompileOptions.enableEmscriptenGLX); + // importer.SaveAndReimport(); + SetPluginCompatibilityByModifyingMetadataFile(glLibs[i], config.CompileOptions.enableEmscriptenGLX); } - // AssetDatabase.Refresh(); + AssetDatabase.Refresh(); } /** @@ -443,6 +454,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; @@ -566,13 +612,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); @@ -1237,7 +1298,8 @@ namespace WeChatWASM public static void convertDataPackageJS() { - if (!isPlayableBuild) { + if (!isPlayableBuild) + { checkNeedRmovePackageParallelPreload(); } @@ -1360,8 +1422,7 @@ 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), - true + Path.Combine(config.ProjectConf.DST, miniGameDir) ); buildTemplate.start(); // FIX: 2021.2版本生成symbol有bug,导出时生成symbol报错,有symbol才copy @@ -1500,7 +1561,7 @@ namespace WeChatWASM var shortFilename = filename.Substring(filename.IndexOf('.') + 1); // 如果code没有发生过变化,且压缩方式不变,则不再进行br压缩 - if (File.Exists(cachePath) && lastBrotliType == config.CompileOptions.brotliMT) + if (cachePath.Contains("wasm.code") && File.Exists(cachePath) && lastBrotliType == config.CompileOptions.brotliMT) { File.Copy(cachePath, targetPath, true); return 0; @@ -1693,7 +1754,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); @@ -1947,7 +2009,7 @@ namespace WeChatWASM config.ProjectConf.bundleHashLength.ToString(), bundlePathIdentifierStr, excludeFileExtensionsStr, - config.CompileOptions.enableEmscriptenGLX ? config.CompileOptions.Webgl2 ? "4" : "3" : config.CompileOptions.Webgl2 ? "2" : "1", + config.CompileOptions.Webgl2 ? "2" : "1", Application.unityVersion, WXExtEnvDef.pluginVersion, config.ProjectConf.dataFileSubPrefix, @@ -1995,11 +2057,16 @@ namespace WeChatWASM config.CompileOptions.enablePerfAnalysis ? "true" : "false", config.ProjectConf.MemorySize.ToString(), config.SDKOptions.disableMultiTouch ? "true" : "false", + // Perfstream,暂时设为false + "false", + config.CompileOptions.enableEmscriptenGLX ? "true" : "false", + config.CompileOptions.enableiOSMetal ? "true" : "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 7e7b7453..40468c60 100644 --- a/Editor/WXEditorSettingHelper.cs +++ b/Editor/WXEditorSettingHelper.cs @@ -186,6 +186,7 @@ namespace WeChatWASM this.formCheckbox("webgl2", "WebGL2.0(beta)"); this.formCheckbox("iOSPerformancePlus", "iOSPerformancePlus(?)", "是否使用iOS高性能+渲染方案,有助于提升渲染兼容性、降低WebContent进程内存"); this.formCheckbox("EmscriptenGLX", "EmscriptenGLX(?)", "是否使用EmscriptenGLX渲染方案"); + // 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"); @@ -448,6 +449,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("EmscriptenGLX", config.CompileOptions.enableEmscriptenGLX); this.setData("fbslim", config.CompileOptions.fbslim); this.setData("useFriendRelation", config.SDKOptions.UseFriendRelation); @@ -527,6 +529,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.enableEmscriptenGLX = this.getDataCheckbox("EmscriptenGLX"); config.CompileOptions.fbslim = this.getDataCheckbox("fbslim"); config.SDKOptions.UseFriendRelation = this.getDataCheckbox("useFriendRelation"); diff --git a/Editor/WXExtDef.cs b/Editor/WXExtDef.cs index 45c38cd5..54f139a2 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("WXConvertCore.UseEmscriptenGLX", (args) => { return WXConvertCore.UseEmscriptenGLX; diff --git a/Editor/WXPluginVersion.cs b/Editor/WXPluginVersion.cs index b57c4b44..dfc37cc9 100644 --- a/Editor/WXPluginVersion.cs +++ b/Editor/WXPluginVersion.cs @@ -2,7 +2,7 @@ namespace WeChatWASM { public class WXPluginVersion { - public static string pluginVersion = "202507090911"; // 这一行不要改他,导出的时候会自动替换 + public static string pluginVersion = "202508130730"; // 这一行不要改他,导出的时候会自动替换 } public class WXPluginConf diff --git a/Editor/wx-editor.dll b/Editor/wx-editor.dll index 2b7ddb27..b75d5da9 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 68a93c7a..71eca621 100644 --- a/Editor/wx-editor.xml +++ b/Editor/wx-editor.xml @@ -648,11 +648,12 @@ 是否使用iOS高性能Plus - + - 是否使用EmscriptenGLX + 是否使用iOS metal指令流 + 是否使用brotli多线程压缩 diff --git a/Editor/wx-editor.xml.meta b/Editor/wx-editor.xml.meta index 24a076c8..48189865 100644 --- a/Editor/wx-editor.xml.meta +++ b/Editor/wx-editor.xml.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 74e660ca973d2a890864a7dbe6d81507 +guid: 3477ea39b1ba2a3c93fd36d055b21e3d DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/Plugins/SDK-Call-JS.jslib b/Runtime/Plugins/SDK-Call-JS.jslib index 3256e5b8..7c5f0a0b 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 00000000..f9b504c7 --- /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 00000000..a0a033d4 --- /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/libemscriptenglx.a b/Runtime/Plugins/libemscriptenglx.a index de38c892..8688d50a 100644 Binary files a/Runtime/Plugins/libemscriptenglx.a and b/Runtime/Plugins/libemscriptenglx.a differ diff --git a/Runtime/Plugins/wx-perf.dll b/Runtime/Plugins/wx-perf.dll index 6bbdfdb7..8790f84a 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 3a2e424c..6ceb1c02 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 96c192f8..498b52a2 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,6 +3109,26 @@  是否结束 + + + 从不同渠道获得的OPENLINK字符串 + + + + + 选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填 + + + + + 从不同渠道获得的OPENLINK字符串 + + + + + 选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填 + + 一个表示控制器设备上存在的坐标轴的数组 (比如控制器摇杆)。 @@ -4123,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 a1a07e6d..7324e17c 100644 --- a/Runtime/Plugins/wx-runtime-editor.xml.meta +++ b/Runtime/Plugins/wx-runtime-editor.xml.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: f16b00080d6530ba94a60e10ef0653ce +guid: 07a34bd03b33fd6b26c8c70b919189a6 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/Plugins/wx-runtime.dll b/Runtime/Plugins/wx-runtime.dll index 93811f07..fe57dd8d 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 8c7e83a3..d4e4841f 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,6 +3115,26 @@  是否结束 + + + 从不同渠道获得的OPENLINK字符串 + + + + + 选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填 + + + + + 从不同渠道获得的OPENLINK字符串 + + + + + 选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填 + + 一个表示控制器设备上存在的坐标轴的数组 (比如控制器摇杆)。 @@ -4129,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 4b9db371..8d2493c2 100644 --- a/Runtime/Plugins/wx-runtime.xml.meta +++ b/Runtime/Plugins/wx-runtime.xml.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 915c569ad9083f479aeb5d000297162c +guid: 0a2143cd89625ef82b4f55965caf4743 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/WX.cs b/Runtime/WX.cs index cbb9acb6..9261cb09 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 3daf90bc..31be7b59 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 88cdd158..19a1f7cf 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 c3870377..91ca3b8d 100644 --- a/Runtime/playable-default/check-version.js.meta +++ b/Runtime/playable-default/check-version.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: f559d29680b149f9a9320d0570be7521 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 69bfeaf5da028b3d384aab5f1a2be8b1 + 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 0dca7b4c..65bd765b 100644 --- a/Runtime/playable-default/data-package.meta +++ b/Runtime/playable-default/data-package.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 985ee420ff632203aefda8db32df1041 +guid: 9572832f2c91116fa7a9866561020764 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 fbe72d8f..77e2c3c6 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: 3557a962fd3402d3284431a2e883932e -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 1299035d26ee3050be047dc72bb1e23f + 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 06d952b3..f20c5dcc 100644 --- a/Runtime/playable-default/events.js.meta +++ b/Runtime/playable-default/events.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 833c8deeebb60f96103e28a58f92c582 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 5e045c15bcbc3152a68fbfd3f940c54f + 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 61fe48af..a5809653 100644 --- a/Runtime/playable-default/game.js.meta +++ b/Runtime/playable-default/game.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: ade973da253a4c5a3318a3d9de677f3a -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 6e25c8348181d0f6005250553ad3ceeb + 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 59508f61..b33992d6 100644 --- a/Runtime/playable-default/game.json.meta +++ b/Runtime/playable-default/game.json.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 4a63a6b948ea9ef67a6a2f9999186812 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 3a0448c1c6debc78593cc4a0e10fe2c6 + 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 9c2c22cb..2a83fc20 100644 --- a/Runtime/playable-default/playable-fix.js.meta +++ b/Runtime/playable-default/playable-fix.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: d810ff1aaebd1b0c2f797db7a530063d -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 7d1630ae136316b9a401bc7fb39debd3 + 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 bb93153a..018aa302 100644 --- a/Runtime/playable-default/plugin-config.js.meta +++ b/Runtime/playable-default/plugin-config.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 5997f77dc880f2742d79d88881f434b5 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 064cef8885d7ba6f62bc83bcd5b4bf90 + 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 6799155d..38a55a6d 100644 --- a/Runtime/playable-default/plugins.meta +++ b/Runtime/playable-default/plugins.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 324084e65d26ac8fcf67beb9acd0908c +guid: a37f761de5963966a78f52803af702e9 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 72144264..5ccbc957 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: 7837c676f68369fd838619d0ebdb3c05 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: a51b19941c896fcdf4cb2f1b34a3fca7 + 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 80ba8e5f..4be3124a 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: 92817bb5805556689fc583654f2514df -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: ea06347491ece7e302668b729f22060c + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/project.config.json b/Runtime/playable-default/project.config.json index dab2f3b3..8d2255a9 100644 --- a/Runtime/playable-default/project.config.json +++ b/Runtime/playable-default/project.config.json @@ -47,6 +47,10 @@ { "type": "suffix", "value": ".symbols.unityweb" + }, + { + "type": "suffix", + "value": ".symbols.unityweb.br" } ] }, diff --git a/Runtime/playable-default/project.config.json.meta b/Runtime/playable-default/project.config.json.meta index 1dfe0d9c..f14f832a 100644 --- a/Runtime/playable-default/project.config.json.meta +++ b/Runtime/playable-default/project.config.json.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 2abc766f3b98dbe918666c58591dd265 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 954cae7dd667e1ee920584e25e0f6d10 + 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 3ae594c5..d5acbfef 100644 --- a/Runtime/playable-default/texture-config.js.meta +++ b/Runtime/playable-default/texture-config.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 11799ab06b9be7256df16d4abae5ee27 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 7a32263b8529890ceac0a1c9a9cadac6 + 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 13e8b76d..348d5d02 100644 --- a/Runtime/playable-default/unity-namespace.js.meta +++ b/Runtime/playable-default/unity-namespace.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 37a7aad9e59774046bc3608cf3e1f68c -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 51c2b48054433376a0e00d14f13c5f1f + 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 f5dd9ad3..e7694221 100644 --- a/Runtime/playable-default/unity-playable-plugin.meta +++ b/Runtime/playable-default/unity-playable-plugin.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 921448045df92cca51124bda7b501e4e +guid: 16a01ac0a74e3888c7cd27ad42692835 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 655a3d0d..01fe452d 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: 6e205f735c4d6f4894725d90dbdace5d -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 09cdedb82d92c7e8edfddaa43bdb956b + 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 b429abe6..187cb5ad 100644 --- a/Runtime/playable-default/unity-sdk.meta +++ b/Runtime/playable-default/unity-sdk.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ec3aeca85f8ab04c1d515c514404351d +guid: 212c80201a527f9daa5fd8ded6fdf766 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/playable-default/unity-sdk/audio.meta b/Runtime/playable-default/unity-sdk/audio.meta index 983d300f..810d1435 100644 --- a/Runtime/playable-default/unity-sdk/audio.meta +++ b/Runtime/playable-default/unity-sdk/audio.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 1e295165c6519f30b65235504633e973 +guid: 10542729e5d685cfc8e10e1e386e9bac 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 853f7df9..9b86a964 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: fa0da8271fae1945d761d4e7afa379d3 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 4b93fe09d856317783791dc6039e8968 + 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 567b5281..f419c951 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: ab5ca6526511f02e1019c55260ac0f92 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: ab96eb7f2118c5db58271bb17a771aa3 + 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 ecd91773..fad16d14 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: bf1d918f44888ca5f28e22c227b6a4bc -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 2a5961845c01494e0b70ce34d50b6cc0 + 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 308dc0ae..2c2c0687 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: 410a86604aba02eb0c9025174d91aef4 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: b80defa51c71c57c2d8732aac0ae1a16 + 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 0bc5368b..e1af0999 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: a36ea91786670d1cfffb78f90d53e2ee -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 4c221614d8600db6626d60a3586a84ac + 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 d4f3d843..87e59fed 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: 7330316c96b2ce8db3870d650b88d0ac -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 5d1ec32ef06eecf0640abe5092583946 + 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 fa931819..4e86de8c 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: 6a967aac7d0c5f9ab1451e3ab3628825 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: db325512583c32c097ed61125f0deceb + 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 4e6ffd80..3e75c10d 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: 8f436b74adad0e71b61baffacc5abe06 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 825020547b3535309834c54bb3aef592 + 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 93fc7e7e..350ccb77 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: f64e2b18f8c1cde7e8059ae994f22fbe -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: f9e51fab460e8464844b19ccac8448d6 + 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 fcde31af..5fd75584 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: 6c70f051b73c490f55c6bc1bc85e8106 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 8b37a594208d5c50e16719e379fe4bf7 + 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 c15ad6b0..8c63e4b6 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: 3bb24a920c3b38d438464e158deca714 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 220a340900638d2f76abdd7f121387c4 + 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 cf70172d..0c875d5b 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: 2c684789414dd26a7f0b0248115d19c6 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 4710c93128a0a1da4ea4e4f5c56a14a8 + 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 ba769b74..2e5d67ad 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: 69ae57171b25512259a2e4b92d554f15 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: e0768c7d86d9b9234b529fa9faf6adf8 + 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 5eda187b..73480504 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: 0c03acbb0ee59661f89c4a07f2c00677 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 7c06c703a510aeac873db9d81cc14e60 + 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 ce199bf4..d216908f 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: 091a83c6d554c6b4c3321cd1f4df08ea -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 8dbd20ce4b45cedf4a3d23a9acfca7e9 + 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 ae818026..b4de9e13 100644 --- a/Runtime/playable-default/unity-sdk/mobileKeyboard.meta +++ b/Runtime/playable-default/unity-sdk/mobileKeyboard.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: a422c07da6e5964c436fe22f690b36ce +guid: 12ad07dd7e0deb7fc60b8273612367dc 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 a4e48a0e..c61db987 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: dd57e6157edaf5f06b5544f3dce4b2e0 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 0fd6757532ceb9073c7264e2a265a415 + 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 7161357b..107ad7c9 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: 39db3abf36c715583a3118b41bdaed66 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 9be5eb96b1f121bcef0a7f9fa42dc752 + 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 97268bba..d587bb2a 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: 6a00c4a0bcf5e89b1072c6334ac91419 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 39da48edb2004f65dac98ea91cdb9d96 + 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 e81a8577..1cc38b16 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 83d18e35..f4cdf370 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: 0fc60fb512c188f3172b6f47fefde5fa -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 2d4bde445c6c8d9d7aed0b1ec3e4ed0a + 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 b841631e..37fac3ef 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: be0ca22017e04399a53e051671165f55 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 9168c1c9dbabf466784907010fbb9c11 + 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 42ed7d77..938acec7 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: ffeb0af90cd7a659e1afdd8284c8916a -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 72a6f26aeb2630043abdb31b95f18327 + 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 d1230f71..0c1957ed 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 c41ec9ee..dad11df6 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: 3226abd0306e36c7bb7f9f7a3eec3095 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 9feeb2df85764ae670a1216f2ea864a7 + 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 a65044eb..13f59ecd 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: f5e9bc3387f9598afc5f7f68f56d3911 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 0c95be6ce3e52e35dbe11493d1923a70 + 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 8510a394..1e93d80f 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: 325f384eaa0c3eaa109775c92c41ab62 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 12dee947dffbcdff4734003a9ef217bc + 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 9f0fa3fb..a8234835 100644 --- a/Runtime/playable-default/unity-sdk/touch.meta +++ b/Runtime/playable-default/unity-sdk/touch.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 6e3d3d18f1d5208946231f05f7ec6393 +guid: 5434790436097fcc24bb970f40bf835b 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 299fe127..7505cbfd 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: e3873a61887e2cd5cf7fab8ccb09f234 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: d3beab7c1b0a7259419d67b28c00a49f + 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 784b43f1..1ee40ed3 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: 216ac06f0ae6e95e1a52902d87d27ade -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 2b9fe87d9bae7dbc128fd001b34576b0 + 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 c253ea11..eb5fc942 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: 0935239197d3eaf480d351b6008a6e3f -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: e188b2e4a0040e686003c2870f54f6f9 + 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 e6366ab3..f34f4947 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: 4bec208191b9c2b028887bc516145d85 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 1f9ba665e9bfe6529a283184e4b4582f + 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 a5337e6e..619d67a6 100644 --- a/Runtime/playable-default/unity-sdk/video.meta +++ b/Runtime/playable-default/unity-sdk/video.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 626da5aac8a91c22f3283496474046c6 +guid: ada964bd4c3ea8d7c81dbf0399a83f2a folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/playable-default/unity-sdk/video/index.js b/Runtime/playable-default/unity-sdk/video/index.js index c9403467..6fa2ac90 100644 --- a/Runtime/playable-default/unity-sdk/video/index.js +++ b/Runtime/playable-default/unity-sdk/video/index.js @@ -171,6 +171,12 @@ function _JS_Video_Create(url) { function _JS_Video_Destroy(video) { debugLog('_JS_Video_Destroy', video); videoInstances[video].destroy(); + const Module = GameGlobal.manager.gameInstance.Module; + const { GL } = Module; + const gl = GL.currentContext.GLctx; + if (!isWebVideo && gl.emscriptenGLX && Module._glxVideoDestroy) { + Module._glxVideoDestroy(video); + } delete videoInstances[video]; } function _JS_Video_Duration(video) { @@ -375,7 +381,29 @@ function _JS_Video_UpdateToTexture(video, tex) { if (!FrameworkData) { return false; } + const Module = GameGlobal.manager.gameInstance.Module; const { GL, GLctx } = FrameworkData; + const gl = GL.currentContext.GLctx; + + if (!isWebVideo && Module._glxVideoUpdateToTexture && gl.emscriptenGLX) { + const data = v.frameData?.data; + const source = supportVideoFrame ? data : new Uint8ClampedArray(data); + const byteLength = supportVideoFrame ? 0 : source.byteLength; + let sourceIdOrPtr; + if (supportVideoFrame) { + sourceIdOrPtr = source.__uid; + } + else { + sourceIdOrPtr = Module._glxGetVideoTempBuffer(video, byteLength); + if (sourceIdOrPtr) { + Module.HEAPU8.set(source, sourceIdOrPtr); + } + } + + Module._glxVideoUpdateToTexture(v, supportVideoFrame, tex, v.videoWidth, v.videoHeight, sourceIdOrPtr); + return true; + } + GLctx.pixelStorei(GLctx.UNPACK_FLIP_Y_WEBGL, true); diff --git a/Runtime/playable-default/unity-sdk/video/index.js.meta b/Runtime/playable-default/unity-sdk/video/index.js.meta index 34aa5854..4859fc29 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: 47b6fb8e40dad5650a03b6b90a9e3854 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 35971cbff7beef8bdd988f57968ed875 + 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 6376d0b4..fe3cf914 100644 --- a/Runtime/playable-default/wasmcode.meta +++ b/Runtime/playable-default/wasmcode.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 8b486e81c171279389438f4a53171eb8 +guid: 981b9edfe995f2b533ad3e518a4647a0 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/playable-default/wasmcode/game.js.meta b/Runtime/playable-default/wasmcode/game.js.meta index 6aafda2f..58d6e01f 100644 --- a/Runtime/playable-default/wasmcode/game.js.meta +++ b/Runtime/playable-default/wasmcode/game.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: bd8dab62c1c483a64f44e4cf2a573c75 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 0db935536a598c1b9ed6e61c7305aebb + 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 151b7084..74d5d8a6 100644 --- a/Runtime/playable-default/weapp-adapter.js.meta +++ b/Runtime/playable-default/weapp-adapter.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 2412911088bca0378b37e03d7c9edaad -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 9c41c4b94ac0b73eef273cc06e0fa35b + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/check-version.js b/Runtime/wechat-default/check-version.js index 58442da9..50a37a2f 100644 --- a/Runtime/wechat-default/check-version.js +++ b/Runtime/wechat-default/check-version.js @@ -65,8 +65,8 @@ const isMobileBrotliInvalid = isMobile && !compareVersion(SDKVersion, '2.21.1'); const isBrotliInvalid = $COMPRESS_DATA_PACKAGE && (isPcBrotliInvalid || isMobileBrotliInvalid); // iOS系统版本>=17.5时,小游戏退后台会导致异常 export const isIOS175 = compareVersion(systemVersion, '17.5') && isH5Renderer; -// 是否支持开放数据域渲染模式,使用ScreenCanvas模式可以优化ToTempFilePath的使用 -export const isSupportSharedCanvasMode = compareVersion(SDKVersion, '3.6.6'); +// 是否支持开放数据域渲染模式,使用ScreenCanvas模式可以优化ToTempFilePath的使用,PC 上 ScreenCanvas 模式事件处理有问题,PC 先禁止这个模式 +export const isSupportSharedCanvasMode = compareVersion(SDKVersion, '3.6.6') && !isPc; // 是否能以iOS高性能模式运行 // 请勿修改GameGlobal.canUseH5Renderer赋值!!! GameGlobal.canUseH5Renderer = isH5Renderer && isH5LibVersionValid; diff --git a/Runtime/wechat-default/check-version.js.meta b/Runtime/wechat-default/check-version.js.meta index 81646200..6f3a68e9 100644 --- a/Runtime/wechat-default/check-version.js.meta +++ b/Runtime/wechat-default/check-version.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: e9fb9b3caad6dec8d975d4e0244dda4e -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 76d18f5f8a87f4b5dbfe3b1d3eafe456 + 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 2d857a5b..2ddcbb1b 100644 --- a/Runtime/wechat-default/data-package.meta +++ b/Runtime/wechat-default/data-package.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 7876f291585b84c91bfb2ecd4fda96de +guid: be4054c42e31d2538fb77180130626f6 folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: - assetBundleVariant: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/data-package/game.js.meta b/Runtime/wechat-default/data-package/game.js.meta index 21a3e953..eae55f64 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: 8d220c6108fa139540028c8d8b730c91 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 772c3b7b7539d7de0043be5bd2a6068b + 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 9eb663f3..9f4fd966 100644 --- a/Runtime/wechat-default/events.js.meta +++ b/Runtime/wechat-default/events.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 4c2817c12941f5b21ba22eb45dbe363f -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: a0d9ecb11b75628ffac93b5f770b4d21 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/game.js b/Runtime/wechat-default/game.js index b496b939..79956cd5 100644 --- a/Runtime/wechat-default/game.js +++ b/Runtime/wechat-default/game.js @@ -27,7 +27,11 @@ const managerConfig = { '$PRELOAD_LIST', ], contextConfig: { - contextType: $WEBGL_VERSION, // 1: webgl1, 2: webgl2, 3: wxwebgl, 4: wxwebgl2, 5: wxmetal + contextType: $WEBGL_VERSION, + contextExt: { + enableGLX: $ENABLE_GLX, + enableMetal: $ENABLE_METAL, + } }, PROFILER_UPLOAD_URL: '', }; @@ -48,7 +52,6 @@ checkVersion().then((enable) => { canvas, events: GameGlobal.events, WXWASMSDK: GameGlobal.WXWASMSDK, - isSupportEmscriptenGLX: wx.env.isSuppportEmscriptenGLX || wx.env.isSupportEmscriptenGLX || false, }, }).default; } diff --git a/Runtime/wechat-default/game.js.meta b/Runtime/wechat-default/game.js.meta index aa80a43b..7ea3f23a 100644 --- a/Runtime/wechat-default/game.js.meta +++ b/Runtime/wechat-default/game.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 38691e6bf69a6e0794f206de35f0b810 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 3339261f938cc9ad644a72dd0c5a1a7f + 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 18c2cc4a..6adbb354 100644 --- a/Runtime/wechat-default/game.json +++ b/Runtime/wechat-default/game.json @@ -23,7 +23,7 @@ ], "plugins": { "UnityPlugin": { - "version": "1.2.77", + "version": "1.2.79", "provider": "wxe5a48f1ed5f544b7", "contexts": [ { @@ -32,7 +32,7 @@ ] }, "Layout": { - "version": "1.0.15", + "version": "1.0.16", "provider": "wx7a727ff7d940bb3f", "contexts": [ { diff --git a/Runtime/wechat-default/game.json.meta b/Runtime/wechat-default/game.json.meta index 739d1ee7..079b4a00 100644 --- a/Runtime/wechat-default/game.json.meta +++ b/Runtime/wechat-default/game.json.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 4fe695ad98d7e147f10b7f02b9e23885 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: a2c1796c30d974217dafe1fbbbb68f8d + 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 e09b8fc8..aef9b603 100644 --- a/Runtime/wechat-default/images.meta +++ b/Runtime/wechat-default/images.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: a8b368565349c464585be31f1de8cbb4 +guid: 22eeeb5bac28cd9bd27de9d4e3d3cf29 folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: - assetBundleVariant: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/images/background.jpg.meta b/Runtime/wechat-default/images/background.jpg.meta index a627667b..fac50a87 100644 --- a/Runtime/wechat-default/images/background.jpg.meta +++ b/Runtime/wechat-default/images/background.jpg.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 4271761c3faa23339d4b34005eaac7c1 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 9f76dd150e421c44e6d7a3dd766a01ab + 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 35ee7840..23305a7e 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: 6644d6c5e264b1d552937fe30ab5828a -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 77fe2b496ab203656de223fff20c4a75 + 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 f9d9129c..0c696505 100644 --- a/Runtime/wechat-default/open-data.meta +++ b/Runtime/wechat-default/open-data.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: a4dc6cb18702e483f8c0e33040ec7a8c +guid: 0e9d1e2d19336c4d08335e4ea96e9437 folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: - assetBundleVariant: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/data.meta b/Runtime/wechat-default/open-data/data.meta index 5150eadd..344f30c9 100644 --- a/Runtime/wechat-default/open-data/data.meta +++ b/Runtime/wechat-default/open-data/data.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: c8e8941eec0094aafae952831b56f585 +guid: 4dbe42a5733d802e0e234dda54e2a1e9 folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: - assetBundleVariant: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/data/index.js.meta b/Runtime/wechat-default/open-data/data/index.js.meta index 7c304477..5b2be312 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: 8a19bd329261faafe1a4967d891859a6 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 87c38ac95bdd0e1b2ec2000cd823a550 + 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 5a2ac123..82f62bb1 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: eb0b3b6ab722091f2521f0a31d50a515 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 5afee5c4ebe9451388e0237741ec9fc1 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/index.js.meta b/Runtime/wechat-default/open-data/index.js.meta index 38b680bf..22282189 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: 2026c8a15a4d2e461cd638284926d809 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: b1ed86edf565b6908063eae94bed3238 + 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 1b909856..c9a7064d 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: 2ffbe01c74757047225fb8962496b824 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 229cba16f0a13d89bbcfd0e80cadb2f8 + 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 f4467bdc..a64f50ba 100644 --- a/Runtime/wechat-default/open-data/render.meta +++ b/Runtime/wechat-default/open-data/render.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: ebc1da29f775747f9af59d775106062d +guid: cb4cde9cc2f4b0cf62a89bd656ec26c5 folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: - assetBundleVariant: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/open-data/render/image.meta b/Runtime/wechat-default/open-data/render/image.meta index 60ae58fb..924e1aa9 100644 --- a/Runtime/wechat-default/open-data/render/image.meta +++ b/Runtime/wechat-default/open-data/render/image.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: b33553816b14b4361a6c9ada07d3b595 +guid: 944af93575dc223bd9bfebe8b7ffab8f folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: - assetBundleVariant: + assetBundleVariant: \ No newline at end of file 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 6f8d41cb..b545fd6e 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: 46cf7fae1d8e71e101c5bc1f54b48f3a -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 23bde569390f7759c35a47b11802530b + 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 805f4ab9..c3a81787 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: dcbb3862bddf8f3894cffaccdb77e092 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 771db4899e9ecf14e4f67f1266afaebc + 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 19d6b591..9d006e61 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: 5b629a2b65bdbd477cc1c7fb8c061bb7 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: fb7dd87eb023eb67bedeb5517c01e30e + 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 c4e134fd..6974d826 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: 6500b6315584a5064e8cfb710f962df0 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 6a9f5005c67c473e5f2b9f809bea2e7b + 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 ad7fb1dd..9d034c9f 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: 457ff37adb2d31b4d5f8a7461b9f2362 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 14a1bd63e6f1dfe38e172967dce314dc + 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 029b710e..7e172335 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: 11fbd3e238167b8bfc64c8c3808a149a -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 151d8c19126c0885f02b5346a3a52bdb + 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 6c769601..9ec112d5 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: 23bee711ee68ea62818016c16995182b -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 8819c1cc98914f847a30ee90e3869b6f + 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 a2134ff3..d62263c6 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: 027d0155d67467a1d5931af88c93dcca -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 23eda16a71a384110f7aa81b43c2af76 + 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 9e3e8129..d02540cd 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: 933af7dec8ec97ae7608ee99ff6dee66 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 38646a82c73675b789e680e76cf2e0ce + 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 60e344ca..39b51cf1 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: 644d5fc606a6fcbc0ec3c60479c58c8f -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 46a0a44f63bd671959a8d6699dd03f46 + 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 65792ade..c8fb8c76 100644 --- a/Runtime/wechat-default/open-data/render/styles.meta +++ b/Runtime/wechat-default/open-data/render/styles.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: f47a9479340194819aa9d4bb8aba4b12 +guid: 70902acb4de891e61a1a53a14f3fc258 folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: - assetBundleVariant: + assetBundleVariant: \ No newline at end of file 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 e471deaa..9736fba9 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: be114f7b0f3d0c40c167f51c1b603ce5 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 5fb3c3dbd7fdfa65204f5b06e7968413 + 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 bc15bd0f..6b23203b 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: 5475544921d954b82fbc3773251900be -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 8bec9d4b23694dcb85fd93c0fa31cfb4 + 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 966d96f4..862ceed5 100644 --- a/Runtime/wechat-default/open-data/render/tpls.meta +++ b/Runtime/wechat-default/open-data/render/tpls.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: ecd66fe8b6a774bba91cf678ded273ac +guid: 8aeb5ff228fea8cd80f81f03c5495040 folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: - assetBundleVariant: + assetBundleVariant: \ No newline at end of file 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 ecbdc24c..b6725eb8 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: c721030dfb82e49403ff767f15782a6f -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 5b4af24bc2bb051fc84ce92101f24362 + 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 d8876d91..b9067c70 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: e8a893092ff80e70333ae44ccb8191ba -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 55a4f9f8b6dd53a0b3f8fb8de5ff6f28 + 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 7d18fad8..7e50298f 100644 --- a/Runtime/wechat-default/plugin-config.js.meta +++ b/Runtime/wechat-default/plugin-config.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 701f81ba0a88d4476291e5674569c67a -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 615e0c304a52eaabee6cf244e7389d34 + 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 aaccbe7d..6e318f91 100644 --- a/Runtime/wechat-default/plugins.meta +++ b/Runtime/wechat-default/plugins.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 7138171c522f8ed3db234e0cec8a4379 +guid: e37db14368fd6c1ca6aac3f7ee4c1c80 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 34f32dab..4f872056 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: 1eb8c0ee4e694dfa93115c39ba1886e2 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: b3978d36da3aca320d2d3bd9c23ebaf1 + 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 97d74c37..ce6df775 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: a07e9ef4d007099c2fbef0801f2bebab -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: d02c5744b518860803b52b74654522c0 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/project.config.json b/Runtime/wechat-default/project.config.json index bc8bd27b..ef8f2713 100644 --- a/Runtime/wechat-default/project.config.json +++ b/Runtime/wechat-default/project.config.json @@ -47,6 +47,10 @@ { "type": "suffix", "value": ".symbols.unityweb" + }, + { + "type": "suffix", + "value": ".symbols.unityweb.br" } ] }, diff --git a/Runtime/wechat-default/project.config.json.meta b/Runtime/wechat-default/project.config.json.meta index 2fca8919..4b5c22eb 100644 --- a/Runtime/wechat-default/project.config.json.meta +++ b/Runtime/wechat-default/project.config.json.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: df8fd2e4627a4d466a8a6243c9c0d3c9 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: e57727032db7982dd472a0935556b42f + 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 71a1687b..9ca5fb76 100644 --- a/Runtime/wechat-default/texture-config.js.meta +++ b/Runtime/wechat-default/texture-config.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: b4ae941a8deaa24b5d1b3848a89e5a63 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 228999f9335a7444289930e3aff7acea + 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 30f8347b..85a15e68 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 8db10f97..96e8789e 100644 --- a/Runtime/wechat-default/unity-namespace.js.meta +++ b/Runtime/wechat-default/unity-namespace.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 3333737453b90246d1ee7a815565f3d2 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: c8f76791c185d46704b2be61fdabd15a + 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 1abfc728..34b872d4 100644 --- a/Runtime/wechat-default/unity-sdk.meta +++ b/Runtime/wechat-default/unity-sdk.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 11099722ddcf64977a5e5a9458a9d25e +guid: 5122f9ec51338b2af2cee083df7d4d98 folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: - assetBundleVariant: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/TCPSocket.meta b/Runtime/wechat-default/unity-sdk/TCPSocket.meta index 03512191..e110636d 100644 --- a/Runtime/wechat-default/unity-sdk/TCPSocket.meta +++ b/Runtime/wechat-default/unity-sdk/TCPSocket.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 32be1635227424b85b90b681aad8a17a +guid: 4a5c5b8cedfc80cfd97f1e237af9d0eb folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: - assetBundleVariant: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/TCPSocket/index.js.meta b/Runtime/wechat-default/unity-sdk/TCPSocket/index.js.meta index 853ab784..9b82e8c0 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: b4317bfae0a89f1679154e28e1a90208 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 84e0978447e111858aaffd00039e380e + 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 88075042..2b73eb31 100644 --- a/Runtime/wechat-default/unity-sdk/UDPSocket.meta +++ b/Runtime/wechat-default/unity-sdk/UDPSocket.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: c7a2f4e20cff4483fba121b2ec45961e +guid: c1a18f607fe887556eabf539ca55d2c5 folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: - assetBundleVariant: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/UDPSocket/index.js.meta b/Runtime/wechat-default/unity-sdk/UDPSocket/index.js.meta index 54571f00..62fb69b8 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: db92631bd4fce2a3d054cd15f4bc99ef -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: a2df0609782f266bba5f186329d12290 + 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 5d964209..b229866d 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: cc26580a4aa82746d6418decdea4afc4 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: adcb7dce505c383a94e6a3baa5787f65 + 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 de163886..5c9be955 100644 --- a/Runtime/wechat-default/unity-sdk/audio.meta +++ b/Runtime/wechat-default/unity-sdk/audio.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 7e545897d0aba42cc8e2e430aa778e86 +guid: e2cc6b725ac510749acac118e16f6e41 folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: - assetBundleVariant: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/audio/common.js.meta b/Runtime/wechat-default/unity-sdk/audio/common.js.meta index 6fdc005e..89cb864b 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: d2b1bf3c4b96e85bd48b1ba25673b2c4 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 04c989d4b1a11c1c4f07144a0c6a0713 + 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 aff8af3f..0668dc17 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: 720ce032d11d7bad7ff033c19205bb43 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 9718d826d3b44d80d113bcac46365058 + 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 c98749e2..558664d7 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: f0b24c5af65adcf29d7d8b33d27514cb -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 3432dbf952f315a988fc439ece032c26 + 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 a517f88e..7f372ca5 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: 039fe2e27c83d5950d3e17bdca737994 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: e509bb316a2bf003e3022b2a2f061194 + 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 456e77b2..4afcdff5 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: 66bc4f1cde3584fb144fcfb498dcbd9d -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 95d770c1cbd3cf09d75256eb3ba2c007 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file 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 7889dc33..4b4c8873 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: dbfe6069f3efe1031ee9e7d4e47c866a -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 9ecc0df83cfaa83cf95695a926c74847 + 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 a98bf386..9e7e34c1 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: ef2bf864b11b348caaeffbbcaf49b4e3 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 49b9e8d9db4fe97459125d3f8519ead5 + 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 eb9be6d4..d3fa2681 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: d2109b69f62c0b0e7e83d7c6a0bac558 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: d6434dee1a1e8acf9ef08a0c6efb7d64 + 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 884b3b81..e11f0359 100644 --- a/Runtime/wechat-default/unity-sdk/bluetooth.meta +++ b/Runtime/wechat-default/unity-sdk/bluetooth.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 57e7ca724f9494d8a8fe8998dd95016f +guid: be24006cac8d301202c6d90b6719551e folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: - assetBundleVariant: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/bluetooth/index.js.meta b/Runtime/wechat-default/unity-sdk/bluetooth/index.js.meta index 8770baa2..9b39f3bb 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: 5299f5d21e7e3f49d7f7933aa865c8f4 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: c48e962ca1e6939b2ff66beb0e22cb19 + 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 0c56cf46..f8f83a87 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: 6286b7d33ac1dc640a46aa31ed11c573 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: e19d0087352ce23bde11125b71d8aba6 + 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 5cbdac2c..16477aad 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: 49974812e6c8b08a2b5d21d79131fefd -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 1ab88ba850e9c774fbcf043f5a4a29e8 + 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 018af76b..27c3406c 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: cde9ffce22ae38a4de2edb029a8948c1 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: a6b6583c52354c4cdf63c17cf720ba29 + 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 5ea83e7d..67e2cc3f 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: 86c30e575f2ef3091ddbef3199ba1a8b -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: db666b58915d6d35e71cb8e9e4f1b423 + 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 9e867387..414d9b16 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: 84ac672c39a3df6128e1b61126b32800 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 52c705da2bba760820a6af0ea1bd2649 + 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 3e237d4f..6726eec4 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: 2210f07be44efcfa065a25eeb7ff417f -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: fb04d690baeb97d8b566c7e10df00279 + 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 54a5d529..1fbc974c 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: 585fce7d8c43a4f8f10574d9f84a6ecd -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 14615d55952437cc21b7e7cfde142dfd + 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 d9b407e3..e6d72527 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: 4d02de7ef2fd0a2b2b3b642fe66dcf46 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 9e28eb1bcd3364b0da784f89207d4ba9 + 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 e19d1a86..3f98ad11 100644 --- a/Runtime/wechat-default/unity-sdk/font.meta +++ b/Runtime/wechat-default/unity-sdk/font.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 0642900cc47924152b614b3d4ec59437 +guid: ac347907d8bcd9507c6bc7512179110e folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: - assetBundleVariant: + assetBundleVariant: \ No newline at end of file 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 4cf1fc08..c5df7c17 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: ce1aa9226bf05b3025d67091c302490d -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 860e12e842abd53263b8e2c8450e5f89 + 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 8e17cc70..ae5117b3 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: 8e03a3278d207b5bb4b25f9df5698011 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 4867073cd5bdd616f1762d6d3175a7b0 + 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 9328d010..bbad0a1c 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: 819f4cb69dc2a2ea330e3c5ac84891cf -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 67d1a922377b7ee72637ddf79f43ae01 + 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 4f818319..378b1aed 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: 9f629cddb5734df211b160f2e5944695 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 3df646ccadc064603f2d5e9bf74c27f5 + 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 6771a948..ca6c4147 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: b5642e80ac2f3d635763e8f8893dd9f4 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 2afc43897dedd069ee34f9772fbb417d + 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 570b391f..3cae8a8c 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: 003737b0bba5f1fd35ff49983efe7d3d -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 690472c3c79d730a7d5ee067a440521d + 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 91971f16..2db5db65 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: eb49488bf8c22b7a88b6c6c95ce95399 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 6dfdd0fef88121009cbc5263eb27e5b8 + 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 ef45ad85..2d83423a 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: 4159454a27cfb24a0afdf200521103d5 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 0b1acfc20c2f88c758f333b1c30e155a + 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 b84179b5..625ec5a2 100644 --- a/Runtime/wechat-default/unity-sdk/gyroscope.meta +++ b/Runtime/wechat-default/unity-sdk/gyroscope.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 49cef828fdc21404baf92030d8b850fa +guid: fab5a52f6251c0ce96d3c6b249cf4b4f folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: - assetBundleVariant: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/gyroscope/index.js.meta b/Runtime/wechat-default/unity-sdk/gyroscope/index.js.meta index 00b35034..66186ddc 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: fa8aa27a1eea2208ea8572a07e23c337 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 513d008672a27ac3ee9eedb82fa739da + 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 d53704a6..682e571e 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: 76fc939d998c0a00f4e6f6e5324fba1e -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: effd2083a31f1ef4e0da443078c8cec2 + 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 cae8be55..07b26d1f 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: e9516f015bae7a9a9d845bb4704bb93e -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 5a6a1940af0964126e17f31d029c8c50 + 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 7f258d12..ac285873 100644 --- a/Runtime/wechat-default/unity-sdk/mobileKeyboard.meta +++ b/Runtime/wechat-default/unity-sdk/mobileKeyboard.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 58aef8f64e78645fc851056e88487363 +guid: 8fff97c9afccd330c3287028334c4696 folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: - assetBundleVariant: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/mobileKeyboard/index.js.meta b/Runtime/wechat-default/unity-sdk/mobileKeyboard/index.js.meta index b219bde3..883645ed 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: 75252530c0fa41e55e283ae6010afb20 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: c395c298f30ab85270bc7fe56702c974 + 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 c0aab25b..328d8287 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: 9474c4280b33c65495958ad16ad978db -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 5036e1c184be03cca6a31f14a1e95a86 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/open-data.js b/Runtime/wechat-default/unity-sdk/open-data.js index 2f4bd29d..c64e6a38 100644 --- a/Runtime/wechat-default/unity-sdk/open-data.js +++ b/Runtime/wechat-default/unity-sdk/open-data.js @@ -12,7 +12,6 @@ var SharedCanvasMode; })(SharedCanvasMode || (SharedCanvasMode = {})); let sharedCanvasMode; let timerId; -let textureObject = null; let textureId; function getOpenDataContext(mode) { @@ -21,6 +20,9 @@ function getOpenDataContext(mode) { } if (!isSupportSharedCanvasMode) { + if (mode === 'ScreenCanvas') { + console.warn('[unity-sdk]: 当前环境不支持 ScreenCanvas 模式'); + } sharedCanvasMode = SharedCanvasMode.OffScreenCanvas; } @@ -32,6 +34,7 @@ function getOpenDataContext(mode) { sharedCanvasMode = SharedCanvasMode.OffScreenCanvas; } } + console.log(`[unity-sdk]: 当前开放数据域为 ${sharedCanvasMode} 模式`); // @ts-ignore cachedOpenDataContext = wx.getOpenDataContext({ sharedCanvasMode, @@ -47,34 +50,25 @@ function hookUnityRender() { if (!textureId) { return; } - const { GL } = GameGlobal.manager.gameInstance.Module; + const Module = GameGlobal.manager.gameInstance.Module; + const { GL } = Module; const gl = GL.currentContext.GLctx; - if (!textureObject) { - textureObject = gl.createTexture(); - gl.bindTexture(gl.TEXTURE_2D, textureObject); - if (GameGlobal.unityNamespace.unityColorSpace === 'Linear') { - gl.texImage2D(gl.TEXTURE_2D, 0, gl.SRGB8_ALPHA8, gl.RGBA, gl.UNSIGNED_BYTE, getSharedCanvas()); - } - else { - gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, getSharedCanvas()); - } - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); + const isLinearColorSpace = GameGlobal.unityNamespace.unityColorSpace === 'Linear'; + + if (gl.emscriptenGLX) { + Module.ccall('showOpenData', null, ['number', 'number', 'bool'], [textureId, getSharedCanvas().__uid(), isLinearColorSpace]); } else { - gl.bindTexture(gl.TEXTURE_2D, textureObject); - if (GameGlobal.unityNamespace.unityColorSpace === 'Linear') { + gl.bindTexture(gl.TEXTURE_2D, GL.textures[textureId]); + if (isLinearColorSpace) { gl.texImage2D(gl.TEXTURE_2D, 0, gl.SRGB8_ALPHA8, gl.RGBA, gl.UNSIGNED_BYTE, getSharedCanvas()); } else { gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, getSharedCanvas()); } + timerId = requestAnimationFrame(hookUnityRender); } - GL.textures[textureId] = textureObject; - timerId = requestAnimationFrame(hookUnityRender); } function stopLastRenderLoop() { @@ -94,10 +88,13 @@ function stopHookUnityRender() { sharedCanvas.width = 1; sharedCanvas.height = 1; - const { GL } = GameGlobal.manager.gameInstance.Module; + const Module = GameGlobal.manager.gameInstance.Module; + const { GL } = Module; const gl = GL.currentContext.GLctx; - gl.deleteTexture(textureObject); - textureObject = null; + + if (gl.emscriptenGLX) { + Module.ccall('hideOpenData', null, [], []); + } } wx.onShow(() => { if (cachedOpenDataContext) { @@ -121,6 +118,10 @@ export default { console.error('[unity-sdk]: WXShowOpenData要求 width 和 height 参数必须大于0'); } + if (!cachedOpenDataContext) { + console.warn('[unity-sdk]: 请先调用 WXGetOpenDataContext'); + } + const openDataContext = getOpenDataContext(); const sharedCanvas = openDataContext.canvas; sharedCanvas.width = width; @@ -146,6 +147,10 @@ export default { }, WXHideOpenData() { debugLog('WXHideOpenData'); + if (!cachedOpenDataContext) { + console.warn('[unity-sdk]: 请先调用 WXGetOpenDataContext'); + return; + } getOpenDataContext().postMessage({ type: 'WXDestroy', }); diff --git a/Runtime/wechat-default/unity-sdk/open-data.js.meta b/Runtime/wechat-default/unity-sdk/open-data.js.meta index f0a29f3f..c13de528 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: f91d21f63008bdab1ae38d85b0409fc4 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: f44805c3750f2e101110a0190382506c + 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 a5728b7c..c491fdea 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: abb3594f553871bcf0f4d42c59e2a12b -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: e2dbc9fd9ac62414bd27d8a8a13d926f + 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 fbc6da17..1cc38b16 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 2b375379..947643a6 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: 659eaf724c2f3a53af94cfbad2514100 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: e2074da1d7fe87ebf38c105bf3cea695 + 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 9ca8b5a4..ead21e38 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 9757477d..2336ea43 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: 113b1f2ec1a9c8038b35ac75843e9bef -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: d2ed8db41fc37678c699a8146fb0cc56 + 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 8488ebfb..493a9d4e 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: 4a8e80396d64addd8b8cc71c427820e4 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: f47a1a03363996ca593463c0bc631abc + 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 d1230f71..0c1957ed 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 996698ae..fc0c5a9c 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: 7a86f984f7c3d588da7216687399381c -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 5faf11bcf6c3a9ce0cc7c28c5e88dba0 + 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 0dacef6b..5d9bca26 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: a70f86200e49d6f3f00770f79e64c64b -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 625f11e8cfb96fc3290af5bf9c115d3c + 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 7750a97e..46fd5861 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: a61d0f11a8cebf3cc97506b2beb5e8b0 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 4a35dc76f7e7f0e76dff294e569a8105 + 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 e0c7436c..252f7322 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: ed784690aec3c9f22432867e04bb7484 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 5e840a637fd9d72706ea98dd07729e17 + 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 40d43262..476bfdae 100644 --- a/Runtime/wechat-default/unity-sdk/touch.meta +++ b/Runtime/wechat-default/unity-sdk/touch.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 73fe54ef4a540416a98c894f367c9888 +guid: 75e49be02512e9e671c83b6410202693 folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: - assetBundleVariant: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/touch/index.js.meta b/Runtime/wechat-default/unity-sdk/touch/index.js.meta index 1813211d..1499e77e 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: ef9680c58f27a638fb593e6ff6cd2256 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: cbdff5f60eb12bfb200a087ef58643c5 + 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 d3186a6a..1e40631e 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: d5871334a5d569c8f1f8f3e19c704b52 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 2596c0488898716e663b53f2388794e1 + 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 d566fc95..1af34de1 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: c93e9a91cde08affcbf574ca2b2e1f0f -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: c85bd3911706cdf6bdc197f5e706b7de + 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 b6d91355..42754875 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: fe7212104a02c018dd4bd9355a286684 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 9879d49ac39b66c055b9adc76240ea71 + 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 f3b5a5ad..e7a9b49c 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: c1977d419dd5e47e00fdf81a3e54dfa8 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: e10596f0494150830bbc6f040b318f98 + 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 d24b88d7..b7e2db44 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: b46a8e21032c60d5bc9ed8eff340abde -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 1b9a47bbf76e546fd35965ad89fd8840 + 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 a495f164..4b567da2 100644 --- a/Runtime/wechat-default/unity-sdk/video.meta +++ b/Runtime/wechat-default/unity-sdk/video.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: d0261b42af150413d82528aef2891231 +guid: 51ad693aeba1859dbd45a22eb6c0eeff folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: - assetBundleVariant: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/video/index.js b/Runtime/wechat-default/unity-sdk/video/index.js index 70041d90..6ab56dd1 100644 --- a/Runtime/wechat-default/unity-sdk/video/index.js +++ b/Runtime/wechat-default/unity-sdk/video/index.js @@ -174,6 +174,12 @@ function _JS_Video_Create(url) { function _JS_Video_Destroy(video) { debugLog('_JS_Video_Destroy', video); videoInstances[video].destroy(); + const Module = GameGlobal.manager.gameInstance.Module; + const { GL } = Module; + const gl = GL.currentContext.GLctx; + if (!isWebVideo && gl.emscriptenGLX && Module._glxVideoDestroy) { + Module._glxVideoDestroy(video); + } delete videoInstances[video]; } function _JS_Video_Duration(video) { @@ -378,7 +384,29 @@ function _JS_Video_UpdateToTexture(video, tex) { if (!FrameworkData) { return false; } + const Module = GameGlobal.manager.gameInstance.Module; const { GL, GLctx } = FrameworkData; + const gl = GL.currentContext.GLctx; + + if (!isWebVideo && Module._glxVideoUpdateToTexture && gl.emscriptenGLX) { + const data = v.frameData?.data; + const source = supportVideoFrame ? data : new Uint8ClampedArray(data); + const byteLength = supportVideoFrame ? 0 : source.byteLength; + let sourceIdOrPtr; + if (supportVideoFrame) { + sourceIdOrPtr = source.__uid; + } + else { + sourceIdOrPtr = Module._glxGetVideoTempBuffer(video, byteLength); + if (sourceIdOrPtr) { + Module.HEAPU8.set(source, sourceIdOrPtr); + } + } + + Module._glxVideoUpdateToTexture(v, supportVideoFrame, tex, v.videoWidth, v.videoHeight, sourceIdOrPtr); + return true; + } + GLctx.pixelStorei(GLctx.UNPACK_FLIP_Y_WEBGL, true); diff --git a/Runtime/wechat-default/unity-sdk/video/index.js.meta b/Runtime/wechat-default/unity-sdk/video/index.js.meta index f142925b..25d3f4cf 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: d3c7bcd34aa9d11f0108e37f467730ce -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: da45638fcc5622fa5bb03fdbf6686931 + 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 27b8e80c..a2bd03e0 100644 --- a/Runtime/wechat-default/wasmcode.meta +++ b/Runtime/wechat-default/wasmcode.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 6283887f7b9c74afa814e350f0c58bbb +guid: b3db97bcf03cc5503c0b30110e879fe9 folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: - assetBundleVariant: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/wasmcode/game.js.meta b/Runtime/wechat-default/wasmcode/game.js.meta index f15a2a3c..fdb34b2b 100644 --- a/Runtime/wechat-default/wasmcode/game.js.meta +++ b/Runtime/wechat-default/wasmcode/game.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 2f438656a7ab1dd77a12df8438a158aa -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: e57ea9569a157a53bc3c955d1840e434 + 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 152bb481..d439e1ee 100644 --- a/Runtime/wechat-default/weapp-adapter.js.meta +++ b/Runtime/wechat-default/weapp-adapter.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: ad44215115b96ef428f8315e7a77ede3 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 0e34f1aa2c7f36dd52fedfeeee428a07 + 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 b841047c..e6fcb92b 100644 --- a/Runtime/wechat-default/workers.meta +++ b/Runtime/wechat-default/workers.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 61c46cc089fd7494ca91acd91412140f +guid: 665249c1965a9d75735a01298c73d014 folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: - assetBundleVariant: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/workers/response.meta b/Runtime/wechat-default/workers/response.meta index a38943ce..0cd4d849 100644 --- a/Runtime/wechat-default/workers/response.meta +++ b/Runtime/wechat-default/workers/response.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: fe36eb34977514f4d95224b0d528baf9 +guid: fc243a67ccc077fa2710fdaae7d379d4 folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: - assetBundleVariant: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/workers/response/index.js.meta b/Runtime/wechat-default/workers/response/index.js.meta index 1c6494ec..60b019fe 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: 0f46bddfa484d2494b7bfc9cdacd10f6 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: d4f1f580b4b6aaa1b7c5277b9c5da146 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/WebGLTemplates/WXTemplate/index.html b/WebGLTemplates/WXTemplate/index.html index c0ac2da0..180d4b81 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 3c6925cc..c183a6d9 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 1f2a2bad..09c3ae63 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() {},