diff --git a/Editor/Playable/WXPlayableConvertCore.cs b/Editor/Playable/WXPlayableConvertCore.cs index 0adcf9a50..673f8716c 100644 --- a/Editor/Playable/WXPlayableConvertCore.cs +++ b/Editor/Playable/WXPlayableConvertCore.cs @@ -5,134 +5,134 @@ using UnityEngine; namespace WeChatWASM { - public class WXPlayableConvertCore - { - static WXPlayableConvertCore() { } - public static WXPlayableEditorScriptObject config => UnityUtil.GetPlayableEditorConf(); - - public static WXConvertCore.WXExportError DoExport(bool buildWebGL = true) + public class WXPlayableConvertCore { - WXConvertCore.isPlayableBuild = true; - // var preCheckResult = WXConvertCore.PreCheck(); - // if (preCheckResult != WXConvertCore.WXExportError.SUCCEED) - // { - // WXConvertCore.isPlayableBuild = false; - // return preCheckResult; - // } - // WXConvertCore.PreInit(); - var exportResult = WXConvertCore.DoExport(); + static WXPlayableConvertCore() { } + public static WXPlayableEditorScriptObject config => UnityUtil.GetPlayableEditorConf(); - WXConvertCore.isPlayableBuild = false; - return exportResult; - } - - public static WXEditorScriptObject GetFakeScriptObject() - { - return SetDefaultProperties(ConvertPlayableConfigToCommon(config)); - } - - public static WXEditorScriptObject ConvertPlayableConfigToCommon( - WXPlayableEditorScriptObject source, - WXEditorScriptObject target = null) - { - // 创建或使用现有的目标实例 - var newTarget = target ?? ScriptableObject.CreateInstance(); - - // 使用序列化方式深度拷贝公共字段 - var so = new SerializedObject(newTarget); - - // 遍历源对象的所有字段 - var sourceType = source.GetType(); - foreach (var sourceField in sourceType.GetFields( - System.Reflection.BindingFlags.Public | - System.Reflection.BindingFlags.Instance | - System.Reflection.BindingFlags.NonPublic)) - { - // 跳过readonly字段 - if (sourceField.IsInitOnly) continue; - - // 查找目标对象中的对应字段 - var targetField = typeof(WXEditorScriptObject).GetField( - sourceField.Name, - System.Reflection.BindingFlags.Public | - System.Reflection.BindingFlags.Instance | - System.Reflection.BindingFlags.NonPublic); - - // if (targetField != null && !targetField.FieldType.IsValueType && !targetField.FieldType.IsEnum) - // { - // // // 复制字段值 - // // var value = sourceField.GetValue(source); - // // targetField.SetValue(newTarget, value); - // // 递归复制子对象属性 - // var subObj = targetField.GetValue(newTarget) ?? Activator.CreateInstance(targetField.FieldType); - // CopySubObjectProperties(value, subObj); - // targetField.SetValue(newTarget, subObj); - // } - - // if (targetField != null && - // (targetField.FieldType.IsAssignableFrom(sourceField.FieldType) || - // (targetField.FieldType.IsValueType && sourceField.FieldType.IsValueType && - // targetField.FieldType == sourceField.FieldType))) - // { - // 复制字段值 - var value = sourceField.GetValue(source); - // 特殊处理嵌套对象类型的字段 - if (value != null && !targetField.FieldType.IsValueType && !targetField.FieldType.IsEnum) - { - // 递归复制子对象属性 - var subObj = targetField.GetValue(newTarget) ?? Activator.CreateInstance(targetField.FieldType); - CopySubObjectProperties(value, subObj); - targetField.SetValue(newTarget, subObj); - } - else - { - targetField.SetValue(newTarget, value); - } - // } - } - - // 应用修改到序列化对象 - so.ApplyModifiedProperties(); - return newTarget; - } - - private static void CopySubObjectProperties(object source, object target) - { - var sourceType = source.GetType(); - var targetType = target.GetType(); - - foreach (var sourceField in sourceType.GetFields( - System.Reflection.BindingFlags.Public | - System.Reflection.BindingFlags.Instance | - System.Reflection.BindingFlags.NonPublic)) + public static WXConvertCore.WXExportError DoExport(bool buildWebGL = true) { - if (sourceField.IsInitOnly) continue; + WXConvertCore.isPlayableBuild = true; + // var preCheckResult = WXConvertCore.PreCheck(); + // if (preCheckResult != WXConvertCore.WXExportError.SUCCEED) + // { + // WXConvertCore.isPlayableBuild = false; + // return preCheckResult; + // } + // WXConvertCore.PreInit(); + var exportResult = WXConvertCore.DoExport(); - var targetField = targetType.GetField( - sourceField.Name, + WXConvertCore.isPlayableBuild = false; + return exportResult; + } + + public static WXEditorScriptObject GetFakeScriptObject() + { + return SetDefaultProperties(ConvertPlayableConfigToCommon(config)); + } + + public static WXEditorScriptObject ConvertPlayableConfigToCommon( + WXPlayableEditorScriptObject source, + WXEditorScriptObject target = null) + { + // 创建或使用现有的目标实例 + var newTarget = target ?? ScriptableObject.CreateInstance(); + + // 使用序列化方式深度拷贝公共字段 + var so = new SerializedObject(newTarget); + + // 遍历源对象的所有字段 + var sourceType = source.GetType(); + foreach (var sourceField in sourceType.GetFields( System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance | - System.Reflection.BindingFlags.NonPublic); - - if (targetField != null && - (targetField.FieldType.IsAssignableFrom(sourceField.FieldType) || - (targetField.FieldType.IsValueType && sourceField.FieldType.IsValueType && - targetField.FieldType == sourceField.FieldType))) + System.Reflection.BindingFlags.NonPublic)) { + // 跳过readonly字段 + if (sourceField.IsInitOnly) continue; + + // 查找目标对象中的对应字段 + var targetField = typeof(WXEditorScriptObject).GetField( + sourceField.Name, + System.Reflection.BindingFlags.Public | + System.Reflection.BindingFlags.Instance | + System.Reflection.BindingFlags.NonPublic); + + // if (targetField != null && !targetField.FieldType.IsValueType && !targetField.FieldType.IsEnum) + // { + // // // 复制字段值 + // // var value = sourceField.GetValue(source); + // // targetField.SetValue(newTarget, value); + // // 递归复制子对象属性 + // var subObj = targetField.GetValue(newTarget) ?? Activator.CreateInstance(targetField.FieldType); + // CopySubObjectProperties(value, subObj); + // targetField.SetValue(newTarget, subObj); + // } + + // if (targetField != null && + // (targetField.FieldType.IsAssignableFrom(sourceField.FieldType) || + // (targetField.FieldType.IsValueType && sourceField.FieldType.IsValueType && + // targetField.FieldType == sourceField.FieldType))) + // { + // 复制字段值 var value = sourceField.GetValue(source); - targetField.SetValue(target, value); + // 特殊处理嵌套对象类型的字段 + if (value != null && !targetField.FieldType.IsValueType && !targetField.FieldType.IsEnum) + { + // 递归复制子对象属性 + var subObj = targetField.GetValue(newTarget) ?? Activator.CreateInstance(targetField.FieldType); + CopySubObjectProperties(value, subObj); + targetField.SetValue(newTarget, subObj); + } + else + { + targetField.SetValue(newTarget, value); + } + // } + } + + // 应用修改到序列化对象 + so.ApplyModifiedProperties(); + return newTarget; + } + + private static void CopySubObjectProperties(object source, object target) + { + var sourceType = source.GetType(); + var targetType = target.GetType(); + + foreach (var sourceField in sourceType.GetFields( + System.Reflection.BindingFlags.Public | + System.Reflection.BindingFlags.Instance | + System.Reflection.BindingFlags.NonPublic)) + { + if (sourceField.IsInitOnly) continue; + + var targetField = targetType.GetField( + sourceField.Name, + System.Reflection.BindingFlags.Public | + System.Reflection.BindingFlags.Instance | + System.Reflection.BindingFlags.NonPublic); + + if (targetField != null && + (targetField.FieldType.IsAssignableFrom(sourceField.FieldType) || + (targetField.FieldType.IsValueType && sourceField.FieldType.IsValueType && + targetField.FieldType == sourceField.FieldType))) + { + var value = sourceField.GetValue(source); + targetField.SetValue(target, value); + } } } - } - public static WXEditorScriptObject SetDefaultProperties(WXEditorScriptObject target) - { - target.ProjectConf.CDN = ""; - target.ProjectConf.assetLoadType = 1; - target.ProjectConf.compressDataPackage = true; + public static WXEditorScriptObject SetDefaultProperties(WXEditorScriptObject target) + { + target.ProjectConf.CDN = ""; + target.ProjectConf.assetLoadType = 1; + target.ProjectConf.compressDataPackage = true; - target.CompileOptions.showMonitorSuggestModal = false; - return target; + target.CompileOptions.showMonitorSuggestModal = false; + return target; + } } - } } \ No newline at end of file diff --git a/Editor/Playable/WXPlayableEditorSettingHelper.cs b/Editor/Playable/WXPlayableEditorSettingHelper.cs index a56cd34bb..390e64623 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 07bbcb259..604d6c70f 100644 --- a/Editor/WXConvertCore.cs +++ b/Editor/WXConvertCore.cs @@ -120,7 +120,8 @@ namespace WeChatWASM CheckBuildTarget(); Init(); // 可能有顺序要求?如果没要求,可挪到此函数外 - if (!isPlayableBuild) { + if (!isPlayableBuild) + { ProcessWxPerfBinaries(); } // iOS metal 的相关特性 @@ -410,7 +411,7 @@ namespace WeChatWASM return true; } - private static void ProcessWxiOSMetalBinaries() + private static void ProcessWxiOSMetalBinaries() { string[] glLibs; string DS = WXAssetsTextTools.DS; @@ -434,11 +435,11 @@ namespace WeChatWASM for (int i = 0; i < glLibs.Length; i++) { var importer = AssetImporter.GetAtPath(glLibs[i]) as PluginImporter; - #if PLATFORM_WEIXINMINIGAME +#if PLATFORM_WEIXINMINIGAME importer.SetCompatibleWithPlatform(BuildTarget.WeixinMiniGame, config.CompileOptions.enableiOSMetal); - #else - importer.SetCompatibleWithPlatform(BuildTarget.WebGL, config.CompileOptions.enableiOSMetal); - #endif +#else + importer.SetCompatibleWithPlatform(BuildTarget.WebGL, config.CompileOptions.enableiOSMetal); +#endif // importer.SaveAndReimport(); SetPluginCompatibilityByModifyingMetadataFile(glLibs[i], config.CompileOptions.enableiOSMetal); } @@ -577,7 +578,7 @@ namespace WeChatWASM } else { - PlayerSettings.SetGraphicsAPIs(BuildTarget.WeixinMiniGame, new GraphicsDeviceType[] { GraphicsDeviceType.Metal }); + PlayerSettings.SetGraphicsAPIs(BuildTarget.WeixinMiniGame, new GraphicsDeviceType[] { GraphicsDeviceType.Metal, GraphicsDeviceType.OpenGLES2 }); } } else @@ -1254,7 +1255,8 @@ namespace WeChatWASM public static void convertDataPackageJS() { - if (!isPlayableBuild) { + if (!isPlayableBuild) + { checkNeedRmovePackageParallelPreload(); } @@ -1377,8 +1379,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 @@ -1517,7 +1518,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; @@ -1710,7 +1711,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); @@ -2012,11 +2014,14 @@ namespace WeChatWASM config.CompileOptions.enablePerfAnalysis ? "true" : "false", config.ProjectConf.MemorySize.ToString(), config.SDKOptions.disableMultiTouch ? "true" : "false", + // Perfstream,暂时设为false + "false" }); List replaceList = new List(replaceArrayList); List files = new List { "game.js", "game.json", "project.config.json", "unity-namespace.js", "check-version.js", "unity-sdk/font/index.js" }; - if (isPlayableBuild) { + if (isPlayableBuild) + { files = new List { "game.js", "game.json", "project.config.json", "unity-namespace.js", "check-version.js" }; } diff --git a/Editor/WXPluginVersion.cs b/Editor/WXPluginVersion.cs index 74c6e5670..8fa18b64c 100644 --- a/Editor/WXPluginVersion.cs +++ b/Editor/WXPluginVersion.cs @@ -2,7 +2,7 @@ namespace WeChatWASM { public class WXPluginVersion { - public static string pluginVersion = "202507090449"; // 这一行不要改他,导出的时候会自动替换 + public static string pluginVersion = "202507310303"; // 这一行不要改他,导出的时候会自动替换 } public class WXPluginConf diff --git a/Editor/wx-editor.dll b/Editor/wx-editor.dll index 8eb431e25..a670f5cfe 100644 Binary files a/Editor/wx-editor.dll and b/Editor/wx-editor.dll differ diff --git a/Editor/wx-editor.xml.meta b/Editor/wx-editor.xml.meta index bd7f3a347..5cbf4efdb 100644 --- a/Editor/wx-editor.xml.meta +++ b/Editor/wx-editor.xml.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 683bd2d2ee0a44061b7f04d6af659e86 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: +guid: 96c108a9abd46465b4f94d989c127ff4 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/Plugins/SDK-Call-JS-Old.jslib b/Runtime/Plugins/SDK-Call-JS-Old.jslib index 6d658038c..09d9ec303 100755 --- a/Runtime/Plugins/SDK-Call-JS-Old.jslib +++ b/Runtime/Plugins/SDK-Call-JS-Old.jslib @@ -416,11 +416,11 @@ mergeInto(LibraryManager.library, { WXVideoPlay: function(id) { window.WXWASMSDK.WXVideoPlay(_WXPointer_stringify_adaptor(id)); }, - WXVideoAddListener: function(id,key) { + WXVideoAddListener: function(id, key) { window.WXWASMSDK.WXVideoAddListener(_WXPointer_stringify_adaptor(id), _WXPointer_stringify_adaptor(key)); }, - WXVideoDestroy: function(id) { - window.WXWASMSDK.WXVideoDestroy(_WXPointer_stringify_adaptor(id)); + WXVideoDestroy: function(id, isLast) { + window.WXWASMSDK.WXVideoDestroy(_WXPointer_stringify_adaptor(id), isLast); }, WXVideoExitFullScreen: function(id) { window.WXWASMSDK.WXVideoExitFullScreen(_WXPointer_stringify_adaptor(id)); diff --git a/Runtime/Plugins/SDK-Call-JS.jslib b/Runtime/Plugins/SDK-Call-JS.jslib index 3256e5b87..7c5f0a0bb 100644 --- a/Runtime/Plugins/SDK-Call-JS.jslib +++ b/Runtime/Plugins/SDK-Call-JS.jslib @@ -115,8 +115,8 @@ WX_SyncFunction_tnn: function(functionName, returnType, param1, param2){ stringToUTF8((res || ''), buffer, bufferSize); return buffer; }, -WX_ClassOneWayFunction:function(functionName, returnType, successType, failType, completeType, conf) { - var res = window.WXWASMSDK.WX_ClassOneWayFunction(_WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(returnType), _WXPointer_stringify_adaptor(successType), _WXPointer_stringify_adaptor(failType), _WXPointer_stringify_adaptor(completeType), _WXPointer_stringify_adaptor(conf)); +WX_ClassConstructor:function(functionName, returnType, successType, failType, completeType, conf) { + var res = window.WXWASMSDK.WX_ClassConstructor(_WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(returnType), _WXPointer_stringify_adaptor(successType), _WXPointer_stringify_adaptor(failType), _WXPointer_stringify_adaptor(completeType), _WXPointer_stringify_adaptor(conf)); var bufferSize = lengthBytesUTF8(res || '') + 1; var buffer = _malloc(bufferSize); stringToUTF8((res || ''), buffer, bufferSize); @@ -156,5 +156,7 @@ WX_ClassOneWayNoFunction_vt: function(className, functionName, id, param1) { }, WX_ClassOneWayNoFunction_vn: function(className, functionName, id, param1) { window.WXWASMSDK.WX_ClassOneWayNoFunction_vs(_WXPointer_stringify_adaptor(className), _WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(id), param1); +},WX_ClassOneWayFunction: function(className, id, functionName, successType, failType, completeType, conf, callbackId, usePromise) { + window.WXWASMSDK.WX_ClassOneWayFunction(_WXPointer_stringify_adaptor(className), _WXPointer_stringify_adaptor(id), _WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(successType), _WXPointer_stringify_adaptor(failType), _WXPointer_stringify_adaptor(completeType), _WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId), usePromise); }, }) \ No newline at end of file diff --git a/Runtime/Plugins/WxGameDataMonitor.jslib b/Runtime/Plugins/WxGameDataMonitor.jslib new file mode 100644 index 000000000..f9b504c7f --- /dev/null +++ b/Runtime/Plugins/WxGameDataMonitor.jslib @@ -0,0 +1,55 @@ +mergeInto(LibraryManager.library, { + JSStartGameDataMonitor: function() { + console.log("call JSStartGameDataMonitor \n"); + + if (typeof GameGlobal.manager.getGameDataMonitor === 'function') + { + GameGlobal.manager.getGameDataMonitor().start(); + } + else + { + console.log("GameGlobal.manager.getGameDataMonitor is not a function \n"); + } + }, + JSReportUnityProfileData: function( + targetFrameRate, // fps. + monoHeapReserved, monoHeapUsed, nativeReserved, nativeUnused, nativeAllocated, // profiler. + setPassCalls, drawCalls, vertices, trianglesCount // render. + ) { + console.log("call JSReportUnityProfileData \n"); + let report_data = { + timestamp: new Date().getTime(), + fps: { + targetFrameRate: targetFrameRate, + avgEXFrameTime: _WXGetEXFrameTime(), + }, + profiler: { + monoHeapReserved: monoHeapReserved, + monoHeapUsed: monoHeapUsed, + nativeReserved: nativeReserved, + nativeUnused: nativeUnused, + nativeAllocated: nativeAllocated, + }, + render: { + setPassCalls: setPassCalls, + drawCalls: drawCalls, + vertices: vertices, + trianglesCount: trianglesCount, + }, + webassembly: { + totalHeapMemory: _WXGetTotalMemorySize(), + dynamicMemory: _WXGetDynamicMemorySize(), + usedHeapMemory: _WXGetUsedMemorySize(), + unAllocatedMemory: _WXGetUnAllocatedMemorySize(), + }, + assetbundle: { + numberInMemory: _WXGetBundleNumberInMemory(), + numberOnDisk: _WXGetBundleNumberOnDisk(), + sizeInMemory: _WXGetBundleSizeInMemory(), + sizeOnDisk: _WXGetBundleSizeOnDisk(), + } + } + + GameGlobal.manager.getGameDataMonitor().reportUnityProfileData(report_data) + }, +}); \ No newline at end of file diff --git a/Runtime/Plugins/WxGameDataMonitor.jslib.meta b/Runtime/Plugins/WxGameDataMonitor.jslib.meta new file mode 100644 index 000000000..a0a033d4b --- /dev/null +++ b/Runtime/Plugins/WxGameDataMonitor.jslib.meta @@ -0,0 +1,79 @@ +fileFormatVersion: 2 +guid: 63a9d4fa9c3846e3704029822b94973f +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + : Any + second: + enabled: 0 + settings: + Exclude Editor: 1 + Exclude Linux64: 1 + Exclude OSXUniversal: 1 + Exclude WeixinMiniGame: 1 + Exclude Win: 1 + Exclude Win64: 1 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Facebook: WebGL + second: + enabled: 0 + settings: {} + - first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: x86 + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: x86_64 + - first: + WebGL: WebGL + second: + enabled: 1 + settings: {} + - first: + WeixinMiniGame: WeixinMiniGame + second: + enabled: 1 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Plugins/wx-perf.dll b/Runtime/Plugins/wx-perf.dll index 710630312..fa941b5a3 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 03a331ba2..f714cc478 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 dc618a810..2f1482e27 100644 --- a/Runtime/Plugins/wx-runtime-editor.xml +++ b/Runtime/Plugins/wx-runtime-editor.xml @@ -1749,116 +1749,126 @@ 视频的总时长,单位为秒 - - - 视频的左上角横坐标 - - - - - 视频的左上角纵坐标 - - - - - 视频的宽度 - - - - - 视频的高度 - - - + 视频的资源地址 - - - 视频的封面 - - - - - 视频的初始播放位置,单位为 s 秒 - - - - - 视频的播放速率,有效值有 0.5、0.8、1.0、1.25、1.5 - - - - - 视频是否为直播 - - - - - 视频的缩放模式 - - - - - 视频是否显示控件 - - - - - 是否显示视频底部进度条 - - - - - 是否显示控制栏的进度条 - - - - - 视频背景颜色 - - - + 视频是否自动播放 - + - 视频是否是否循环播放 + 视频背景颜色 - + - 视频是否禁音播放 + 视频是否显示控件 - - - 视频是否遵循系统静音开关设置(仅iOS) - - - - - 是否启用手势控制播放进度 - - - + 是否开启双击播放的手势 - + + + 是否启用手势控制播放进度 + + + + + 视频的高度 + + + + + 视频的初始播放位置,单位为 s 秒 + + + + + 视频是否为直播 + + + + + 视频是否是否循环播放 + + + + + 视频是否禁音播放 + + + + + 视频是否遵循系统静音开关设置(仅iOS) + + + + + 视频的缩放模式 + + + + + 视频的播放速率,有效值有 0.5、0.8、1.0、1.25、1.5 + + + + + 视频的封面 + + + 是否显示视频中央的播放按钮 - + + + 是否显示视频底部进度条 + + + + + 是否显示控制栏的进度条 + + + + + 视频的宽度 + + + + + 视频的左上角横坐标 + + + + + 视频的左上角纵坐标 + + + 视频是否显示在游戏画布之下 + + + 视频跳转后自动暂停播放 + + + + + 视频跳转原生页后自动暂停播放 + + 开发版 @@ -3109,6 +3119,120 @@  是否结束 + + + 从不同渠道获得的OPENLINK字符串 + + + + + 选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填 + + + + + 从不同渠道获得的OPENLINK字符串 + + + + + 选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填 + + + + 错误信息 + + | 错误码 | 错误信息 | 说明 | + | - | - | - | + | 1001 | | 参数错误 | + | -1 | | 支付失败 | + | -2 | | 支付取消 | + | -4 | | 风控拦截 | + | -5 | | 开通签约结果未知 | + | -15001 | | 参数错误,具体原因见err_msg | + | -15002 | | outTradeNo重复使用,请换新单号重试 | + | -15003 | | 系统错误 | + | -15004 | | currencyType错误,目前只能填CNY | + | -15005 | | 用户态签名signature错误 | + | -15006 | | 支付签名paySig错误 | + | -15007 | | session_key过期 | + | -15008 | | 二级商户进件未完成 | + | -15009 | | 代币未发布 | + | -15010 | | 道具productId未发布 | + | -15011 | | 现网版本的env只能是0,不能填1(沙盒环境) | + | -15012 | | 调用米大师失败导致关单,请换新单号重试 | + | -15013 | | goodsPrice道具价格错误 | + | -15014 | | 道具/代币发布未生效,禁止下单,大概10分钟后生效 | + | -15016 | | signData格式有问题 | + | -15017 | | 此商家涉嫌违规,收款功能已被限制,暂无法支付。商家可以登录微信商户平台/微信支付商家助手小程序查看原因和解决方案 | + | -15018 | | 代币或者道具productId审核不通过 | + | -15019 | | 调微信报商户受限,商家可以登录微信商户平台/微信支付商家助手小程序查看原因和解决方案 | + | -15020 | | 操作过快,请稍候再试 | + | -15021 | | 小程序被限频交易 | + + + 错误码 + + | 错误码 | 错误信息 | 说明 | + | - | - | - | + | 1001 | | 参数错误 | + | -1 | | 支付失败 | + | -2 | | 支付取消 | + | -4 | | 风控拦截 | + | -5 | | 开通签约结果未知 | + | -15001 | | 参数错误,具体原因见err_msg | + | -15002 | | outTradeNo重复使用,请换新单号重试 | + | -15003 | | 系统错误 | + | -15004 | | currencyType错误,目前只能填CNY | + | -15005 | | 用户态签名signature错误 | + | -15006 | | 支付签名paySig错误 | + | -15007 | | session_key过期 | + | -15008 | | 二级商户进件未完成 | + | -15009 | | 代币未发布 | + | -15010 | | 道具productId未发布 | + | -15011 | | 现网版本的env只能是0,不能填1(沙盒环境) | + | -15012 | | 调用米大师失败导致关单,请换新单号重试 | + | -15013 | | goodsPrice道具价格错误 | + | -15014 | | 道具/代币发布未生效,禁止下单,大概10分钟后生效 | + | -15016 | | signData格式有问题 | + | -15017 | | 此商家涉嫌违规,收款功能已被限制,暂无法支付。商家可以登录微信商户平台/微信支付商家助手小程序查看原因和解决方案 | + | -15018 | | 代币或者道具productId审核不通过 | + | -15019 | | 调微信报商户受限,商家可以登录微信商户平台/微信支付商家助手小程序查看原因和解决方案 | + | -15020 | | 操作过快,请稍候再试 | + | -15021 | | 小程序被限频交易 | + + + 错误码 + + + 错误信息 + + + 调用成功信息 + + + + 支付的类型, 不同的支付类型有各自额外要传的附加参数 + 可选值: + - 'short_series_goods': 道具直购; + - 'short_series_coin': 代币充值; + + + + + 支付签名, 详见[《签名详解》](https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/virtual-payment.html) + + + + + 具体支付参数见signData, 该参数需以string形式传递, 例如signData: '{"offerId":"123","buyQuantity":1,"env":0,"currencyType":"CNY","productId":"testproductId","goodsPrice":10,"outTradeNo":"xxxxxx","attach":"testdata"}' + + + + + 用户态签名, 详见[《签名详解》](https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/virtual-payment.html) + + 一个表示控制器设备上存在的坐标轴的数组 (比如控制器摇杆)。 @@ -4103,26 +4227,6 @@ 取值为0/1,取值为0表示会把 `App`、`Page` 的生命周期函数和 `wx` 命名空间下的函数调用写入日志,取值为1则不会。默认值是 0 - - - 从不同渠道获得的OPENLINK字符串 - - - - - 选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填 - - - - - 从不同渠道获得的OPENLINK字符串 - - - - - 选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填 - - 是否有新版本 @@ -8509,22 +8613,44 @@ 显示用户信息按钮 + + + 微信小游戏视频组件 + + + + + 视频实例字典 (内部使用,请不要访问) + + + + + 视频实例ID + + + + + 视频创建参数 + + + + + 创建视频实例 + + 实例ID + 创建参数 + + + + 初始化属性 + + 内部函数,请不要调用 - - - 视频的资源地址 - - - - - 视频的封面 - - 视频的左上角横坐标 @@ -8545,9 +8671,69 @@ 视频的高度 - + - Gets a value indicating whether 是否正在播放 + 视频的资源地址 + + + + + 视频的封面 + + + + + 是否为直播 + + + + + 当视频大小与 video 容器大小不一致时,视频的表现形式 + + + + + 是否显示默认播放控件(播放/暂停按钮、播放进度、时间) + + + + + 是否显示播放进度 + + + + + 在非全屏模式下,是否开启亮度和音量调节手势 + + + + + 视频的背景色 + + + + + 是否遵循系统静音开关 + + + + + 是否开启控制进度的手势 + + + + + 是否开启播放手势 + + + + + 是否显示视频中间的播放按钮 + + + + + 销毁当前实例 @@ -8555,44 +8741,31 @@ 播放视频 - + - 监听视频播放事件 + 暂停 - + - 取消监听视频播放事件,action 为空表示移除全部事件监听 + 停止视频 - + - 监听视频播放到末尾事件 + 视频跳转 + 视频跳转到指定位置,单位为 s 秒 - + - 取消监听视频播放到末尾事件 + 视频全屏 + 设置全屏时视频的方向 0: 正常竖向, 90: 屏幕逆时针90度 . -90: 屏幕顺时针90度 - + - 监听视频错误事件 - - - - - 取消监听视频错误事件,action 为空表示移除全部事件监听 - - - - - 监听视频暂停事件 - - - - - 取消监听视频暂停事件,action 为空表示移除全部事件监听 + 视频退出全屏 @@ -8605,36 +8778,45 @@ 取消监听视频由于需要缓冲下一帧而停止时触发,action 为空表示移除全部事件监听 - + - 销毁当前实例 + 监听视频下载(缓冲)事件 + + + + + + 取消监听视频下载(缓冲)事件 ,action 为空表示移除全部事件监听 - + - 视频退出全屏 + 监听视频播放事件 - + - 暂停 + 取消监听视频播放事件,action 为空表示移除全部事件监听 - + - 视频全屏 + 监听视频暂停事件 - 设置全屏时视频的方向 0: 正常竖向, 90: 屏幕逆时针90度 . -90: 屏幕顺时针90度 - + - 视频跳转 + 取消监听视频暂停事件,action 为空表示移除全部事件监听 - 视频跳转到指定位置,单位为 s 秒 - + - 停止视频 + 监听视频播放到末尾事件 + + + + + 取消监听视频播放到末尾事件 @@ -8648,15 +8830,14 @@ 取消监听视频播放进度更新事件,action 为空表示移除全部事件监听 - + - 监听视频下载(缓冲)事件 + 监听视频错误事件 - - + - 取消监听视频下载(缓冲)事件 ,action 为空表示移除全部事件监听 + 取消监听视频错误事件,action 为空表示移除全部事件监听 diff --git a/Runtime/Plugins/wx-runtime-editor.xml.meta b/Runtime/Plugins/wx-runtime-editor.xml.meta index a81656fd7..0dd36dfbf 100644 --- a/Runtime/Plugins/wx-runtime-editor.xml.meta +++ b/Runtime/Plugins/wx-runtime-editor.xml.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 24b29384eaa41428ab813a2114ce2e82 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: +guid: 5f794d9d06efafeebd2a7902e33bf4c4 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/Plugins/wx-runtime.dll b/Runtime/Plugins/wx-runtime.dll index f7c57b386..d20437d67 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 b17742214..482a88a22 100644 --- a/Runtime/Plugins/wx-runtime.xml +++ b/Runtime/Plugins/wx-runtime.xml @@ -1755,116 +1755,126 @@ 视频的总时长,单位为秒 - - - 视频的左上角横坐标 - - - - - 视频的左上角纵坐标 - - - - - 视频的宽度 - - - - - 视频的高度 - - - + 视频的资源地址 - - - 视频的封面 - - - - - 视频的初始播放位置,单位为 s 秒 - - - - - 视频的播放速率,有效值有 0.5、0.8、1.0、1.25、1.5 - - - - - 视频是否为直播 - - - - - 视频的缩放模式 - - - - - 视频是否显示控件 - - - - - 是否显示视频底部进度条 - - - - - 是否显示控制栏的进度条 - - - - - 视频背景颜色 - - - + 视频是否自动播放 - + - 视频是否是否循环播放 + 视频背景颜色 - + - 视频是否禁音播放 + 视频是否显示控件 - - - 视频是否遵循系统静音开关设置(仅iOS) - - - - - 是否启用手势控制播放进度 - - - + 是否开启双击播放的手势 - + + + 是否启用手势控制播放进度 + + + + + 视频的高度 + + + + + 视频的初始播放位置,单位为 s 秒 + + + + + 视频是否为直播 + + + + + 视频是否是否循环播放 + + + + + 视频是否禁音播放 + + + + + 视频是否遵循系统静音开关设置(仅iOS) + + + + + 视频的缩放模式 + + + + + 视频的播放速率,有效值有 0.5、0.8、1.0、1.25、1.5 + + + + + 视频的封面 + + + 是否显示视频中央的播放按钮 - + + + 是否显示视频底部进度条 + + + + + 是否显示控制栏的进度条 + + + + + 视频的宽度 + + + + + 视频的左上角横坐标 + + + + + 视频的左上角纵坐标 + + + 视频是否显示在游戏画布之下 + + + 视频跳转后自动暂停播放 + + + + + 视频跳转原生页后自动暂停播放 + + 开发版 @@ -3115,6 +3125,120 @@  是否结束 + + + 从不同渠道获得的OPENLINK字符串 + + + + + 选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填 + + + + + 从不同渠道获得的OPENLINK字符串 + + + + + 选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填 + + + + 错误信息 + + | 错误码 | 错误信息 | 说明 | + | - | - | - | + | 1001 | | 参数错误 | + | -1 | | 支付失败 | + | -2 | | 支付取消 | + | -4 | | 风控拦截 | + | -5 | | 开通签约结果未知 | + | -15001 | | 参数错误,具体原因见err_msg | + | -15002 | | outTradeNo重复使用,请换新单号重试 | + | -15003 | | 系统错误 | + | -15004 | | currencyType错误,目前只能填CNY | + | -15005 | | 用户态签名signature错误 | + | -15006 | | 支付签名paySig错误 | + | -15007 | | session_key过期 | + | -15008 | | 二级商户进件未完成 | + | -15009 | | 代币未发布 | + | -15010 | | 道具productId未发布 | + | -15011 | | 现网版本的env只能是0,不能填1(沙盒环境) | + | -15012 | | 调用米大师失败导致关单,请换新单号重试 | + | -15013 | | goodsPrice道具价格错误 | + | -15014 | | 道具/代币发布未生效,禁止下单,大概10分钟后生效 | + | -15016 | | signData格式有问题 | + | -15017 | | 此商家涉嫌违规,收款功能已被限制,暂无法支付。商家可以登录微信商户平台/微信支付商家助手小程序查看原因和解决方案 | + | -15018 | | 代币或者道具productId审核不通过 | + | -15019 | | 调微信报商户受限,商家可以登录微信商户平台/微信支付商家助手小程序查看原因和解决方案 | + | -15020 | | 操作过快,请稍候再试 | + | -15021 | | 小程序被限频交易 | + + + 错误码 + + | 错误码 | 错误信息 | 说明 | + | - | - | - | + | 1001 | | 参数错误 | + | -1 | | 支付失败 | + | -2 | | 支付取消 | + | -4 | | 风控拦截 | + | -5 | | 开通签约结果未知 | + | -15001 | | 参数错误,具体原因见err_msg | + | -15002 | | outTradeNo重复使用,请换新单号重试 | + | -15003 | | 系统错误 | + | -15004 | | currencyType错误,目前只能填CNY | + | -15005 | | 用户态签名signature错误 | + | -15006 | | 支付签名paySig错误 | + | -15007 | | session_key过期 | + | -15008 | | 二级商户进件未完成 | + | -15009 | | 代币未发布 | + | -15010 | | 道具productId未发布 | + | -15011 | | 现网版本的env只能是0,不能填1(沙盒环境) | + | -15012 | | 调用米大师失败导致关单,请换新单号重试 | + | -15013 | | goodsPrice道具价格错误 | + | -15014 | | 道具/代币发布未生效,禁止下单,大概10分钟后生效 | + | -15016 | | signData格式有问题 | + | -15017 | | 此商家涉嫌违规,收款功能已被限制,暂无法支付。商家可以登录微信商户平台/微信支付商家助手小程序查看原因和解决方案 | + | -15018 | | 代币或者道具productId审核不通过 | + | -15019 | | 调微信报商户受限,商家可以登录微信商户平台/微信支付商家助手小程序查看原因和解决方案 | + | -15020 | | 操作过快,请稍候再试 | + | -15021 | | 小程序被限频交易 | + + + 错误码 + + + 错误信息 + + + 调用成功信息 + + + + 支付的类型, 不同的支付类型有各自额外要传的附加参数 + 可选值: + - 'short_series_goods': 道具直购; + - 'short_series_coin': 代币充值; + + + + + 支付签名, 详见[《签名详解》](https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/virtual-payment.html) + + + + + 具体支付参数见signData, 该参数需以string形式传递, 例如signData: '{"offerId":"123","buyQuantity":1,"env":0,"currencyType":"CNY","productId":"testproductId","goodsPrice":10,"outTradeNo":"xxxxxx","attach":"testdata"}' + + + + + 用户态签名, 详见[《签名详解》](https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/virtual-payment.html) + + 一个表示控制器设备上存在的坐标轴的数组 (比如控制器摇杆)。 @@ -4109,26 +4233,6 @@ 取值为0/1,取值为0表示会把 `App`、`Page` 的生命周期函数和 `wx` 命名空间下的函数调用写入日志,取值为1则不会。默认值是 0 - - - 从不同渠道获得的OPENLINK字符串 - - - - - 选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填 - - - - - 从不同渠道获得的OPENLINK字符串 - - - - - 选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填 - - 是否有新版本 @@ -8515,22 +8619,44 @@ 显示用户信息按钮 + + + 微信小游戏视频组件 + + + + + 视频实例字典 (内部使用,请不要访问) + + + + + 视频实例ID + + + + + 视频创建参数 + + + + + 创建视频实例 + + 实例ID + 创建参数 + + + + 初始化属性 + + 内部函数,请不要调用 - - - 视频的资源地址 - - - - - 视频的封面 - - 视频的左上角横坐标 @@ -8551,9 +8677,69 @@ 视频的高度 - + - Gets a value indicating whether 是否正在播放 + 视频的资源地址 + + + + + 视频的封面 + + + + + 是否为直播 + + + + + 当视频大小与 video 容器大小不一致时,视频的表现形式 + + + + + 是否显示默认播放控件(播放/暂停按钮、播放进度、时间) + + + + + 是否显示播放进度 + + + + + 在非全屏模式下,是否开启亮度和音量调节手势 + + + + + 视频的背景色 + + + + + 是否遵循系统静音开关 + + + + + 是否开启控制进度的手势 + + + + + 是否开启播放手势 + + + + + 是否显示视频中间的播放按钮 + + + + + 销毁当前实例 @@ -8561,44 +8747,31 @@ 播放视频 - + - 监听视频播放事件 + 暂停 - + - 取消监听视频播放事件,action 为空表示移除全部事件监听 + 停止视频 - + - 监听视频播放到末尾事件 + 视频跳转 + 视频跳转到指定位置,单位为 s 秒 - + - 取消监听视频播放到末尾事件 + 视频全屏 + 设置全屏时视频的方向 0: 正常竖向, 90: 屏幕逆时针90度 . -90: 屏幕顺时针90度 - + - 监听视频错误事件 - - - - - 取消监听视频错误事件,action 为空表示移除全部事件监听 - - - - - 监听视频暂停事件 - - - - - 取消监听视频暂停事件,action 为空表示移除全部事件监听 + 视频退出全屏 @@ -8611,36 +8784,45 @@ 取消监听视频由于需要缓冲下一帧而停止时触发,action 为空表示移除全部事件监听 - + - 销毁当前实例 + 监听视频下载(缓冲)事件 + + + + + + 取消监听视频下载(缓冲)事件 ,action 为空表示移除全部事件监听 - + - 视频退出全屏 + 监听视频播放事件 - + - 暂停 + 取消监听视频播放事件,action 为空表示移除全部事件监听 - + - 视频全屏 + 监听视频暂停事件 - 设置全屏时视频的方向 0: 正常竖向, 90: 屏幕逆时针90度 . -90: 屏幕顺时针90度 - + - 视频跳转 + 取消监听视频暂停事件,action 为空表示移除全部事件监听 - 视频跳转到指定位置,单位为 s 秒 - + - 停止视频 + 监听视频播放到末尾事件 + + + + + 取消监听视频播放到末尾事件 @@ -8654,15 +8836,14 @@ 取消监听视频播放进度更新事件,action 为空表示移除全部事件监听 - + - 监听视频下载(缓冲)事件 + 监听视频错误事件 - - + - 取消监听视频下载(缓冲)事件 ,action 为空表示移除全部事件监听 + 取消监听视频错误事件,action 为空表示移除全部事件监听 diff --git a/Runtime/Plugins/wx-runtime.xml.meta b/Runtime/Plugins/wx-runtime.xml.meta index d5c3184aa..5ac7b27fe 100644 --- a/Runtime/Plugins/wx-runtime.xml.meta +++ b/Runtime/Plugins/wx-runtime.xml.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 39e0805eca2014f3c8e095e963dea76e -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: +guid: 8d43dfce6d8e3e9a4f0cc28b8825de8d +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Runtime/WX.cs b/Runtime/WX.cs index cbb9acb6f..9261cb09f 100644 --- a/Runtime/WX.cs +++ b/Runtime/WX.cs @@ -4036,32 +4036,6 @@ namespace WeChatWASM return WXSDKManagerHandler.Instance.GetLogManager(option); } - /// - /// [[PageManager](https://developers.weixin.qq.com/minigame/dev/api/open-api/openlink/PageManager.html) wx.createPageManager()](https://developers.weixin.qq.com/minigame/dev/api/open-api/openlink/wx.createPageManager.html) - /// 需要基础库: `3.6.7` - /// 小游戏开放页面管理器,用于启动微信内置的各种小游戏活动、功能页面。具体OPENLINK值由不同的能力渠道获得。 - /// **示例代码** - /// ```js - /// const pageManager = wx.createPageManager(); - /// pageManager.load({ - /// openlink: 'xxxxxxx-xxxxxx', // 由不同渠道获得的OPENLINK值 - /// }).then((res) => { - /// // 加载成功,res 可能携带不同活动、功能返回的特殊回包信息(具体请参阅渠道说明) - /// console.log(res); - /// // 加载成功后按需显示 - /// pageManager.show(); - /// }).catch((err) => { - /// // 加载失败,请查阅 err 给出的错误信息 - /// console.error(err); - /// }) - /// ``` - /// - /// - public static WXPageManager CreatePageManager() - { - return WXSDKManagerHandler.Instance.CreatePageManager(); - } - /// /// [[RealtimeLogManager](https://developers.weixin.qq.com/minigame/dev/api/base/debug/RealtimeLogManager.html) wx.getRealtimeLogManager()](https://developers.weixin.qq.com/minigame/dev/api/base/debug/wx.getRealtimeLogManager.html) /// 需要基础库: `2.14.4` diff --git a/Runtime/WXBase.cs b/Runtime/WXBase.cs index 3daf90bc9..5a74542d4 100644 --- a/Runtime/WXBase.cs +++ b/Runtime/WXBase.cs @@ -535,7 +535,7 @@ namespace WeChatWASM /// /// /// - public static WXVideo CreateVideo(WXCreateVideoParam param) + public static WXVideo CreateVideo(CreateVideoOption param) { return WXSDKManagerHandler.Instance.CreateVideo(param); } @@ -1127,6 +1127,41 @@ namespace WeChatWASM WXSDKManagerHandler.Instance.NotifyMiniProgramPlayableStatus(option); } #endregion +#region 虚拟支付 + /// + /// 请求虚拟支付 + /// + public static void RequestVirtualPayment(RequestVirtualPaymentOption option) + { + WXSDKManagerHandler.Instance.RequestVirtualPayment(option); + } +#endregion + + /// + /// [[PageManager](https://developers.weixin.qq.com/minigame/dev/api/open-api/openlink/PageManager.html) wx.createPageManager()](https://developers.weixin.qq.com/minigame/dev/api/open-api/openlink/wx.createPageManager.html) + /// 需要基础库: `3.6.7` + /// 小游戏开放页面管理器,用于启动微信内置的各种小游戏活动、功能页面。具体OPENLINK值由不同的能力渠道获得。 + /// **示例代码** + /// ```js + /// const pageManager = wx.createPageManager(); + /// pageManager.load({ + /// openlink: 'xxxxxxx-xxxxxx', // 由不同渠道获得的OPENLINK值 + /// }).then((res) => { + /// // 加载成功,res 可能携带不同活动、功能返回的特殊回包信息(具体请参阅渠道说明) + /// console.log(res); + /// // 加载成功后按需显示 + /// pageManager.show(); + /// }).catch((err) => { + /// // 加载失败,请查阅 err 给出的错误信息 + /// console.error(err); + /// }) + /// ``` + /// + /// + public static WXPageManager CreatePageManager() + { + return WXSDKManagerHandler.Instance.CreatePageManager(); + } } } #endif diff --git a/Runtime/WXSDKPerf/WXPerfEngine.cs b/Runtime/WXSDKPerf/WXPerfEngine.cs index 88cdd1586..19a1f7cf9 100644 --- a/Runtime/WXSDKPerf/WXPerfEngine.cs +++ b/Runtime/WXSDKPerf/WXPerfEngine.cs @@ -8,6 +8,10 @@ using UnityEngine; using UnityEngine.Scripting; using System.IO; +using Unity.Profiling; +using UnityEngine.Profiling; +using Debug = UnityEngine.Debug; + #if PLATFORM_WEIXINMINIGAME || PLATFORM_WEBGL || UNITY_EDITOR @@ -20,17 +24,17 @@ namespace WXSDKPerf public class WXPerfEngine { #if !UNITY_EDITOR - static WXPerfEngine_Implementation m_PerfEngineImplementation = null; + static WXPerfEngine_Implementation m_PerfEngineImplementation = null; #endif [RuntimeInitializeOnLoadMethod] public static void StartWXPerfEngine() { #if UNITY_EDITOR - return; + return; #else m_PerfEngineImplementation = new WXPerfEngine_Implementation(); - m_PerfEngineImplementation.StartPerfEngine(); + m_PerfEngineImplementation.StartPerfEngine(); #endif } @@ -45,7 +49,7 @@ namespace WXSDKPerf public static void Annotation(string InAnnotationString) { #if UNITY_EDITOR - return; + return; #else // Don't record annotation if we are not recording. if (!IsRecording()) @@ -68,7 +72,7 @@ namespace WXSDKPerf #endif } - + /// /// 检查是否正在录制性能数据 /// @@ -89,14 +93,14 @@ namespace WXSDKPerf #else DateTime timestamp = DateTime.Now; var dateString = timestamp.ToLocalTime().ToString("yyyy-MM-dd_HH-mm-ss", System.Globalization.CultureInfo.InvariantCulture); - var snapshotFileName = $"{dateString}.snap"; + var snapshotFileName = $"{dateString}.snap"; #if UNITY_2018_3_OR_NEWER && !UNITY_2022_2_OR_NEWER - UnityEngine.Profiling.Memory.Experimental.MemoryProfiler.TakeSnapshot(Path.Combine(Application.persistentDataPath, snapshotFileName), + UnityEngine.Profiling.Memory.Experimental.MemoryProfiler.TakeSnapshot(Path.Combine(Application.persistentDataPath, snapshotFileName), WXPerfEngine_Implementation.CaptureSnapshotCallback, (UnityEngine.Profiling.Memory.Experimental.CaptureFlags)31); - + #elif UNITY_2022_2_OR_NEWER - Unity.Profiling.Memory.MemoryProfiler.TakeSnapshot(Path.Combine(Application.persistentDataPath, snapshotFileName), + Unity.Profiling.Memory.MemoryProfiler.TakeSnapshot(Path.Combine(Application.persistentDataPath, snapshotFileName), WXPerfEngine_Implementation.CaptureSnapshotCallback, (Unity.Profiling.Memory.CaptureFlags)31); #endif #endif @@ -109,7 +113,7 @@ namespace WXSDKPerf public static void SetLuaState(IntPtr L) { #if UNITY_EDITOR - return; + return; #else if (m_PerfEngineImplementation == null) { @@ -120,7 +124,7 @@ namespace WXSDKPerf m_PerfEngineImplementation.SetLuaState(L); #endif } - + /// /// 声明自定义性能指标 /// @@ -130,7 +134,7 @@ namespace WXSDKPerf public static void DeclareCustomStatInfo(string inStatName, string inStatCategory, int inStatInterpType = 1) { #if UNITY_EDITOR - return; + return; #else if (m_PerfEngineImplementation == null) { @@ -151,7 +155,7 @@ namespace WXSDKPerf public static void SetCustomStatValue(string inStatName, float inValue) { #if UNITY_EDITOR - return; + return; #else if (m_PerfEngineImplementation == null) { @@ -171,7 +175,7 @@ namespace WXSDKPerf public static void AddCustomStatInfoBy(string inStatName, float inValue) { #if UNITY_EDITOR - return; + return; #else if (m_PerfEngineImplementation == null) { @@ -179,9 +183,9 @@ namespace WXSDKPerf return; } - m_PerfEngineImplementation.AddCustomStatInfoBy(inStatName, inValue); + m_PerfEngineImplementation.AddCustomStatInfoBy(inStatName, inValue); #endif - + } @@ -195,11 +199,11 @@ namespace WXSDKPerf /// 是否启用资源捕获 /// 是否启用Lua内存监控 /// 是否启用Lua函数内存跟踪 - public static void StartRecordManually(bool inEnableStackTrace, bool inEnableStatInfo, bool inFrequentScreenShot, bool inEnablebRenderInst, + public static void StartRecordManually(bool inEnableStackTrace, bool inEnableStatInfo, bool inFrequentScreenShot, bool inEnablebRenderInst, bool inEnableCaptureResource, bool inEnableLuaMemoryMonitor, bool inEnableLuaFunctionMemoryTracking) { #if UNITY_EDITOR - return; + return; #else if (m_PerfEngineImplementation == null) { @@ -207,7 +211,7 @@ namespace WXSDKPerf return; } - m_PerfEngineImplementation.StartRecordManually(inEnableStackTrace, inEnableStatInfo, inFrequentScreenShot, inEnablebRenderInst, + m_PerfEngineImplementation.StartRecordManually(inEnableStackTrace, inEnableStatInfo, inFrequentScreenShot, inEnablebRenderInst, inEnableCaptureResource, inEnableLuaMemoryMonitor, inEnableLuaFunctionMemoryTracking); #endif } @@ -218,7 +222,7 @@ namespace WXSDKPerf public static void StopRecordManually() { #if UNITY_EDITOR - return; + return; #else if (m_PerfEngineImplementation == null) { diff --git a/Runtime/playable-default/check-version.js.meta b/Runtime/playable-default/check-version.js.meta index ad4c29d25..c0751b8d3 100644 --- a/Runtime/playable-default/check-version.js.meta +++ b/Runtime/playable-default/check-version.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 2ea6c9ccc285c9ef72c52c3cf4bd9f0f -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 58b9518c5bef51e65aa5f5c4f7fa5cbc + 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 17c510f0b..bc06534e6 100644 --- a/Runtime/playable-default/data-package.meta +++ b/Runtime/playable-default/data-package.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: eaafd2ef8d825f1088f52f56b9d21963 +guid: 9bc9b52d86f58bc443e622322eb1b846 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 57aa359b3..b697ba8d5 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: c70bf2b501338e1b5b07caecbd69f6ca -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 0711ddf0e00c1ba034fbd175be10628f + 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 4b1e708b6..d213412c6 100644 --- a/Runtime/playable-default/events.js.meta +++ b/Runtime/playable-default/events.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 233c4a87e55377c757097a4e69560b74 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 852f2703cb5f4c4b66dc507095a4b9a1 + 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 7e4f2962b..6cc7a8132 100644 --- a/Runtime/playable-default/game.js.meta +++ b/Runtime/playable-default/game.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 435a753f88d1d624eb4016a24afc9d67 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 2e7b895000f8cd2ee3e01a23e148528b + 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 315990b35..c26d7ee04 100644 --- a/Runtime/playable-default/game.json.meta +++ b/Runtime/playable-default/game.json.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: b00afd74f90386ebafafb9a6d55aa87b -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 7ee7552b2ca25df2f1ac891b3bfa4d87 + 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 173f159ec..d091a13a6 100644 --- a/Runtime/playable-default/playable-fix.js.meta +++ b/Runtime/playable-default/playable-fix.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 9381d059592436363b3edf5a6439dd30 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 5cbae90858248bb57c9fa4247bfe3fb9 + 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 c3e47327f..54526628d 100644 --- a/Runtime/playable-default/plugin-config.js.meta +++ b/Runtime/playable-default/plugin-config.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 2ee7fd70a3a543be42f43bc86f288c94 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: c108ed7b5db8520573eb093d569e2d45 + 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 d80ef9ad0..d86354a64 100644 --- a/Runtime/playable-default/plugins.meta +++ b/Runtime/playable-default/plugins.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: cd56fbe2ebde1bfa884abef0b4b2a15e +guid: eb39128638dc08a574bf249aae32ad73 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 8920447a8..6cda8ad21 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: 104793ef1a47ebfcdecb96d90061153d -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 71ec3d6a7a4a473a8a24a54d85c2d644 + 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 85d00d392..35dc3e6d9 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: 276e1e64cd434e9c59f83833dce5fc42 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 1de1ec388f633ac36d5de279ea2f7e9b + 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 dab2f3b3e..8d2255a9b 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 a4adfe644..073264629 100644 --- a/Runtime/playable-default/project.config.json.meta +++ b/Runtime/playable-default/project.config.json.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 5a4d489bde9a239a9955e2dbdf677b37 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: a6285d409abf66a2e46357c787f942d5 + 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 99b4a0c5e..a62dbc687 100644 --- a/Runtime/playable-default/texture-config.js.meta +++ b/Runtime/playable-default/texture-config.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 33f1eef9bc82a8ce14c925973bf84330 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 77614732886ff126205b6da0ac2e8c80 + 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 73f16295b..1db2d4627 100644 --- a/Runtime/playable-default/unity-namespace.js.meta +++ b/Runtime/playable-default/unity-namespace.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 2caa890eaad3e53af62bb309891ced0f -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: fdd7594db068008d2c5097582912cc08 + 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 8d50f40f1..c4ef19d20 100644 --- a/Runtime/playable-default/unity-playable-plugin.meta +++ b/Runtime/playable-default/unity-playable-plugin.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 343b87d30905e288ee8763e23245f08a +guid: 063d1734fdc8f1c780164766567bb789 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 60f378ba3..ab6082c96 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: fa4a04bfa606d5a5566680ce1145d7b3 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: a03efad11c3d6e9c133e0a027b27c45b + 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 a8b1ded00..d866d1ecc 100644 --- a/Runtime/playable-default/unity-sdk.meta +++ b/Runtime/playable-default/unity-sdk.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: cdd03053cbd2cfd653ed68fd41373ece +guid: bf62979de004c36e17508cb9641935c6 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/playable-default/unity-sdk/audio.meta b/Runtime/playable-default/unity-sdk/audio.meta index 61fce89c6..b97ec8a84 100644 --- a/Runtime/playable-default/unity-sdk/audio.meta +++ b/Runtime/playable-default/unity-sdk/audio.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 3608db8ccc451f57f0e72d39fe89c472 +guid: 78b96471a5f5b4f7ac9508f790156504 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 397e2caea..31460a24c 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: 26944986a3acb6c1a0845f70be368ede -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 733379ab4e176225b2b9023e86d21efe + 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 d3e0cf8c9..38f413357 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: b743d8ee4e112f882e5adcc6e1d60150 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 120944c78a76a7b85573eb2cebbe6444 + 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 44f8091a9..129c5fc42 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: 6dd72668631c2965a447c0fa5c956326 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: b7e3639d5812dd4c28e03e1688a9a76a + 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 ae1ce1510..a8431a1d5 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: f7f2e35b67135249c269ad6f8425d7fe -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: a8249d3593b71f0b229ed884eeb141fa + 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 7a7c14490..8e9f97c8e 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: 53c0c1972ca56e63b7bd4a0d370d669f -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 079e662e53e59d631c82714e7134f525 + 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 2ecd97853..7c184a9c8 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: ea06fbbed1477594c9fe79652297ea0b -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 2d3fe21329e7e4acdc54c284cae290ce + 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 052f10468..7d9a1886b 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: 7daa33856d3d3921a86b0b4d591384d6 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 91e8d7b4bfc676a20cc00202167f9eea + 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 7f9af9585..bbd244271 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: 0b68cf7eb834e6c55df6b648ddc396ac -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 92a1cca5208b6d4071ebf7506c984c63 + 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 a9437c051..dbc4bfc75 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: 23ac0a1c7d4acf30550da1c3250d7943 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 2778f35cb8557d31d403c4cf79539cbe + 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 de7767ad3..3e224ee44 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: cb5cc91925bdfbfdbb3095d542ba3831 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 4640bdb8979bb5b2e0a9c39894ca014e + 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 5ddf3c06c..1c21c61e4 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: 5fc7a5e574c3b42b18696f9d74ce1385 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 6ed7d4da67e810a1c946f8fe1994c8ad + 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 6d053a081..4d319ce90 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: 056d0de4082d8112646e9458d8fc7ed8 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 5d37e11e38dd8f776a5b9047ab23db2e + 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 8575512fa..ce4cc07a0 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: 8620ce4d04276c6ac5db7c79c06ae1f8 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 89cd26e81e3d75b782ebb4ffff856920 + 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 e19bbc1ad..98bad0fb1 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: 24c0ed48be4c0d08013b010309a23eae -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 0483c0213d00488d44ba980a56e92c8a + 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 11c1977a6..6341d7c82 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: f761de43f32914ee8cad0d60aa09f788 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 8754eb0948a9b13a6ea3e96d071b881d + 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 f97416fc5..a2c21a8e9 100644 --- a/Runtime/playable-default/unity-sdk/mobileKeyboard.meta +++ b/Runtime/playable-default/unity-sdk/mobileKeyboard.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: a4ac42294f78095bb3b766be664735cb +guid: af1204e9ec71c39435af55b93444d7d0 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 5d9db18b7..d487e89f2 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: 82a18f9d767fb05ea2812cbd70a44dfb -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 54678c7b6976ef85f608fa21e58c58e7 + 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 24723375a..2129e743c 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: 8b05250bc9130efc931bb42ff64286cc -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 21935cad3e92c3564437e0de95a95df0 + 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 b15cfbd55..ba6df87d9 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: 734b469a069fc1bd31aef3e252caf407 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: e313d0310a227b46d031f0602b33a62e + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-sdk/resType.js b/Runtime/playable-default/unity-sdk/resType.js index e81a85770..1cc38b161 100644 --- a/Runtime/playable-default/unity-sdk/resType.js +++ b/Runtime/playable-default/unity-sdk/resType.js @@ -1,4 +1,11 @@ export const ResType = { + Gamepad: { + axes: 'IAnyObject[]', + buttons: 'IAnyObject[]', + connected: 'bool', + id: 'string', + index: 'string', + }, AccountInfo: { miniProgram: 'MiniProgram', plugin: 'Plugin', @@ -496,7 +503,7 @@ export const ResType = { headUrl: 'string', nickname: 'string', nonceId: 'string', - otherInfos: 'AnyKeyword[]', + otherInfos: 'any[]', replayStatus: 'number', status: 'number', errMsg: 'string', @@ -505,7 +512,7 @@ export const ResType = { headUrl: 'string', nickname: 'string', noticeId: 'string', - otherInfos: 'AnyKeyword[]', + otherInfos: 'any[]', reservable: 'bool', startTime: 'string', status: 'number', @@ -574,6 +581,11 @@ export const ResType = { weakNet: 'bool', errMsg: 'string', }, + GetPhoneNumberSuccessCallbackResult: { + code: 'string', + errMsg: 'string', + errno: 'number', + }, GetPrivacySettingSuccessCallbackResult: { needAuthorization: 'bool', privacyContractName: 'string', @@ -598,6 +610,10 @@ export const ResType = { mainSwitch: 'bool', itemSettings: 'object', }, + GetShowSplashAdStatusSuccessCallbackResult: { + status: 'string', + errMsg: 'string', + }, GetStorageInfoSuccessCallbackOption: { currentSize: 'number', keys: 'string[]', @@ -724,6 +740,12 @@ export const ResType = { message: 'string', stack: 'string', }, + OnGamepadConnectedListenerResult: { + gamepad: 'string', + }, + OnGamepadDisconnectedListenerResult: { + gamepad: 'string', + }, OnHandoffListenerResult: { query: 'string', }, @@ -741,14 +763,6 @@ export const ResType = { OnMemoryWarningListenerResult: { level: 'number', }, - OnMenuButtonBoundingClientRectWeightChangeListenerResult: { - bottom: 'number', - height: 'number', - left: 'number', - right: 'number', - top: 'number', - width: 'number', - }, OnMouseDownListenerResult: { button: 'number', timeStamp: 'long', @@ -849,17 +863,6 @@ export const ResType = { subscriptionsSetting: 'SubscriptionsSetting', errMsg: 'string', }, - OperateGameRecorderVideoOption: { - atempo: 'number', - audioMix: 'bool', - bgm: 'string', - desc: 'string', - path: 'string', - query: 'string', - timeRange: 'number[]', - title: 'string', - volume: 'number', - }, MediaSource: { url: 'string', poster: 'string', diff --git a/Runtime/playable-default/unity-sdk/resType.js.meta b/Runtime/playable-default/unity-sdk/resType.js.meta index 674d3c3d4..3b3ec2598 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: 57eefa85c55d36f8a16775014d1de18d -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 13bc37721c7573aec81a061a5071719a + 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 ade59228e..bc121905a 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: fe5d4e8cd081a4dbd3ac4031405b7f12 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 3f9aeb84a873c780be8179cd9faf3542 + 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 6b7b5fca5..eaf48303c 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: ab1962353436471e6ce08932a27104ef -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: e6c68511c2840911d5706895b5c4c410 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-sdk/sdk.js b/Runtime/playable-default/unity-sdk/sdk.js index d1230f719..0c1957ed6 100644 --- a/Runtime/playable-default/unity-sdk/sdk.js +++ b/Runtime/playable-default/unity-sdk/sdk.js @@ -23,7 +23,7 @@ function getClassObject(className, id) { // eslint-disable-next-line @typescript-eslint/naming-convention function WX_OneWayNoFunction(functionName, ...params) { - wx[functionName.replace(/^\w/, a => a.toLowerCase())](...params); + wx[functionName.replace(/^\w/, (a) => a.toLowerCase())](...params); } @@ -33,7 +33,7 @@ const onlyReadyResponse = [ ]; // eslint-disable-next-line @typescript-eslint/naming-convention function WX_SyncFunction(functionName, ...params) { - return wx[functionName.replace(/^\w/, a => a.toLowerCase())](...params); + return wx[functionName.replace(/^\w/, (a) => a.toLowerCase())](...params); } // eslint-disable-next-line @typescript-eslint/naming-convention @@ -42,13 +42,22 @@ function WX_ClassOneWayNoFunction(className, functionName, id, ...params) { if (!obj) { return; } - obj[functionName.replace(/^\w/, a => a.toLowerCase())](...params); + obj[functionName.replace(/^\w/, (a) => a.toLowerCase())](...params); +} +function classFormatAndSend(id, callbackId, callbackName, callbackType, resType, res) { + formatResponse(resType, res); + moduleHelper.send(callbackName, classGetMsg(id, callbackId, callbackType, res)); +} +function classGetMsg(id, callbackId, resType, res) { + return JSON.stringify({ + id, callbackId, type: resType, res: JSON.stringify(res) || '', + }); } export default { WX_OneWayFunction(functionName, successType, failType, completeType, conf, callbackId) { - const lowerFunctionName = functionName.replace(/^\w/, a => a.toLowerCase()); + const lowerFunctionName = functionName.replace(/^\w/, (a) => a.toLowerCase()); const config = formatJsonStr(conf); - + // specialJS if (lowerFunctionName === 'login') { if (!config.timeout) { delete config.timeout; @@ -111,7 +120,7 @@ export default { moduleHelper.send(`_${functionName}Callback`, resStr); }; onEventLists[functionName].push(callback); - wx[functionName.replace(/^\w/, a => a.toLowerCase())](callback); + wx[functionName.replace(/^\w/, (a) => a.toLowerCase())](callback); }, WX_OffEventRegister(functionName) { (onEventLists[functionName] || []).forEach((v) => { @@ -225,7 +234,7 @@ export default { }, WX_SyncFunction_t(functionName, returnType) { const res = WX_SyncFunction(functionName); - if (onlyReadyResponse.includes(functionName.replace(/^\w/, a => a.toLowerCase()))) { + if (onlyReadyResponse.includes(functionName.replace(/^\w/, (a) => a.toLowerCase()))) { formatResponse(returnType, JSON.parse(JSON.stringify(res))); return JSON.stringify(res); } @@ -262,10 +271,10 @@ export default { formatResponse(returnType, res); return JSON.stringify(res); }, - WX_ClassOneWayFunction(functionName, returnType, successType, failType, completeType, conf) { + WX_ClassConstructor(functionName, returnType, successType, failType, completeType, conf) { const config = formatJsonStr(conf); const callbackId = uid(); - const obj = wx[functionName.replace(/^\w/, a => a.toLowerCase())]({ + const obj = wx[functionName.replace(/^\w/, (a) => a.toLowerCase())]({ ...config, success(res) { formatResponse(successType, res); @@ -293,7 +302,7 @@ export default { return callbackId; }, WX_ClassFunction(functionName, returnType, option) { - const obj = wx[functionName.replace(/^\w/, a => a.toLowerCase())](formatJsonStr(option)); + const obj = wx[functionName.replace(/^\w/, (a) => a.toLowerCase())](formatJsonStr(option)); const id = uid(); if (!ClassLists[returnType]) { ClassLists[returnType] = {}; @@ -347,10 +356,10 @@ export default { ClassOnEventLists[className + functionName][id + eventName].push(callback); // WXVideoDecoder OnEvent 不规范 特殊处理 if (className === 'WXVideoDecoder') { - obj[functionName.replace(/^\w/, a => a.toLowerCase())](eventName, callback); + obj[functionName.replace(/^\w/, (a) => a.toLowerCase())](eventName, callback); } else { - obj[functionName.replace(/^\w/, a => a.toLowerCase())](callback); + obj[functionName.replace(/^\w/, (a) => a.toLowerCase())](callback); } }, WX_ClassOffEventFunction(className, functionName, id, eventName) { @@ -389,7 +398,7 @@ export default { if (!obj) { return JSON.stringify(formatResponse(returnType)); } - const res = obj[functionName.replace(/^\w/, a => a.toLowerCase())](); + const res = obj[functionName.replace(/^\w/, (a) => a.toLowerCase())](); return JSON.stringify(formatResponse(returnType, res, id)); }, WX_ClassOneWayNoFunction_vt(className, functionName, id, param1) { @@ -399,4 +408,41 @@ export default { WX_ClassOneWayNoFunction_vn(className, functionName, id, param1) { WX_ClassOneWayNoFunction(className, functionName, id, param1); }, + WX_ClassOneWayFunction(className, functionName, id, successType, failType, completeType, conf, callbackId, usePromise = false) { + + const obj = getClassObject(className, id); + if (!obj) { + return; + } + const lowerFunctionName = functionName.replace(/^\w/, (a) => a.toLowerCase()); + const config = formatJsonStr(conf); + + if (usePromise) { + obj[lowerFunctionName]({ + ...config, + }).then((res) => { + classFormatAndSend(id, callbackId, `_${className}${functionName}Callback`, 'success', successType, res); + }) + .catch((res) => { + classFormatAndSend(id, callbackId, `_${className}${functionName}Callback`, 'fail', failType, res); + }) + .finally((res) => { + classFormatAndSend(id, callbackId, `_${className}${functionName}Callback`, 'complete', completeType, res); + }); + } + else { + obj[lowerFunctionName]({ + ...config, + success(res) { + classFormatAndSend(id, callbackId, `_${className}${functionName}Callback`, 'success', successType, res); + }, + fail(res) { + classFormatAndSend(id, callbackId, `_${className}${functionName}Callback`, 'fail', failType, res); + }, + complete(res) { + classFormatAndSend(id, callbackId, `_${className}${functionName}Callback`, 'complete', completeType, res); + }, + }); + } + }, }; diff --git a/Runtime/playable-default/unity-sdk/sdk.js.meta b/Runtime/playable-default/unity-sdk/sdk.js.meta index 22267e18f..9bef6438d 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: c6eca6dbedf3a3be96959dc83364005e -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 467fa80c307763f95a443965d2393b59 + 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 7ca8155ac..5982181f8 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: c0f36136298a642b4502fb146b6e2360 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 3feb66e07562812bef88d4e315b1c963 + 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 4045da77d..bbc07e8ad 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: c1f4bd2c195ce1adc42545981730320b -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 9df66a43e4b6cb795d028dc597a5705c + 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 0d21ddcdd..5885d3c2c 100644 --- a/Runtime/playable-default/unity-sdk/touch.meta +++ b/Runtime/playable-default/unity-sdk/touch.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 9977bbc7793207a2171435e8341df166 +guid: 8aeb975fbb1c4c60e2b880cbba648032 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 d804785f5..d78a0abdd 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: bf8f984286430d97a62a5034d50e13fb -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: e97d12125cf824d28eff98e3146ca544 + 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 a48f19a19..a06129784 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: 0b9405685a1cff22ab86b6ebe7714ff0 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: f3d4dbf1c775b60df57ea6f5918c2775 + 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 08327614e..26fd7d3fa 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: 1657705d59058758e5a91dda2487a1bd -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 9b2b269f318614f43e13a679a76996b0 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/playable-default/unity-sdk/video.js b/Runtime/playable-default/unity-sdk/video.js index e81be2bbe..56bc70f05 100644 --- a/Runtime/playable-default/unity-sdk/video.js +++ b/Runtime/playable-default/unity-sdk/video.js @@ -18,12 +18,15 @@ export default { if (!obj) { return; } - if (key === 'x' || key === 'y' || key === 'width' || key === 'height') { + if (key === 'x' || key === 'y' || key === 'width' || key === 'height' || key === 'playbackRate' || key === 'initialTime') { obj[key] = +value; } else if (key === 'src' || key === 'poster') { obj[key] = value; } + else if (key === 'loop' || key === 'muted') { + obj[key] = value === 'true'; + } }, WXVideoPlay(id) { const obj = getObject(id); @@ -40,10 +43,11 @@ export default { obj[key]((e) => { moduleHelper.send('OnVideoCallback', JSON.stringify({ callbackId: id, - errMsg: key, + type: key, position: e && e.position, buffered: e && e.buffered, duration: e && e.duration, + errMsg: e && e.errMsg, })); if (key === 'onError') { GameGlobal.enableTransparentCanvas = false; diff --git a/Runtime/playable-default/unity-sdk/video.js.meta b/Runtime/playable-default/unity-sdk/video.js.meta index 3c9718027..c5eac4b8f 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: 440906071e88b8550f9cbc3b4b280839 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: de86ce9dd6cf4cbc331b71cfe6c496d9 + 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 f8616e4e8..428a84d36 100644 --- a/Runtime/playable-default/unity-sdk/video.meta +++ b/Runtime/playable-default/unity-sdk/video.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 26ee2d27d9e0ae7f8bb696b8c1bb4e35 +guid: 31acd40d7339c9a2ed4d5b6ca5864e57 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/playable-default/unity-sdk/video/index.js.meta b/Runtime/playable-default/unity-sdk/video/index.js.meta index c52315e90..73254f6d7 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: aa6ddd5f113d8bf3fc7e88320bd0d4d9 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: ca45230e649c83076e8ba6339b338974 + 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 3adedb3de..d41b8f59f 100644 --- a/Runtime/playable-default/wasmcode.meta +++ b/Runtime/playable-default/wasmcode.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: e2de943a06884a5955f520e6d8efbc40 +guid: 9b99f1cd83b657ebda9bf6d67bc43c20 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/playable-default/wasmcode/game.js.meta b/Runtime/playable-default/wasmcode/game.js.meta index ddffe9b21..f9c9a6a46 100644 --- a/Runtime/playable-default/wasmcode/game.js.meta +++ b/Runtime/playable-default/wasmcode/game.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: b7a03c41de33840d5b2076bf4c2d9f33 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: bf53b9439ed1b985cd1083e6c69b3deb + 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 4cc6ea28a..f42e21d13 100644 --- a/Runtime/playable-default/weapp-adapter.js.meta +++ b/Runtime/playable-default/weapp-adapter.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: ea02ba318d8f95362e287ffb3c6e309a -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: b6fc61d4be040dfe92ddf540ebd89581 + 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 1f65ece21..8594e79f6 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 24c3664ac..1c0581a75 100644 --- a/Runtime/wechat-default/check-version.js.meta +++ b/Runtime/wechat-default/check-version.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 69e2edf7ce2609dd8a49811b6f507372 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 214d482acd8a3faf6d3241bb3907116e + 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 2d857a5bd..17d2ff1c6 100644 --- a/Runtime/wechat-default/data-package.meta +++ b/Runtime/wechat-default/data-package.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 7876f291585b84c91bfb2ecd4fda96de +guid: 03ae8e10b1fec9dc91915efaa686bc7f 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 bf4930be7..54ab02fc0 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: 071c072861ae85c91926a1403480e38a -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 51cf8aab71adc1f554039eb92ecc6e91 + 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 171a73438..0a5d0a2ec 100644 --- a/Runtime/wechat-default/events.js.meta +++ b/Runtime/wechat-default/events.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: e803a90f65cdf6d65cfb2f9b8c5a797c -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 18d87d64f666c42626878bd66a87ab06 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/game.js.meta b/Runtime/wechat-default/game.js.meta index c92481296..e20c6f66d 100644 --- a/Runtime/wechat-default/game.js.meta +++ b/Runtime/wechat-default/game.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 8b10ed45b2c165e7058031944880d99c -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 975dd6963b228e8393c4ac03b2c272c4 + 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 22b682158..c28f9d640 100644 --- a/Runtime/wechat-default/game.json +++ b/Runtime/wechat-default/game.json @@ -23,7 +23,7 @@ ], "plugins": { "UnityPlugin": { - "version": "1.2.74", + "version": "1.2.78", "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 52dc679f9..c22b25ca6 100644 --- a/Runtime/wechat-default/game.json.meta +++ b/Runtime/wechat-default/game.json.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: fb5a377e3c540c90f64a44ad41d4cf4a -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 1b69b2c9ae2eeeffb39044bad732c254 + 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 e09b8fc8a..9f18d210d 100644 --- a/Runtime/wechat-default/images.meta +++ b/Runtime/wechat-default/images.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: a8b368565349c464585be31f1de8cbb4 +guid: 4d7b71a6f601af0a422f3c22f556998f 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 bf9d1c4d6..059d7d78d 100644 --- a/Runtime/wechat-default/images/background.jpg.meta +++ b/Runtime/wechat-default/images/background.jpg.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 7bf9e2368cd493e03e6ae67f29d680b6 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 1d02859b229c26f6e1baf88b1d8a5be4 + 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 3e9f470f4..15a091893 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: 300643e590ffc5057e481e0b1d330b12 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 6f74e46dae5510a739d2607948af82e3 + 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 f9d9129ca..b0d5eaf3d 100644 --- a/Runtime/wechat-default/open-data.meta +++ b/Runtime/wechat-default/open-data.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: a4dc6cb18702e483f8c0e33040ec7a8c +guid: e06e587fff0ba858f9d0d6681f1ad481 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 5150eadd7..69fe6d227 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: c099b6c2e5ee1859f50546e5d06c8750 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 0ef82b4f0..14be65aa3 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: 3ed7c28735a887ef7d65c33b93acd5a2 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 586782a06f7ad1fea9fa3b64d73ce67d + 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 aeb8a35e1..6832b7ae6 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: c373b9aba7791ae4d230c5afd8902218 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: c05ff220f2b671a8e723d6f87b41a229 + 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 e59203110..4fc6af646 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: 0c54bd78ccb2d52c062808cad27e6b6b -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 22823f4de690ef36c22846a7ca00675f + 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 84716a13e..5ec045985 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: 801213edfb6996bdd7ee59d47cbe66f8 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: a0c98ba0f7480eeb75450f133bbd2197 + 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 f4467bdc0..43ccbd24a 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: 15331c889f3fba303581157d43ab1b10 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 60ae58fb0..bf8e274f1 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: 5788d62947309a1910867eb819ee8e5e 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 7509bdb3e..eba2722eb 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: aca7eb02e1430bd556a79d1d49673c16 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: e984914715a2ff59b667dcef907c3ce3 + 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 3b2e18f1f..eaef013ce 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: d50dc1cd3e291c640c05a33e7441974b -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 622a1d04534bd0ade18aa1ad16f1ae4a + 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 4babe1ab0..693edcd81 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: 0cb6b71e964998a305fe149d681fa0ce -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 72e5108be41c37b57c3398443a8ff5c2 + 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 eeae47121..e278eb759 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: 242ed147c5e65dbd1e595b737e9111d4 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 962eef3b39f17e90a13d4a12921d4b49 + 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 19ecfc95f..84da76bfd 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: 68fc0a98e4dbaa4197f178baca0809db -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 96f91dccb4218b838608f4f949c727e3 + 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 6e1a647e2..aee91c8e9 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: e6fb717110344e99b5d21fd4a580e4fb -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: fda34ba3230447a6880a563b98d3b971 + 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 2fe895562..974c6c369 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: 33e3d31e7ba1131db5260344133cfdf7 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 1b2dd0135ee69d91868c33ee59e6c549 + 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 cf153633c..5da50758a 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: 2a413d80b273425318c05af61f0587e5 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 494b3cabacad51026421637c2f7ac77d + 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 d52ae43ec..2c569a59e 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: ed6cba6ab5c545e425d1e43a2b54e4ef -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 090993582a518a33335bfd5d229901e7 + 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 0c7b493ff..4b80b0e13 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: ec566d71cf9a46cdfc76b79343e2ec48 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 5e1df08a1a5a1afc9b13eec932bf8738 + 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 65792ade1..1cbd0b9aa 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: b86923479db07af6bb13a4d66b7b0326 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 561c0bf65..61e0427e3 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: 997bf5daa74916e87ffa52cd901071c5 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: daa91f09384d71cc795b6018ff896ad8 + 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 79cc2def7..aa92170cd 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: bc25a84caa4d43ef0f6069d570bebab9 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 0dfb7008414432b49bc93659fd26eb94 + 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 966d96f41..2d72cecb3 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: 32716a983e69949be97eedd67423716d 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 cda5a6682..c6542d13e 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: b56ac40b97d77129c11029f0cc5088ef -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 93c8027141be7f9dfae15c7041dff181 + 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 222817667..5e5f3cbf0 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: bf34bd191d9a19c0e8b9f9f4162085d6 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: aea50c7a3f5a327a24d1ab919370b6e0 + 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 220c4a175..e32412e2d 100644 --- a/Runtime/wechat-default/plugin-config.js.meta +++ b/Runtime/wechat-default/plugin-config.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 36a78883e0e506b96f5169f7b48a36b0 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 3a6e670f37b5be8ad4e0d4efa92873bc + 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 aaccbe7d5..32f5cefad 100644 --- a/Runtime/wechat-default/plugins.meta +++ b/Runtime/wechat-default/plugins.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 7138171c522f8ed3db234e0cec8a4379 +guid: 01ac79598a13b849f97302f861c1a684 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 16b60dc4e..2c96d1da6 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: f15de84909b43a0cbb4603defcf6abed -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: cf59692e3800572b69c26654246182f1 + 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 fcaa07723..91aaf8c1d 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: 68dfbbaa06bb5cb14638580ce46f4f18 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 454ef9aff4d2b9072640cd17e80e59cd + 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 bc8bd27b5..ef8f27137 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 bb22e9e38..8a9263eca 100644 --- a/Runtime/wechat-default/project.config.json.meta +++ b/Runtime/wechat-default/project.config.json.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: f6d0067e79889748191657f99777dc07 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 0260255a9fe9952881cd1d65efe57166 + 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 cefd5eb2d..4d317acff 100644 --- a/Runtime/wechat-default/texture-config.js.meta +++ b/Runtime/wechat-default/texture-config.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 5e3fc4f8b7a0f5a7edec080f60bcb418 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 61fb8a846968c0cbd7c5f2c7d2dc0000 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-namespace.js b/Runtime/wechat-default/unity-namespace.js index 30f8347b6..85a15e686 100644 --- a/Runtime/wechat-default/unity-namespace.js +++ b/Runtime/wechat-default/unity-namespace.js @@ -57,6 +57,8 @@ const unityNamespace = { isProfilingBuild: $Is_Profiling_Build, // 预留的堆内存 unityHeapReservedMemory: $UnityHeapReservedMemory, + // 是否向Perfstream上报数据 + sendData2PerfStream: $SEND_DATA_TO_PERF_STREAM, }; // 最佳实践检测配置 unityNamespace.monitorConfig = { diff --git a/Runtime/wechat-default/unity-namespace.js.meta b/Runtime/wechat-default/unity-namespace.js.meta index 73bfa9435..ff7dc6292 100644 --- a/Runtime/wechat-default/unity-namespace.js.meta +++ b/Runtime/wechat-default/unity-namespace.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: f2617f1abc53c51d4c3bec8bd5b447f8 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: a3411f163e599681a2b0f36b3fa16a8e + 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 1abfc728e..6bc4ccd23 100644 --- a/Runtime/wechat-default/unity-sdk.meta +++ b/Runtime/wechat-default/unity-sdk.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 11099722ddcf64977a5e5a9458a9d25e +guid: 1f040e2f57e6f8ca633c422e241e18ae 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 03512191c..27e18d82b 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: bc4b3560411a4fa814872f1e0158d310 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 7de773c63..073d7a558 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: f84bde3b596fb91a33f9d553afcdc96f -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: dc263596a3ff7b6b81c38947146918ba + 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 880750427..2483caf3c 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: 7bc3b48a9cc6583aa8c780b2142edcca 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 aafb4573c..c120946af 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: 095a118ba37a70900529bdb82389b98e -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 3e77ac406c7b916a78b685a17e78b455 + 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 eeb15fadf..1c030bbca 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: 2e68892b622ebc719b2c7c0ba075caed -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: a083768749a4424e97826aa2ee97a5b6 + 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 de163886b..27cc77fec 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: 793439e18f2ec7b9bc0edd61891b951c 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 b6e7db3ab..fdb0ff201 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: 2335b7ce54e59c22274731eb027702d3 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: e65f1fb6aee14ebe26d1af1a1da1beea + 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 3aac68ef2..c42817286 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: 56cfd561c81ce6e1cf878a1360035fa5 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: f42df6b4d41f675a66a93990a7780cc5 + 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 10a2bb46a..c1452e407 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: fd0349286deb021e627c2dffd6ed2454 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: b85b5f01ff3edcf890cccb443bc22c1e + 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 268cca70c..c374de162 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: 129d7b7168ec13fd6e0eb74c21224125 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 0eef101663519c81d36a006338de1313 + 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 2d4b0b601..e3f84ff7e 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: 128deaa75f78ac23bb3431eba43adb84 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 67467cda8dd908cabbe7dce2a6e2f749 + 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 9f21deba5..123a7ad02 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: b8aed01099cc4a0b2104e9fef635206b -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: eeb15c35d03efd56c89a1764677ec559 + 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 f574bf6d0..91bfa2f35 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: 1dc84854166d6110b2aee9400b7d11a3 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 709db78b8f52735374122b7d73467362 + 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 1087307b5..2a6fc9cf9 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: 15a7b2162145cb5860a54bb2642e4aeb -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 767e8bffcec9e350f443c6ee25ed7e87 + 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 884b3b818..03ca33ce1 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: 6d4c0bebb20284378de91a0746925fba 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 33394d220..cd683f540 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: e79dca472062f22a2b9f91bfa00a7688 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 37e123269f2191f1415fab22489fad6a + 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 ee4d5a67a..de9ed9432 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: cab831a07d0d53eb359cae6352c19ef8 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: a82ffbed552ae03f1407ab53b547adca + 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 1a8857893..799267341 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: 9a15c7a552602147bce0019f70a8b00d -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: c83cd27e7dd72b7f354feaec20709d35 + 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 edea008c9..ecae85fd8 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: 59b00714fcd001e8de99038ab9e284c5 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 788d9c846945903d539d0e3a300415e9 + 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 4d6808ba9..3c41d7dcc 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: fe4fba2458aafa3c5f95c5d686180dc3 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 68999d0898638218f4ab19ee466e2919 + 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 c4278437d..16f3a8cd0 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: cfae69be279a6d5daadc6409d5c371da -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 4c470b54b1c7744e27a1e1f295d5ebeb + 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 85fceafe5..e87b05ecf 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: a193f7cecacc64646122c95a527ab303 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 5946d749de42bca35fda33201d10222f + 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 ec93dbe8b..4f8d99d58 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: 95501d38acc71a7c1cac51086dfb89c9 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: d6e839e47976f8b3bcb2d20a9cbf6ff5 + 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 b439f7759..1c5a02c75 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: a800631d57e3f546898c03f670a9bc9f -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: e8d49da44d706bbc26f5722e9693f443 + 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 e19d1a864..90f393eb6 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: d1b50fea6408d31da5299508b425e566 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 a0ff6a02c..ffa865567 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: a203447463eac6c668c7efbbe9b98f2b -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 94b7d1b5e9ee4da76111c27dd9ba8b0a + 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 7114cb97c..6e1319e2a 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: 99b0e34dda29ecc82c69b66a134de3c3 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: f732ce8eea068c0669a72ca7b7f6c917 + 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 75cab7029..800f36ff8 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: 27d3a2854fc70a23dcc425bcfb0dad11 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 15f3728fbb90e5a0bc44a7fba4cd51fd + 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 618ea1646..d4b2545e9 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: e262b7c8bf6ee738a192829a6f432788 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 862af988d77da30029642f2e0d2801a9 + 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 15fad8dfe..3267494e9 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: 616423238da51703462f1247876567c0 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 9844fa3db606db8855d9e44572fba999 + 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 b2d61ec24..88369b9a3 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: c99edabfaa36b76fc638696e7fd3454e -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 43f747957a3380e132fe7b7a8030c2f8 + 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 2fd9166ab..2883b9b9a 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: 64e1182ea0202a5a3d7827cb5d8167c9 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 8b88c8d2fec9a524b3b0d80666396c4e + 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 7998e52f5..5a8a737e7 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: 552402634b9f1b557aee6415c620791c -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: b73bd664c87095eef2469fd254a2ff79 + 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 b84179b58..8b3d3745e 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: 45225b71c94d176c0b23fdd42d971430 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 63c8136ff..9bdf76ef1 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: f699e481eadb490c0649f28371cab3dd -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: e0fdd41550fb7edae8a57d377bebd8a2 + 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 946eaee9f..1e0676774 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: a8744db95a36134d6a9f5e52f3a39f75 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: b620a4d55c720671e73600431fdc1840 + 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 5fc7b6f37..bc033f531 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: e0470abdf7e8ec7b3e2c1e1f13ee7a41 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 1e80ac3261a599f652459abc90d76e4c + 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 7f258d120..807643b1b 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: 7012a39611c476a79b6d9a7fb838a919 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 5ffdd3533..dda76303b 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: eb34d0dd95b834d0e985834e8c78be5b -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: e5ae89f695dda9893562717c17f92d49 + 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 bb648ae76..43414faae 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: fef826c338da32efb08d10b947faac62 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 1ffec8674933e37ef810058afb2505c1 + 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 2f4bd29dc..f5e16425f 100644 --- a/Runtime/wechat-default/unity-sdk/open-data.js +++ b/Runtime/wechat-default/unity-sdk/open-data.js @@ -21,6 +21,9 @@ function getOpenDataContext(mode) { } if (!isSupportSharedCanvasMode) { + if (mode === 'ScreenCanvas') { + console.warn('[unity-sdk]: 当前环境不支持 ScreenCanvas 模式'); + } sharedCanvasMode = SharedCanvasMode.OffScreenCanvas; } @@ -32,6 +35,7 @@ function getOpenDataContext(mode) { sharedCanvasMode = SharedCanvasMode.OffScreenCanvas; } } + console.log(`[unity-sdk]: 当前开放数据域为 ${sharedCanvasMode} 模式`); // @ts-ignore cachedOpenDataContext = wx.getOpenDataContext({ sharedCanvasMode, @@ -121,6 +125,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 +154,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 aa149e2e4..fda716954 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: 7956c8cf5126e35d540c504ab1000f8e -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: fa1d8c2441bb047466d8de194095a1a6 + 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 e6d9ec8b9..032bf2236 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: 7ee7309f1056b4f6fff0b0a264e639af -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 00b0f729b92772fac21aa39a55aebbc2 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/resType.js b/Runtime/wechat-default/unity-sdk/resType.js index fbc6da17c..1cc38b161 100644 --- a/Runtime/wechat-default/unity-sdk/resType.js +++ b/Runtime/wechat-default/unity-sdk/resType.js @@ -233,14 +233,6 @@ export const ResType = { GetLogManagerOption: { level: 'number', }, - LoadOption: { - openlink: 'string', - query: 'object', - }, - ShowOption: { - openlink: 'string', - query: 'object', - }, Path2D: {}, OnCheckForUpdateListenerResult: { hasUpdate: 'bool', diff --git a/Runtime/wechat-default/unity-sdk/resType.js.meta b/Runtime/wechat-default/unity-sdk/resType.js.meta index fe342ae8b..61d2877d2 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: 1c54a81c23e2be83c4f83377dd32b9e8 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: bd393db662a5e8ef570ad5dbd7eb21e2 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/resTypeOther.js b/Runtime/wechat-default/unity-sdk/resTypeOther.js index 9ca8b5a42..ead21e383 100644 --- a/Runtime/wechat-default/unity-sdk/resTypeOther.js +++ b/Runtime/wechat-default/unity-sdk/resTypeOther.js @@ -86,4 +86,12 @@ export const ResTypeOther = { status: 'number', errMsg: 'string', }, + LoadOption: { + openlink: 'string', + query: 'object', + }, + ShowOption: { + openlink: 'string', + query: 'object', + }, }; diff --git a/Runtime/wechat-default/unity-sdk/resTypeOther.js.meta b/Runtime/wechat-default/unity-sdk/resTypeOther.js.meta index 00b7ebf6b..c16940562 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: aa5f72ba6e62de80f01088a47233a22f -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 3cc8db01c5b1927aaca1886265cbf638 + 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 63bdc63f6..2b85d8048 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: 080cd59242c394f2fbb2512ccb6d4640 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 8457efc856030b4f62632758eeae9670 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/sdk.js b/Runtime/wechat-default/unity-sdk/sdk.js index d1230f719..0c1957ed6 100644 --- a/Runtime/wechat-default/unity-sdk/sdk.js +++ b/Runtime/wechat-default/unity-sdk/sdk.js @@ -23,7 +23,7 @@ function getClassObject(className, id) { // eslint-disable-next-line @typescript-eslint/naming-convention function WX_OneWayNoFunction(functionName, ...params) { - wx[functionName.replace(/^\w/, a => a.toLowerCase())](...params); + wx[functionName.replace(/^\w/, (a) => a.toLowerCase())](...params); } @@ -33,7 +33,7 @@ const onlyReadyResponse = [ ]; // eslint-disable-next-line @typescript-eslint/naming-convention function WX_SyncFunction(functionName, ...params) { - return wx[functionName.replace(/^\w/, a => a.toLowerCase())](...params); + return wx[functionName.replace(/^\w/, (a) => a.toLowerCase())](...params); } // eslint-disable-next-line @typescript-eslint/naming-convention @@ -42,13 +42,22 @@ function WX_ClassOneWayNoFunction(className, functionName, id, ...params) { if (!obj) { return; } - obj[functionName.replace(/^\w/, a => a.toLowerCase())](...params); + obj[functionName.replace(/^\w/, (a) => a.toLowerCase())](...params); +} +function classFormatAndSend(id, callbackId, callbackName, callbackType, resType, res) { + formatResponse(resType, res); + moduleHelper.send(callbackName, classGetMsg(id, callbackId, callbackType, res)); +} +function classGetMsg(id, callbackId, resType, res) { + return JSON.stringify({ + id, callbackId, type: resType, res: JSON.stringify(res) || '', + }); } export default { WX_OneWayFunction(functionName, successType, failType, completeType, conf, callbackId) { - const lowerFunctionName = functionName.replace(/^\w/, a => a.toLowerCase()); + const lowerFunctionName = functionName.replace(/^\w/, (a) => a.toLowerCase()); const config = formatJsonStr(conf); - + // specialJS if (lowerFunctionName === 'login') { if (!config.timeout) { delete config.timeout; @@ -111,7 +120,7 @@ export default { moduleHelper.send(`_${functionName}Callback`, resStr); }; onEventLists[functionName].push(callback); - wx[functionName.replace(/^\w/, a => a.toLowerCase())](callback); + wx[functionName.replace(/^\w/, (a) => a.toLowerCase())](callback); }, WX_OffEventRegister(functionName) { (onEventLists[functionName] || []).forEach((v) => { @@ -225,7 +234,7 @@ export default { }, WX_SyncFunction_t(functionName, returnType) { const res = WX_SyncFunction(functionName); - if (onlyReadyResponse.includes(functionName.replace(/^\w/, a => a.toLowerCase()))) { + if (onlyReadyResponse.includes(functionName.replace(/^\w/, (a) => a.toLowerCase()))) { formatResponse(returnType, JSON.parse(JSON.stringify(res))); return JSON.stringify(res); } @@ -262,10 +271,10 @@ export default { formatResponse(returnType, res); return JSON.stringify(res); }, - WX_ClassOneWayFunction(functionName, returnType, successType, failType, completeType, conf) { + WX_ClassConstructor(functionName, returnType, successType, failType, completeType, conf) { const config = formatJsonStr(conf); const callbackId = uid(); - const obj = wx[functionName.replace(/^\w/, a => a.toLowerCase())]({ + const obj = wx[functionName.replace(/^\w/, (a) => a.toLowerCase())]({ ...config, success(res) { formatResponse(successType, res); @@ -293,7 +302,7 @@ export default { return callbackId; }, WX_ClassFunction(functionName, returnType, option) { - const obj = wx[functionName.replace(/^\w/, a => a.toLowerCase())](formatJsonStr(option)); + const obj = wx[functionName.replace(/^\w/, (a) => a.toLowerCase())](formatJsonStr(option)); const id = uid(); if (!ClassLists[returnType]) { ClassLists[returnType] = {}; @@ -347,10 +356,10 @@ export default { ClassOnEventLists[className + functionName][id + eventName].push(callback); // WXVideoDecoder OnEvent 不规范 特殊处理 if (className === 'WXVideoDecoder') { - obj[functionName.replace(/^\w/, a => a.toLowerCase())](eventName, callback); + obj[functionName.replace(/^\w/, (a) => a.toLowerCase())](eventName, callback); } else { - obj[functionName.replace(/^\w/, a => a.toLowerCase())](callback); + obj[functionName.replace(/^\w/, (a) => a.toLowerCase())](callback); } }, WX_ClassOffEventFunction(className, functionName, id, eventName) { @@ -389,7 +398,7 @@ export default { if (!obj) { return JSON.stringify(formatResponse(returnType)); } - const res = obj[functionName.replace(/^\w/, a => a.toLowerCase())](); + const res = obj[functionName.replace(/^\w/, (a) => a.toLowerCase())](); return JSON.stringify(formatResponse(returnType, res, id)); }, WX_ClassOneWayNoFunction_vt(className, functionName, id, param1) { @@ -399,4 +408,41 @@ export default { WX_ClassOneWayNoFunction_vn(className, functionName, id, param1) { WX_ClassOneWayNoFunction(className, functionName, id, param1); }, + WX_ClassOneWayFunction(className, functionName, id, successType, failType, completeType, conf, callbackId, usePromise = false) { + + const obj = getClassObject(className, id); + if (!obj) { + return; + } + const lowerFunctionName = functionName.replace(/^\w/, (a) => a.toLowerCase()); + const config = formatJsonStr(conf); + + if (usePromise) { + obj[lowerFunctionName]({ + ...config, + }).then((res) => { + classFormatAndSend(id, callbackId, `_${className}${functionName}Callback`, 'success', successType, res); + }) + .catch((res) => { + classFormatAndSend(id, callbackId, `_${className}${functionName}Callback`, 'fail', failType, res); + }) + .finally((res) => { + classFormatAndSend(id, callbackId, `_${className}${functionName}Callback`, 'complete', completeType, res); + }); + } + else { + obj[lowerFunctionName]({ + ...config, + success(res) { + classFormatAndSend(id, callbackId, `_${className}${functionName}Callback`, 'success', successType, res); + }, + fail(res) { + classFormatAndSend(id, callbackId, `_${className}${functionName}Callback`, 'fail', failType, res); + }, + complete(res) { + classFormatAndSend(id, callbackId, `_${className}${functionName}Callback`, 'complete', completeType, res); + }, + }); + } + }, }; diff --git a/Runtime/wechat-default/unity-sdk/sdk.js.meta b/Runtime/wechat-default/unity-sdk/sdk.js.meta index 9eb3fe724..5a8d54db6 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: 0e753eeb76280cfe8d53d0bdcf4b4684 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: d64718623e6f6175b1407ea25ad78e26 + 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 9cc20bf2d..6135240d4 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: bf1c0d7da3a5a908cc1f4295ab5ff1f9 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: abf1fbd961474b514c7520933f6273cb + 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 f4f462d9c..91db17dd9 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: 09bece2e347740226b6986ffa45cb7c2 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 55c0658735009c1228c8f3d5ed47a0fe + 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 c384ad1a1..fa17cfbd5 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: ca0901ac66f47434b25d90d5cfdef443 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 86d48321ee7debee45efa132bd3270c8 + 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 40d432622..7a4286562 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: 2a1dd096caf5aa904b8ef8ff81995596 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 5d041c729..fdd5f5dda 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: 78a7f2797066ea83d925d95ecf65f15f -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: db6e073c3faeeab75bd884e510930536 + 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 b1e20d6de..217c434cf 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: 5e4f193ad702cdc6cdb26101773675cc -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 86dff19b18652c5697c33fd9033b7ea3 + 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 8edd4f81a..9474a4f2f 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: df896fe263347d498e5ef83cd95f407f -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 5abe787e581528aa2925e49fe724f766 + 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 64e2e85eb..b7e511ab9 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: fb91f2d36d55cdc3b8c251a95c6a6104 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: a9e0c78fc820738eb75175a75342e14c + 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 d3daf7117..086cfa242 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: b922263a0705f2a6a95df399728610ec -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 3141939f3bac6f447f598605ef761f33 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/Runtime/wechat-default/unity-sdk/video.js b/Runtime/wechat-default/unity-sdk/video.js index e81be2bbe..53706d8cc 100644 --- a/Runtime/wechat-default/unity-sdk/video.js +++ b/Runtime/wechat-default/unity-sdk/video.js @@ -18,32 +18,27 @@ export default { if (!obj) { return; } - if (key === 'x' || key === 'y' || key === 'width' || key === 'height') { + if (key === 'x' || key === 'y' || key === 'width' || key === 'height' || key === 'initialTime' || key === 'playbackRate') { obj[key] = +value; } - else if (key === 'src' || key === 'poster') { + else if (key === 'src' || key === 'poster' || key === 'objectFit' || key === 'backgroundColor') { obj[key] = value; } - }, - WXVideoPlay(id) { - const obj = getObject(id); - if (!obj) { - return; + else if (key === 'live' || key === 'controls' || key === 'showProgress' || key === 'showProgressInControlMode' + || key === 'autoplay' || key === 'loop' || key === 'muted' || key === 'obeyMuteSwitch' + || key === 'enableProgressGesture' || key === 'enablePlayGesture' || key === 'showCenterPlayBtn') { + obj[key] = value === 'True'; } - obj.play(); }, WXVideoAddListener(id, key) { - const obj = getObject(id); - if (!obj) { - return; - } - obj[key]((e) => { + getObject(id)?.[key]((e) => { moduleHelper.send('OnVideoCallback', JSON.stringify({ callbackId: id, - errMsg: key, - position: e && e.position, - buffered: e && e.buffered, - duration: e && e.duration, + type: key, + position: e?.position, + buffered: e?.buffered ? Number(e.buffered) : undefined, + duration: e?.duration, + errMsg: e?.errMsg, })); if (key === 'onError') { GameGlobal.enableTransparentCanvas = false; @@ -51,54 +46,31 @@ export default { } }); }, - WXVideoDestroy(id) { - const obj = getObject(id); - if (!obj) { - return; - } - obj.destroy(); - GameGlobal.enableTransparentCanvas = false; + WXVideoRemoveListener(id, key) { + getObject(id)?.[key](); }, - WXVideoExitFullScreen(id) { - const obj = getObject(id); - if (!obj) { - return; + WXVideoDestroy(id, isLast) { + getObject(id)?.destroy(); + if (isLast) { + GameGlobal.enableTransparentCanvas = false; } - obj.exitFullScreen(); + }, + WXVideoPlay(id) { + getObject(id)?.play(); }, WXVideoPause(id) { - const obj = getObject(id); - if (!obj) { - return; - } - obj.pause(); - }, - WXVideoRequestFullScreen(id, direction) { - const obj = getObject(id); - if (!obj) { - return; - } - obj.requestFullScreen(direction); - }, - WXVideoSeek(id, time) { - const obj = getObject(id); - if (!obj) { - return; - } - obj.seek(time); + getObject(id)?.pause(); }, WXVideoStop(id) { - const obj = getObject(id); - if (!obj) { - return; - } - obj.stop(); + getObject(id)?.stop(); }, - WXVideoRemoveListener(id, key) { - const obj = getObject(id); - if (!obj) { - return; - } - obj[key](); + WXVideoSeek(id, time) { + getObject(id)?.seek(time); + }, + WXVideoRequestFullScreen(id, direction) { + getObject(id)?.requestFullScreen(direction); + }, + WXVideoExitFullScreen(id) { + getObject(id)?.exitFullScreen(); }, }; diff --git a/Runtime/wechat-default/unity-sdk/video.js.meta b/Runtime/wechat-default/unity-sdk/video.js.meta index 6af3a6c2d..93342e17e 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: 5c9f8190a3f0181b3c0d7eaa59ea740d -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 6d67d3a95503572a65e5dfb1a0e54ae1 + 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 a495f1646..f92a48765 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: ed0cb5610084de635e96ad8e8b8846bb 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.meta b/Runtime/wechat-default/unity-sdk/video/index.js.meta index db8667ec5..574a57402 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: 29b4d1b978ceed719ab7c0d5596fdb71 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: 9835c1528084582842fee8f82958596c + 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 27b8e80c2..43316307a 100644 --- a/Runtime/wechat-default/wasmcode.meta +++ b/Runtime/wechat-default/wasmcode.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 6283887f7b9c74afa814e350f0c58bbb +guid: f0ec1bdfcaa8da3fb4ea31ca39cc7c43 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 fe682d4f1..0a060da92 100644 --- a/Runtime/wechat-default/wasmcode/game.js.meta +++ b/Runtime/wechat-default/wasmcode/game.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 14529da0171d279519e124c295c4983c -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: a01500719dd561e1527f64d8460b34e2 + 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 302287de4..0758f221b 100644 --- a/Runtime/wechat-default/weapp-adapter.js.meta +++ b/Runtime/wechat-default/weapp-adapter.js.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 90b56a15df09445f6de683c39cc5a936 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: ad5e3923c9c6f609d3b3c8dd6c357242 + 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 b841047cd..ba5c98c17 100644 --- a/Runtime/wechat-default/workers.meta +++ b/Runtime/wechat-default/workers.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 61c46cc089fd7494ca91acd91412140f +guid: 5a57389b3f4bb51b270d4773a155ef76 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 a38943ce4..256cd0774 100644 --- a/Runtime/wechat-default/workers/response.meta +++ b/Runtime/wechat-default/workers/response.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: fe36eb34977514f4d95224b0d528baf9 +guid: 644bbfc3bd6faf6ee24a533539f63573 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 7ac814a6e..82e3428a7 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: 0b199ff1aa0edee16c03bffa2505c439 -DefaultImporter: -externalObjects: {} -userData: -assetBundleName: -assetBundleVariant: \ No newline at end of file + guid: c90f46f948adcd7ddb3c1b6ac7cc3a68 + DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file diff --git a/WebGLTemplates/WXTemplate/index.html b/WebGLTemplates/WXTemplate/index.html index c0ac2da07..180d4b81e 100644 --- a/WebGLTemplates/WXTemplate/index.html +++ b/WebGLTemplates/WXTemplate/index.html @@ -431,7 +431,7 @@ return ""; }, WX_ClassFunction() {return ""}, - WX_ClassOneWayFunction() {return ""}, + WX_ClassConstructor() {return ""}, WX_ClassSetProperty() {}, WX_ClassOneWayNoFunction_v() {}, WX_ClassOneWayNoFunction_vs() {}, diff --git a/WebGLTemplates/WXTemplate2020/index.html b/WebGLTemplates/WXTemplate2020/index.html index 3c6925cc7..c183a6d96 100644 --- a/WebGLTemplates/WXTemplate2020/index.html +++ b/WebGLTemplates/WXTemplate2020/index.html @@ -503,7 +503,7 @@ return ""; }, WX_ClassFunction() {return ""}, - WX_ClassOneWayFunction() {return ""}, + WX_ClassConstructor() {return ""}, WX_ClassSetProperty() {}, WX_ClassOneWayNoFunction_v() {}, WX_ClassOneWayNoFunction_vs() {}, diff --git a/WebGLTemplates/WXTemplate2022/index.html b/WebGLTemplates/WXTemplate2022/index.html index 1f2a2badf..09c3ae63b 100755 --- a/WebGLTemplates/WXTemplate2022/index.html +++ b/WebGLTemplates/WXTemplate2022/index.html @@ -580,7 +580,7 @@ return ""; }, WX_ClassFunction() {return ""}, - WX_ClassOneWayFunction() {return ""}, + WX_ClassConstructor() {return ""}, WX_ClassSetProperty() {}, WX_ClassOneWayNoFunction_v() {}, WX_ClassOneWayNoFunction_vs() {},