diff --git a/CHANGELOG.md b/CHANGELOG.md index 61b40d7ff..4aa252520 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,18 @@ Removed - 删除功能/接口 Fixed - 修复问题 Others - 其他 --> +## 2025-11-6 v0.1.30 【重要更新】 +### Feature +* 重要:EmscriptenGLX支持微信压缩纹理 +* 普通:EmscriptenGLX支持Android glReadpixels +* 普通:EmscriptenGLX优化Android CPU与功耗 +* 普通:Metal高帧率下功耗优化 +* 普通:团结引擎buildprofile支持 +### Fixed +* 重要:Metal编码库batch size修复 +* 普通:PageManager相关问题修复 +* 普通:iOS18的微信字体修复 + ## 2025-9-8 v0.1.29 【重要更新】 ### Feature * 普通:本地缓存存在时,UnityWebRequest支持同步方式(API:wx.SetSyncReadCacheEnabled)以加快读取速度 diff --git a/Editor/BuildProfile/WeixinMiniGameSettings.cs b/Editor/BuildProfile/WeixinMiniGameSettings.cs new file mode 100644 index 000000000..9cb64e499 --- /dev/null +++ b/Editor/BuildProfile/WeixinMiniGameSettings.cs @@ -0,0 +1,136 @@ +#if TUANJIE_1_4_OR_NEWER +using System; +using System.IO; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using UnityEditor; +using UnityEngine; +using UnityEditor.Build.Profile; + +namespace WeChatWASM +{ + public class WeixinMiniGameSettings : MiniGameSettings + { + public WXProjectConf ProjectConf; + public SDKOptions SDKOptions; + public CompileOptions CompileOptions; + public CompressTexture CompressTexture; + public List PlayerPrefsKeys = new List(); + public FontOptions FontOptions; + + [SerializeField] public bool m_AutomaticFillInstantGame = true; + + public WeixinMiniGameSettings(MiniGameSettingsEditor editor) : base(editor) + { + } + + public bool PreprocessBuild(BuildProfile buildProfile, BuildOptions options) + { + bool result = true; + if (!string.IsNullOrEmpty(buildProfile.buildPath)) + { + this.ProjectConf.DST = buildProfile.buildPath; + } + else + { + Debug.LogError("Build Path is empty!"); + result = false; + } + this.CompileOptions.DevelopBuild = buildProfile.platformSettings.development; + this.CompileOptions.AutoProfile = buildProfile.platformSettings.connectProfiler; + + this.CompileOptions.CleanBuild = ((int)options & (int)BuildOptions.CleanBuildCache) != 0; + this.CompileOptions.ScriptOnly = ((int)options & (int)BuildOptions.BuildScriptsOnly) != 0; + + return result; + } + + internal void FillAutoStreamingAutomatically() + { + // Instant Game + if (WXConvertCore.IsInstantGameAutoStreaming()) + { + if (m_AutomaticFillInstantGame) + { + ProjectConf.CDN = WXConvertCore.GetInstantGameAutoStreamingCDN(); + if (!ProjectConf.bundlePathIdentifier.Contains("CUS/CustomAB;")) + { + ProjectConf.bundlePathIdentifier = "CUS/CustomAB;" + ProjectConf.bundlePathIdentifier; + } + if (!ProjectConf.bundlePathIdentifier.Contains("AS;")) + { + ProjectConf.bundlePathIdentifier = "AS;" + ProjectConf.bundlePathIdentifier; + } + ProjectConf.dataFileSubPrefix = "CUS"; + } + } + } + + public static void AutoStreamingLoad() + { + if (!WXConvertCore.IsInstantGameAutoStreaming()) + { + return; + } + + // Generate + Type asTextureUIType = Type.GetType("Unity.AutoStreaming.ASTextureUI,Unity.InstantGame.Editor"); + if (asTextureUIType == null) + { + Debug.LogError("Type 'Unity.AutoStreaming.ASTextureUI' not found. "); + return; + } + MethodInfo generateTextureAssetBundlesMethod = asTextureUIType.GetMethod("GenerateTextureAssetBundles", BindingFlags.NonPublic | BindingFlags.Static); + generateTextureAssetBundlesMethod?.Invoke(null, new object[] { false }); + + // reflection to get WXConvertCore.FirstBundlePath + String FirstBundlePath = ""; + var type = Type.GetType("WeChatWASM.WXConvertCore,WxEditor"); + if (type == null) + { + Debug.LogError("Type 'WeChatWASM.WXConvertCore,WxEditor' not found. "); + return; + } + FieldInfo fieldInfo = type.GetField("FirstBundlePath", BindingFlags.Public | BindingFlags.Static); + if (fieldInfo != null) + { + FirstBundlePath = fieldInfo.GetValue(null) as String; + } + + if (!string.IsNullOrEmpty(FirstBundlePath) && File.Exists(FirstBundlePath)) + { + Type igBuildPipelineType = Type.GetType("Unity.InstantGame.IGBuildPipeline,Unity.InstantGame.Editor"); + if (igBuildPipelineType == null) + { + Debug.LogError("Type 'Unity.InstantGame.IGBuildPipeline' not found. "); + return; + } + MethodInfo uploadMethod = igBuildPipelineType.GetMethod("UploadWeChatDataFile", BindingFlags.Public | BindingFlags.Static); + + bool returnValue = false; + if (uploadMethod != null) + { + object[] parameters = new object[] { FirstBundlePath }; + object result = uploadMethod.Invoke(null, parameters); + returnValue = Convert.ToBoolean(result); + } + + if (returnValue) + { + Debug.Log("转换完成并成功上传首包资源"); + } + else + { + Debug.LogError("首包资源上传失败,请检查网络以及Auto Streaming配置是否正确。"); + } + } + else + { + Debug.LogError("转换失败"); + } + } + + } +} +#endif diff --git a/Editor/BuildProfile/WeixinMiniGameSettings.cs.meta b/Editor/BuildProfile/WeixinMiniGameSettings.cs.meta new file mode 100644 index 000000000..fb8bfb838 --- /dev/null +++ b/Editor/BuildProfile/WeixinMiniGameSettings.cs.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 35f480205054085db3ceb2be04b7e97a +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Editor/BuildProfile/WeixinMiniGameSettingsEditor.cs b/Editor/BuildProfile/WeixinMiniGameSettingsEditor.cs new file mode 100644 index 000000000..74b04a5d0 --- /dev/null +++ b/Editor/BuildProfile/WeixinMiniGameSettingsEditor.cs @@ -0,0 +1,586 @@ +#if TUANJIE_1_4_OR_NEWER +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using UnityEditor; +using UnityEditor.Build.Profile; +using UnityEngine; +using static WeChatWASM.WXConvertCore; + +namespace WeChatWASM +{ + public class WeixinMiniGameSettingsEditor : MiniGameSettingsEditor + { + private Vector2 scrollRoot; + private bool foldBaseInfo = true; + private bool foldLoadingConfig = true; + private bool foldSDKOptions = true; + private bool foldDebugOptions = true; + + private bool foldInstantGame = false; + + private bool foldFontOptions = false; + private Dictionary formInputData = new Dictionary(); + private Dictionary formIntPopupData = new Dictionary(); + private Dictionary formCheckboxData = new Dictionary(); + public Texture tex; + + public override void OnMiniGameSettingsIMGUI(SerializedObject serializedObject, SerializedProperty miniGameProperty) + { + OnSettingsGUI(serializedObject, miniGameProperty); + } + + public void OnSettingsGUI(SerializedObject serializedObject, SerializedProperty miniGameProperty) + { + loadData(serializedObject, miniGameProperty); + + 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)); + + formInput("appid", "游戏AppID"); + formInput("cdn", "游戏资源CDN"); + formInput("projectName", "小游戏项目名"); + formIntPopup("orientation", "游戏方向", new[] { "Portrait", "Landscape", "LandscapeLeft", "LandscapeRight" }, new[] { 0, 1, 2, 3 }); + formInput("memorySize", "UnityHeap预留内存(?)", "单位MB,预分配内存值,超休闲游戏256/中轻度496/重度游戏768,需预估游戏最大UnityHeap值以防止内存自动扩容带来的峰值尖刺。预估方法请查看GIT文档《优化Unity WebGL的内存》"); + + EditorGUILayout.EndVertical(); + } + + foldLoadingConfig = EditorGUILayout.Foldout(foldLoadingConfig, "启动Loading配置"); + if (foldLoadingConfig) + { + EditorGUILayout.BeginVertical("frameBox", GUILayout.ExpandWidth(true)); + + GUILayout.BeginHorizontal(); + string targetBg = "bgImageSrc"; + EditorGUILayout.LabelField(string.Empty, GUILayout.Width(10)); + tex = (Texture)EditorGUILayout.ObjectField("启动背景图/视频封面", tex, typeof(Texture2D), false); + var currentBgSrc = AssetDatabase.GetAssetPath(tex); + if (!string.IsNullOrEmpty(currentBgSrc) && currentBgSrc != formInputData[targetBg]) + { + formInputData[targetBg] = currentBgSrc; + saveData(serializedObject, miniGameProperty); + } + GUILayout.EndHorizontal(); + + formInput("videoUrl", "加载阶段视频URL"); + formIntPopup("assetLoadType", "首包资源加载方式", new[] { "CDN", "小游戏包内" }, new[] { 0, 1 }); + formCheckbox("compressDataPackage", "压缩首包资源(?)", "将首包资源Brotli压缩, 降低资源大小. 注意: 首次启动耗时可能会增加200ms, 仅推荐使用小游戏分包加载时节省包体大小使用"); + formInput("bundleExcludeExtensions", "不自动缓存文件类型(?)", "(使用;分割)当请求url包含资源'cdn+StreamingAssets'时会自动缓存,但StreamingAssets目录下不是所有文件都需缓存,此选项配置不需要自动缓存的文件拓展名。默认值json"); + formInput("bundleHashLength", "Bundle名称Hash长度(?)", "自定义Bundle文件名中hash部分长度,默认值32,用于缓存控制。"); + formInput("preloadFiles", "预下载文件列表(?)", "使用;间隔,支持模糊匹配"); + + EditorGUILayout.EndVertical(); + } + + foldSDKOptions = EditorGUILayout.Foldout(foldSDKOptions, "SDK功能选项"); + if (foldSDKOptions) + { + EditorGUILayout.BeginVertical("frameBox", GUILayout.ExpandWidth(true)); + + formCheckbox("useFriendRelation", "使用好友关系链"); + formCheckbox("useMiniGameChat", "使用社交组件"); + formCheckbox("preloadWXFont", "预加载微信字体(?)", "在game.js执行开始时预载微信系统字体,运行期间可使用WX.GetWXFont获取微信字体"); + formCheckbox("disableMultiTouch", "禁止多点触控"); + + EditorGUILayout.EndVertical(); + } + + foldDebugOptions = EditorGUILayout.Foldout(foldDebugOptions, "调试编译选项"); + if (foldDebugOptions) + { + EditorGUILayout.BeginVertical("frameBox", GUILayout.ExpandWidth(true)); + // formCheckbox("developBuild", "Development Build"); + formCheckbox("autoProfile", "Auto connect Profiler"); + formCheckbox("scriptOnly", "Scripts Only Build"); +#if TUANJIE_2022_3_OR_NEWER + // TODO: if overwrite by OverwritePlayerSettings + bool UseIL2CPP = PlayerSettings.GetScriptingBackend(BuildTargetGroup.WeixinMiniGame) == ScriptingImplementation.IL2CPP; +#else + bool UseIL2CPP = true; +#endif + formCheckbox("il2CppOptimizeSize", "Il2Cpp Optimize Size(?)", "对应于Il2CppCodeGeneration选项,勾选时使用OptimizeSize(默认推荐),生成代码小15%左右,取消勾选则使用OptimizeSpeed。游戏中大量泛型集合的高频访问建议OptimizeSpeed,在使用HybridCLR等第三方组件时只能用OptimizeSpeed。(Dotnet Runtime模式下该选项无效)", !UseIL2CPP); + formCheckbox("profilingFuncs", "Profiling Funcs"); + formCheckbox("profilingMemory", "Profiling Memory"); + + formCheckbox("webgl2", "WebGL2.0(beta)"); + formCheckbox("iOSPerformancePlus", "iOSPerformancePlus(?)", "是否使用iOS高性能+渲染方案,有助于提升渲染兼容性、降低WebContent进程内存"); + formCheckbox("EmscriptenGLX", "EmscriptenGLX(?)", "是否使用EmscriptenGLX渲染方案"); + formCheckbox("iOSMetal", "iOSMetal(?)", "是否使用iOSMetal渲染方案,需要开启iOS高性能+模式,有助于提升运行性能,降低iOS功耗"); + formCheckbox("deleteStreamingAssets", "Clear Streaming Assets"); + formCheckbox("cleanBuild", "Clean WebGL Build"); + // formCheckbox("cleanCloudDev", "Clean Cloud Dev"); + formCheckbox("fbslim", "首包资源优化(?)", "导出时自动清理UnityEditor默认打包但游戏项目从未使用的资源,瘦身首包资源体积。(团结引擎已无需开启该能力)", UnityUtil.GetEngineVersion() > 0, (res) => + { + var fbWin = EditorWindow.GetWindow(typeof(WXFbSettingWindow), false, "首包资源优化配置面板", true); + fbWin.minSize = new Vector2(680, 350); + fbWin.Show(); + }); + formCheckbox("autoAdaptScreen", "自适应屏幕尺寸(?)", "移动端旋转屏幕和PC端拉伸窗口时,自动调整画布尺寸"); + formCheckbox("showMonitorSuggestModal", "显示优化建议弹窗"); + formCheckbox("enableProfileStats", "显示性能面板"); + formCheckbox("enableRenderAnalysis", "显示渲染日志(dev only)"); + + { + formCheckbox("brotliMT", "brotli多线程压缩(?)", "开启多线程压缩可以提高出包速度,但会降低压缩率。如若不使用wasm代码分包请勿用多线程出包上线"); + } + EditorGUILayout.EndVertical(); + } + + if (WXConvertCore.IsInstantGameAutoStreaming()) + { + foldInstantGame = EditorGUILayout.Foldout(foldInstantGame, "Instant Game - AutoStreaming"); + if (foldInstantGame) + { + var automaticfillinstantgame = miniGameProperty.FindPropertyRelative("m_AutomaticFillInstantGame"); + EditorGUILayout.BeginVertical("frameBox", GUILayout.ExpandWidth(true)); + GUILayout.BeginHorizontal(); + EditorGUILayout.LabelField(string.Empty, GUILayout.Width(10)); + formCheckbox("m_AutomaticFillInstantGame", "自动填写AutoStreaming", "仅在开启AutoStreaming生效"); + GUILayout.EndHorizontal(); + formInput("bundlePathIdentifier", "Bundle Path Identifier"); + formInput("dataFileSubPrefix", "Data File Sub Prefix"); + + EditorGUI.BeginDisabledGroup(true); + formCheckbox("autoUploadFirstBundle", "构建后自动上传首包(?)", "仅在开启AutoStreaming生效", true); + EditorGUI.EndDisabledGroup(); + + GUILayout.BeginHorizontal(); + EditorGUILayout.LabelField(string.Empty, GUILayout.Width(10)); + GUILayout.Label(new GUIContent("清理AS配置(?)", "如需关闭AutoStreaming选用默认发布方案则需要清理AS配置项目。"), GUILayout.Width(140)); + EditorGUI.BeginDisabledGroup(WXConvertCore.IsInstantGameAutoStreaming()); + if (GUILayout.Button(new GUIContent("恢复"), GUILayout.Width(60))) + { + var ProjectConf = miniGameProperty.FindPropertyRelative("ProjectConf"); + string identifier = ProjectConf.FindPropertyRelative("bundlePathIdentifier").stringValue; + string[] identifiers = identifier.Split(";"); + string idStr = ""; + foreach (string id in identifiers) + { + if (id != "AS" && id != "CUS/CustomAB") + { + idStr += id + ";"; + } + } + ProjectConf.FindPropertyRelative("bundlePathIdentifier").stringValue = idStr.Trim(';'); + + if (ProjectConf.FindPropertyRelative("dataFileSubPrefix").stringValue == "CUS") + { + ProjectConf.FindPropertyRelative("dataFileSubPrefix").stringValue = ""; + } + loadData(serializedObject, miniGameProperty); + } + EditorGUI.EndDisabledGroup(); + GUILayout.EndHorizontal(); + + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField(string.Empty); + if (GUILayout.Button(new GUIContent("了解Instant Game AutoStreaming", ""), linkStyle)) + { + Application.OpenURL("https://github.com/wechat-miniprogram/minigame-unity-webgl-transform/blob/main/Design/InstantGameGuide.md"); + } + EditorGUILayout.EndHorizontal(); + EditorGUILayout.EndVertical(); + } + } + + { + foldFontOptions = EditorGUILayout.Foldout(foldFontOptions, "字体配置"); + if (foldFontOptions) + { + EditorGUILayout.BeginVertical("frameBox", GUILayout.ExpandWidth(true)); + formCheckbox("CJK_Unified_Ideographs", "基本汉字(?)", "Unicode [0x4e00, 0x9fff]"); + formCheckbox("C0_Controls_and_Basic_Latin", "基本拉丁语(英文大小写、数字、英文标点)(?)", "Unicode [0x0, 0x7f]"); + formCheckbox("CJK_Symbols_and_Punctuation", "中文标点符号(?)", "Unicode [0x3000, 0x303f]"); + formCheckbox("General_Punctuation", "通用标点符号(?)", "Unicode [0x2000, 0x206f]"); + formCheckbox("Enclosed_CJK_Letters_and_Months", "CJK字母及月份(?)", "Unicode [0x3200, 0x32ff]"); + formCheckbox("Vertical_Forms", "中文竖排标点(?)", "Unicode [0xfe10, 0xfe1f]"); + formCheckbox("CJK_Compatibility_Forms", "CJK兼容符号(?)", "Unicode [0xfe30, 0xfe4f]"); + formCheckbox("Miscellaneous_Symbols", "杂项符号(?)", "Unicode [0x2600, 0x26ff]"); + formCheckbox("CJK_Compatibility", "CJK特殊符号(?)", "Unicode [0x3300, 0x33ff]"); + formCheckbox("Halfwidth_and_Fullwidth_Forms", "全角ASCII、全角中英文标点、半宽片假名、半宽平假名、半宽韩文字母(?)", "Unicode [0xff00, 0xffef]"); + formCheckbox("Dingbats", "装饰符号(?)", "Unicode [0x2700, 0x27bf]"); + formCheckbox("Letterlike_Symbols", "字母式符号(?)", "Unicode [0x2100, 0x214f]"); + formCheckbox("Enclosed_Alphanumerics", "带圈或括号的字母数字(?)", "Unicode [0x2460, 0x24ff]"); + formCheckbox("Number_Forms", "数字形式(?)", "Unicode [0x2150, 0x218f]"); + formCheckbox("Currency_Symbols", "货币符号(?)", "Unicode [0x20a0, 0x20cf]"); + formCheckbox("Arrows", "箭头(?)", "Unicode [0x2190, 0x21ff]"); + formCheckbox("Geometric_Shapes", "几何图形(?)", "Unicode [0x25a0, 0x25ff]"); + formCheckbox("Mathematical_Operators", "数学运算符号(?)", "Unicode [0x2200, 0x22ff]"); + formInput("CustomUnicode", "自定义Unicode(?)", "将填入的所有字符强制加入字体预加载列表"); + EditorGUILayout.EndVertical(); + } + } + + EditorGUILayout.EndScrollView(); + saveData(serializedObject, miniGameProperty); + } + + private void loadData(SerializedObject serializedObject, SerializedProperty miniGameProperty) + { + serializedObject.UpdateIfRequiredOrScript(); + var ProjectConf = miniGameProperty.FindPropertyRelative("ProjectConf"); + + // Instant Game + if (WXConvertCore.IsInstantGameAutoStreaming()) + { + var automaticfillinstantgame = miniGameProperty.FindPropertyRelative("m_AutomaticFillInstantGame"); + if (automaticfillinstantgame.boolValue) + { + ProjectConf.FindPropertyRelative("CDN").stringValue = WXConvertCore.GetInstantGameAutoStreamingCDN(); + if (!ProjectConf.FindPropertyRelative("bundlePathIdentifier").stringValue.Contains("AS;")) + { + ProjectConf.FindPropertyRelative("bundlePathIdentifier").stringValue += "AS;"; + } + if (!ProjectConf.FindPropertyRelative("bundlePathIdentifier").stringValue.Contains("CUS/CustomAB;")) + { + ProjectConf.FindPropertyRelative("bundlePathIdentifier").stringValue += "CUS/CustomAB;"; + } + ProjectConf.FindPropertyRelative("dataFileSubPrefix").stringValue = "CUS"; + } + } + + setData("projectName", ProjectConf.FindPropertyRelative("projectName").stringValue); + setData("appid", ProjectConf.FindPropertyRelative("Appid").stringValue); + setData("cdn", ProjectConf.FindPropertyRelative("CDN").stringValue); + setData("assetLoadType", ProjectConf.FindPropertyRelative("assetLoadType").intValue); + setData("compressDataPackage", ProjectConf.FindPropertyRelative("compressDataPackage").boolValue); + setData("videoUrl", ProjectConf.FindPropertyRelative("VideoUrl").stringValue); + setData("orientation", (int)ProjectConf.FindPropertyRelative("Orientation").enumValueIndex); + //setData("dst", ProjectConf.FindPropertyRelative("relativeDST").stringValue); + setData("bundleHashLength", ProjectConf.FindPropertyRelative("bundleHashLength").intValue.ToString()); + setData("bundlePathIdentifier", ProjectConf.FindPropertyRelative("bundlePathIdentifier").stringValue); + setData("bundleExcludeExtensions", ProjectConf.FindPropertyRelative("bundleExcludeExtensions").stringValue); + setData("preloadFiles", ProjectConf.FindPropertyRelative("preloadFiles").stringValue); + + var CompileOptions = miniGameProperty.FindPropertyRelative("CompileOptions"); + // setData("developBuild", CompileOptions.FindPropertyRelative("DevelopBuild").boolValue); + setData("autoProfile", CompileOptions.FindPropertyRelative("AutoProfile").boolValue); + setData("scriptOnly", CompileOptions.FindPropertyRelative("ScriptOnly").boolValue); + setData("il2CppOptimizeSize", CompileOptions.FindPropertyRelative("Il2CppOptimizeSize").boolValue); + setData("profilingFuncs", CompileOptions.FindPropertyRelative("profilingFuncs").boolValue); + setData("profilingMemory", CompileOptions.FindPropertyRelative("ProfilingMemory").boolValue); + setData("deleteStreamingAssets", CompileOptions.FindPropertyRelative("DeleteStreamingAssets").boolValue); + setData("cleanBuild", CompileOptions.FindPropertyRelative("CleanBuild").boolValue); + setData("customNodePath", CompileOptions.FindPropertyRelative("CustomNodePath").stringValue); + setData("webgl2", CompileOptions.FindPropertyRelative("Webgl2").boolValue); + setData("iOSPerformancePlus", CompileOptions.FindPropertyRelative("enableIOSPerformancePlus").boolValue); + setData("iOSMetal", CompileOptions.FindPropertyRelative("enableiOSMetal").boolValue); + setData("EmscriptenGLX", CompileOptions.FindPropertyRelative("enableEmscriptenGLX").boolValue); + setData("fbslim", CompileOptions.FindPropertyRelative("fbslim").boolValue); + + var SDKOptions = miniGameProperty.FindPropertyRelative("SDKOptions"); + setData("useFriendRelation", SDKOptions.FindPropertyRelative("UseFriendRelation").boolValue); + setData("useMiniGameChat", SDKOptions.FindPropertyRelative("UseMiniGameChat").boolValue); + setData("preloadWXFont", SDKOptions.FindPropertyRelative("PreloadWXFont").boolValue); + setData("disableMultiTouch", SDKOptions.FindPropertyRelative("disableMultiTouch").boolValue); + setData("bgImageSrc", ProjectConf.FindPropertyRelative("bgImageSrc").stringValue); + tex = AssetDatabase.LoadAssetAtPath(ProjectConf.FindPropertyRelative("bgImageSrc").stringValue); + setData("memorySize", ProjectConf.FindPropertyRelative("MemorySize").intValue.ToString()); + setData("hideAfterCallMain", ProjectConf.FindPropertyRelative("HideAfterCallMain").boolValue); + + setData("dataFileSubPrefix", ProjectConf.FindPropertyRelative("dataFileSubPrefix").stringValue); + setData("maxStorage", ProjectConf.FindPropertyRelative("maxStorage").intValue.ToString()); + setData("defaultReleaseSize", ProjectConf.FindPropertyRelative("defaultReleaseSize").intValue.ToString()); + setData("texturesHashLength", ProjectConf.FindPropertyRelative("texturesHashLength").intValue.ToString()); + setData("texturesPath", ProjectConf.FindPropertyRelative("texturesPath").stringValue); + setData("needCacheTextures", ProjectConf.FindPropertyRelative("needCacheTextures").boolValue); + setData("loadingBarWidth", ProjectConf.FindPropertyRelative("loadingBarWidth").intValue.ToString()); + setData("needCheckUpdate", ProjectConf.FindPropertyRelative("needCheckUpdate").boolValue); + setData("disableHighPerformanceFallback", ProjectConf.FindPropertyRelative("disableHighPerformanceFallback").boolValue); + setData("autoAdaptScreen", CompileOptions.FindPropertyRelative("autoAdaptScreen").boolValue); + setData("showMonitorSuggestModal", CompileOptions.FindPropertyRelative("showMonitorSuggestModal").boolValue); + setData("enableProfileStats", CompileOptions.FindPropertyRelative("enableProfileStats").boolValue); + setData("enableRenderAnalysis", CompileOptions.FindPropertyRelative("enableRenderAnalysis").boolValue); + setData("brotliMT", CompileOptions.FindPropertyRelative("brotliMT").boolValue); + setData("autoUploadFirstBundle", true); + setData("m_AutomaticFillInstantGame", miniGameProperty.FindPropertyRelative("m_AutomaticFillInstantGame").boolValue); + + // font options + var FontOptions = miniGameProperty.FindPropertyRelative("FontOptions"); + setData("CJK_Unified_Ideographs", FontOptions.FindPropertyRelative("CJK_Unified_Ideographs").boolValue); + setData("C0_Controls_and_Basic_Latin", FontOptions.FindPropertyRelative("C0_Controls_and_Basic_Latin").boolValue); + setData("CJK_Symbols_and_Punctuation", FontOptions.FindPropertyRelative("CJK_Symbols_and_Punctuation").boolValue); + setData("General_Punctuation", FontOptions.FindPropertyRelative("General_Punctuation").boolValue); + setData("Enclosed_CJK_Letters_and_Months", FontOptions.FindPropertyRelative("Enclosed_CJK_Letters_and_Months").boolValue); + setData("Vertical_Forms", FontOptions.FindPropertyRelative("Vertical_Forms").boolValue); + setData("CJK_Compatibility_Forms", FontOptions.FindPropertyRelative("CJK_Compatibility_Forms").boolValue); + setData("Miscellaneous_Symbols", FontOptions.FindPropertyRelative("Miscellaneous_Symbols").boolValue); + setData("CJK_Compatibility", FontOptions.FindPropertyRelative("CJK_Compatibility").boolValue); + setData("Halfwidth_and_Fullwidth_Forms", FontOptions.FindPropertyRelative("Halfwidth_and_Fullwidth_Forms").boolValue); + setData("Dingbats", FontOptions.FindPropertyRelative("Dingbats").boolValue); + setData("Letterlike_Symbols", FontOptions.FindPropertyRelative("Letterlike_Symbols").boolValue); + setData("Enclosed_Alphanumerics", FontOptions.FindPropertyRelative("Enclosed_Alphanumerics").boolValue); + setData("Number_Forms", FontOptions.FindPropertyRelative("Number_Forms").boolValue); + setData("Currency_Symbols", FontOptions.FindPropertyRelative("Currency_Symbols").boolValue); + setData("Arrows", FontOptions.FindPropertyRelative("Arrows").boolValue); + setData("Geometric_Shapes", FontOptions.FindPropertyRelative("Geometric_Shapes").boolValue); + setData("Mathematical_Operators", FontOptions.FindPropertyRelative("Mathematical_Operators").boolValue); + setData("CustomUnicode", FontOptions.FindPropertyRelative("CustomUnicode").stringValue); + } + + private void saveData(SerializedObject serializedObject, SerializedProperty miniGameProperty) + { + serializedObject.UpdateIfRequiredOrScript(); + + var ProjectConf = miniGameProperty.FindPropertyRelative("ProjectConf"); + ProjectConf.FindPropertyRelative("projectName").stringValue = getDataInput("projectName"); + ProjectConf.FindPropertyRelative("Appid").stringValue = getDataInput("appid"); + ProjectConf.FindPropertyRelative("CDN").stringValue = getDataInput("cdn"); + ProjectConf.FindPropertyRelative("assetLoadType").intValue = getDataPop("assetLoadType"); + ProjectConf.FindPropertyRelative("compressDataPackage").boolValue = getDataCheckbox("compressDataPackage"); + ProjectConf.FindPropertyRelative("VideoUrl").stringValue = getDataInput("videoUrl"); + ProjectConf.FindPropertyRelative("Orientation").enumValueIndex = getDataPop("orientation"); + ProjectConf.FindPropertyRelative("relativeDST").stringValue = serializedObject.FindProperty("m_BuildPath").stringValue; + ProjectConf.FindPropertyRelative("DST").stringValue = GetAbsolutePath(config.ProjectConf.relativeDST); + + ProjectConf.FindPropertyRelative("bundleHashLength").intValue = int.Parse(getDataInput("bundleHashLength")); + ProjectConf.FindPropertyRelative("bundlePathIdentifier").stringValue = getDataInput("bundlePathIdentifier"); + ProjectConf.FindPropertyRelative("bundleExcludeExtensions").stringValue = getDataInput("bundleExcludeExtensions"); + ProjectConf.FindPropertyRelative("preloadFiles").stringValue = getDataInput("preloadFiles"); + + var CompileOptions = miniGameProperty.FindPropertyRelative("CompileOptions"); + + CompileOptions.FindPropertyRelative("DevelopBuild").boolValue = serializedObject.FindProperty("m_PlatformSettings").FindPropertyRelative("m_Development").boolValue; + CompileOptions.FindPropertyRelative("AutoProfile").boolValue = getDataCheckbox("autoProfile"); + CompileOptions.FindPropertyRelative("ScriptOnly").boolValue = getDataCheckbox("scriptOnly"); + CompileOptions.FindPropertyRelative("Il2CppOptimizeSize").boolValue = getDataCheckbox("il2CppOptimizeSize"); + CompileOptions.FindPropertyRelative("profilingFuncs").boolValue = getDataCheckbox("profilingFuncs"); + CompileOptions.FindPropertyRelative("ProfilingMemory").boolValue = getDataCheckbox("profilingMemory"); + CompileOptions.FindPropertyRelative("DeleteStreamingAssets").boolValue = getDataCheckbox("deleteStreamingAssets"); + CompileOptions.FindPropertyRelative("CleanBuild").boolValue = getDataCheckbox("cleanBuild"); + CompileOptions.FindPropertyRelative("CustomNodePath").stringValue = getDataInput("customNodePath"); + CompileOptions.FindPropertyRelative("Webgl2").boolValue = getDataCheckbox("webgl2"); + CompileOptions.FindPropertyRelative("enableIOSPerformancePlus").boolValue = getDataCheckbox("iOSPerformancePlus"); + CompileOptions.FindPropertyRelative("enableiOSMetal").boolValue = getDataCheckbox("iOSMetal"); + CompileOptions.FindPropertyRelative("enableEmscriptenGLX").boolValue = getDataCheckbox("EmscriptenGLX"); + CompileOptions.FindPropertyRelative("fbslim").boolValue = getDataCheckbox("fbslim"); + + var SDKOptions = miniGameProperty.FindPropertyRelative("SDKOptions"); + SDKOptions.FindPropertyRelative("UseFriendRelation").boolValue = getDataCheckbox("useFriendRelation"); + SDKOptions.FindPropertyRelative("UseMiniGameChat").boolValue = getDataCheckbox("useMiniGameChat"); + SDKOptions.FindPropertyRelative("PreloadWXFont").boolValue = getDataCheckbox("preloadWXFont"); + SDKOptions.FindPropertyRelative("disableMultiTouch").boolValue = getDataCheckbox("disableMultiTouch"); + ProjectConf.FindPropertyRelative("bgImageSrc").stringValue = getDataInput("bgImageSrc"); + ProjectConf.FindPropertyRelative("MemorySize").intValue = int.Parse(getDataInput("memorySize")); + ProjectConf.FindPropertyRelative("HideAfterCallMain").boolValue = getDataCheckbox("hideAfterCallMain"); + ProjectConf.FindPropertyRelative("dataFileSubPrefix").stringValue = getDataInput("dataFileSubPrefix"); + ProjectConf.FindPropertyRelative("maxStorage").intValue = int.Parse(getDataInput("maxStorage")); + ProjectConf.FindPropertyRelative("defaultReleaseSize").intValue = int.Parse(getDataInput("defaultReleaseSize")); + ProjectConf.FindPropertyRelative("texturesHashLength").intValue = int.Parse(getDataInput("texturesHashLength")); + ProjectConf.FindPropertyRelative("texturesPath").stringValue = getDataInput("texturesPath"); + ProjectConf.FindPropertyRelative("needCacheTextures").boolValue = getDataCheckbox("needCacheTextures"); + ProjectConf.FindPropertyRelative("loadingBarWidth").intValue = int.Parse(getDataInput("loadingBarWidth")); + ProjectConf.FindPropertyRelative("needCheckUpdate").boolValue = getDataCheckbox("needCheckUpdate"); + ProjectConf.FindPropertyRelative("disableHighPerformanceFallback").boolValue = getDataCheckbox("disableHighPerformanceFallback"); + CompileOptions.FindPropertyRelative("autoAdaptScreen").boolValue = getDataCheckbox("autoAdaptScreen"); + CompileOptions.FindPropertyRelative("showMonitorSuggestModal").boolValue = getDataCheckbox("showMonitorSuggestModal"); + CompileOptions.FindPropertyRelative("enableProfileStats").boolValue = getDataCheckbox("enableProfileStats"); + CompileOptions.FindPropertyRelative("enableRenderAnalysis").boolValue = getDataCheckbox("enableRenderAnalysis"); + CompileOptions.FindPropertyRelative("brotliMT").boolValue = getDataCheckbox("brotliMT"); + + // font options + var FontOptions = miniGameProperty.FindPropertyRelative("FontOptions"); + FontOptions.FindPropertyRelative("CJK_Unified_Ideographs").boolValue = getDataCheckbox("CJK_Unified_Ideographs"); + FontOptions.FindPropertyRelative("C0_Controls_and_Basic_Latin").boolValue = getDataCheckbox("C0_Controls_and_Basic_Latin"); + FontOptions.FindPropertyRelative("CJK_Symbols_and_Punctuation").boolValue = getDataCheckbox("CJK_Symbols_and_Punctuation"); + FontOptions.FindPropertyRelative("General_Punctuation").boolValue = getDataCheckbox("General_Punctuation"); + FontOptions.FindPropertyRelative("Enclosed_CJK_Letters_and_Months").boolValue = getDataCheckbox("Enclosed_CJK_Letters_and_Months"); + FontOptions.FindPropertyRelative("Vertical_Forms").boolValue = getDataCheckbox("Vertical_Forms"); + FontOptions.FindPropertyRelative("CJK_Compatibility_Forms").boolValue = getDataCheckbox("CJK_Compatibility_Forms"); + FontOptions.FindPropertyRelative("Miscellaneous_Symbols").boolValue = getDataCheckbox("Miscellaneous_Symbols"); + FontOptions.FindPropertyRelative("CJK_Compatibility").boolValue = getDataCheckbox("CJK_Compatibility"); + FontOptions.FindPropertyRelative("Halfwidth_and_Fullwidth_Forms").boolValue = getDataCheckbox("Halfwidth_and_Fullwidth_Forms"); + FontOptions.FindPropertyRelative("Dingbats").boolValue = getDataCheckbox("Dingbats"); + FontOptions.FindPropertyRelative("Letterlike_Symbols").boolValue = getDataCheckbox("Letterlike_Symbols"); + FontOptions.FindPropertyRelative("Enclosed_Alphanumerics").boolValue = getDataCheckbox("Enclosed_Alphanumerics"); + FontOptions.FindPropertyRelative("Number_Forms").boolValue = getDataCheckbox("Number_Forms"); + FontOptions.FindPropertyRelative("Currency_Symbols").boolValue = getDataCheckbox("Currency_Symbols"); + FontOptions.FindPropertyRelative("Arrows").boolValue = getDataCheckbox("Arrows"); + FontOptions.FindPropertyRelative("Geometric_Shapes").boolValue = getDataCheckbox("Geometric_Shapes"); + FontOptions.FindPropertyRelative("Mathematical_Operators").boolValue = getDataCheckbox("Mathematical_Operators"); + FontOptions.FindPropertyRelative("CustomUnicode").stringValue = getDataInput("CustomUnicode"); + FontOptions.FindPropertyRelative("Arrows").boolValue = getDataCheckbox("Arrows"); + FontOptions.FindPropertyRelative("Geometric_Shapes").boolValue = getDataCheckbox("Geometric_Shapes"); + FontOptions.FindPropertyRelative("Mathematical_Operators").boolValue = getDataCheckbox("Mathematical_Operators"); + FontOptions.FindPropertyRelative("CustomUnicode").stringValue = getDataInput("CustomUnicode"); + + miniGameProperty.FindPropertyRelative("m_AutomaticFillInstantGame").boolValue = getDataCheckbox("m_AutomaticFillInstantGame"); + + serializedObject.ApplyModifiedProperties(); + } + + private bool getDataCheckbox(string target) + { + if (formCheckboxData.ContainsKey(target)) + return formCheckboxData[target]; + return false; + } + + private string getDataInput(string target) + { + if (formInputData.ContainsKey(target)) + return formInputData[target]; + return ""; + } + + private int getDataPop(string target) + { + if (formIntPopupData.ContainsKey(target)) + return formIntPopupData[target]; + return 0; + } + + 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 formCheckbox(string target, string label, string help = null, bool disable = false, Action setting = 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); + formCheckboxData[target] = EditorGUILayout.Toggle(disable ? false : formCheckboxData[target]); + + 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 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; + } + string projectRootPath = System.IO.Path.GetFullPath(Application.dataPath + "/../"); + return Path.Combine(projectRootPath, path); + } + } +} +#endif diff --git a/Editor/BuildProfile/WeixinMiniGameSettingsEditor.cs.meta b/Editor/BuildProfile/WeixinMiniGameSettingsEditor.cs.meta new file mode 100644 index 000000000..e15f7db37 --- /dev/null +++ b/Editor/BuildProfile/WeixinMiniGameSettingsEditor.cs.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: df4d545d2ba5ed176543212d06fd4afd +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Editor/BuildProfile/WeixinSubplatformInterface.cs b/Editor/BuildProfile/WeixinSubplatformInterface.cs new file mode 100644 index 000000000..d3dbd00cb --- /dev/null +++ b/Editor/BuildProfile/WeixinSubplatformInterface.cs @@ -0,0 +1,183 @@ +#if TUANJIE_1_4_OR_NEWER +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using UnityEditor; +using UnityEditor.Build.Profile; +using UnityEngine; +using UnityEngine.Rendering; + + +namespace WeChatWASM +{ + [InitializeOnLoad] + public static class WeixinSubTargetManager + { + static WeixinSubTargetManager() + { + MiniGameSubplatformManager.RegisterSubplatform(new WeixinSubplatformInterface()); + } + } + + public class WeixinSubplatformInterface : MiniGameSubplatformInterface + { + class CacheConfig + { + public WXProjectConf ProjectConf; + public SDKOptions SDKOptions; + public CompileOptions CompileOptions; + public CompressTexture CompressTexture; + public List PlayerPrefsKeys = new List(); + public FontOptions FontOptions; + } + + private CacheConfig cacheConfig = new CacheConfig(); + + public override string GetSubplatformName() + { + return "WeChat:微信小游戏"; + } + + public override MiniGameSettings GetSubplatformSettings() + { + return new WeixinMiniGameSettings(new WeixinMiniGameSettingsEditor()); + } + + public override BuildMiniGameError Build(BuildProfile buildProfile) + { + // Useless + return BuildMiniGameError.InvalidInput; + } + + public override BuildMiniGameError Build(BuildProfile buildProfile, BuildOptions options) + { + + var bcLibPath = Path.GetFullPath(Path.Combine("Packages", "com.qq.weixin.minigame", "Editor", "BuildProfile", "lib", "libwx-metal-cpp.bc")); + var jsLibPath = Path.GetFullPath(Path.Combine("Packages", "com.qq.weixin.minigame", "Editor", "BuildProfile", "lib", "mtl_library.jslib")); + string libPath = bcLibPath + ';' + jsLibPath; + EditorUtility.SetMiniGameGfxLibraryPath(libPath); + + WeixinMiniGameSettings settings = buildProfile.miniGameSettings as WeixinMiniGameSettings; + + BuildMiniGameError buildMiniGameError = BuildMiniGameError.Unknown; + bool preprocessSuccess = WechatBuildPreprocess(buildProfile); + if (!preprocessSuccess) + { + return BuildMiniGameError.InvalidInput; + } + + if (settings is not null) + { + settings.FillAutoStreamingAutomatically(); + if (settings.PreprocessBuild(buildProfile, options)) + { + + var error = CallDoExport(buildProfile); + int enumIntValue = Convert.ToInt32(error); + switch (enumIntValue) + { + case 0: // SUCCEED + { + WeixinMiniGameSettings.AutoStreamingLoad(); + buildMiniGameError = BuildMiniGameError.Succeeded; + break; + } + case 2: // BUILD_WEBGL_FAILED + { + buildMiniGameError = BuildMiniGameError.PlayerBuildFailed; + break; + } + case 1: // NODE_NOT_FOUND + default: + { + buildMiniGameError = BuildMiniGameError.Unknown; + break; + } + } + } + } + BuildPostProcess(buildProfile); + return buildMiniGameError; + } + + private bool WechatBuildPreprocess(BuildProfile buildProfile) + { + // Check GFX API and Color Space + if (buildProfile != null) + { + PlayerSettings playerSettings = buildProfile.playerSettings; + // Global PlayerSettings + ColorSpace colorSpace = PlayerSettings.colorSpace; + GraphicsDeviceType[] apis = PlayerSettings.GetGraphicsAPIs(buildProfile.buildTarget); + bool isAutomatic = PlayerSettings.GetUseDefaultGraphicsAPIs(buildProfile.buildTarget); + + if (playerSettings != null) + { + // BuildProfile PlayerSettings Override + colorSpace = PlayerSettings.GetColorSpace_Internal(playerSettings); + apis = PlayerSettings.GetGraphicsAPIs_Internal(playerSettings, buildProfile.buildTarget); + isAutomatic = PlayerSettings.GetUseDefaultGraphicsAPIs_Internal(playerSettings, buildProfile.buildTarget); + + // set override templatePath + var absolutePath = Path.GetFullPath(Path.Combine("Packages", "com.qq.weixin.minigame", "WebGLTemplates/WXTemplate2022TJ")); + if (!Directory.Exists(absolutePath)) + absolutePath = Path.GetFullPath(Path.Combine(Application.dataPath, "WebGLTemplates/WXTemplate2022TJ")); + + if (Directory.Exists(absolutePath)) + PlayerSettings.MiniGame.SetTemplatePath_Internal(playerSettings, $"PATH:{absolutePath}"); + + PlayerSettings.MiniGame.SetThreadsSupport_Internal(playerSettings, false); + PlayerSettings.MiniGame.SetCompressionFormat_Internal(playerSettings, MiniGameCompressionFormat.Disabled); + PlayerSettings.MiniGame.SetLinkerTarget_Internal(playerSettings, MiniGameLinkerTarget.Wasm); + PlayerSettings.MiniGame.SetDataCaching_Internal(playerSettings, false); + PlayerSettings.MiniGame.SetDebugSymbolMode_Internal(playerSettings, MiniGameDebugSymbolMode.External); + PlayerSettings.SetRunInBackground_Internal(playerSettings, false); + } + return true; + } + else + { + throw new InvalidOperationException("Build profile has not been initialized."); + } + } + + private WXConvertCore.WXExportError CallDoExport(BuildProfile buildProfile) + { + WXEditorScriptObject config = UnityUtil.GetEditorConf(); + cacheConfig.ProjectConf = config.ProjectConf; + cacheConfig.SDKOptions = config.SDKOptions; + cacheConfig.CompileOptions = config.CompileOptions; + cacheConfig.CompressTexture = config.CompressTexture; + cacheConfig.PlayerPrefsKeys = config.PlayerPrefsKeys; + cacheConfig.FontOptions = config.FontOptions; + + WeixinMiniGameSettings weixinSettings = buildProfile.miniGameSettings as WeixinMiniGameSettings; + config.ProjectConf = weixinSettings.ProjectConf; + config.SDKOptions = weixinSettings.SDKOptions; + config.CompileOptions = weixinSettings.CompileOptions; + config.CompressTexture = weixinSettings.CompressTexture; + config.PlayerPrefsKeys = weixinSettings.PlayerPrefsKeys; + config.FontOptions = weixinSettings.FontOptions; + EditorUtility.SetDirty(config); + AssetDatabase.SaveAssets(); + return WXConvertCore.DoExport(); + } + + private void BuildPostProcess(BuildProfile buildProfile) + { + // Restore the original settings + WXEditorScriptObject config = UnityUtil.GetEditorConf(); + config.ProjectConf = cacheConfig.ProjectConf; + config.SDKOptions = cacheConfig.SDKOptions; + config.CompileOptions = cacheConfig.CompileOptions; + config.CompressTexture = cacheConfig.CompressTexture; + config.PlayerPrefsKeys = cacheConfig.PlayerPrefsKeys; + config.FontOptions = cacheConfig.FontOptions; + EditorUtility.SetDirty(config); + AssetDatabase.SaveAssets(); + } + + } +} +#endif diff --git a/Editor/BuildProfile/WeixinSubplatformInterface.cs.meta b/Editor/BuildProfile/WeixinSubplatformInterface.cs.meta new file mode 100644 index 000000000..67130b0d1 --- /dev/null +++ b/Editor/BuildProfile/WeixinSubplatformInterface.cs.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0b4df61ea34a9bc4c89a8e8b93455bd6 +DefaultImporter: +externalObjects: {} +userData: +assetBundleName: +assetBundleVariant: \ No newline at end of file diff --git a/Editor/BuildProfile/lib/libwx-metal-cpp.bc b/Editor/BuildProfile/lib/libwx-metal-cpp.bc index d8b6c6577..2a8e5683e 100644 Binary files a/Editor/BuildProfile/lib/libwx-metal-cpp.bc and b/Editor/BuildProfile/lib/libwx-metal-cpp.bc differ diff --git a/Editor/WXConvertCore.cs b/Editor/WXConvertCore.cs index 0f2033df1..b43838284 100644 --- a/Editor/WXConvertCore.cs +++ b/Editor/WXConvertCore.cs @@ -221,6 +221,9 @@ namespace WeChatWASM { var rootPath = Directory.GetParent(Application.dataPath).FullName; string webglDir = WXExtEnvDef.GETDEF("WEIXINMINIGAME") ? "WeixinMiniGame" : "WebGL"; +#if PLATFORM_PLAYABLEADS + webglDir = "PlayableAds"; +#endif symFile1 = Path.Combine(rootPath, "Library", "Bee", "artifacts", webglDir, "build", "debug_WebGL_wasm", "build.js.symbols"); } WeChatWASM.UnityUtil.preprocessSymbols(symFile1, GetWebGLSymbolPath()); @@ -346,7 +349,9 @@ namespace WeChatWASM { // WxPerfJsBridge.jslib var wxPerfJSBridgeImporter = AssetImporter.GetAtPath(wxPerfPlugins[0]) as PluginImporter; -#if PLATFORM_WEIXINMINIGAME +#if PLATFORM_PLAYABLEADS + wxPerfJSBridgeImporter.SetCompatibleWithPlatform(BuildTarget.PlayableAds, config.CompileOptions.enablePerfAnalysis); +#elif PLATFORM_WEIXINMINIGAME wxPerfJSBridgeImporter.SetCompatibleWithPlatform(BuildTarget.WeixinMiniGame, config.CompileOptions.enablePerfAnalysis); #else wxPerfJSBridgeImporter.SetCompatibleWithPlatform(BuildTarget.WebGL, config.CompileOptions.enablePerfAnalysis); @@ -359,7 +364,10 @@ namespace WeChatWASM bool bShouldEnablePerf2022Plugin = config.CompileOptions.enablePerfAnalysis && IsCompatibleWithUnity202203OrNewer(); var wxPerf2022Importer = AssetImporter.GetAtPath(wxPerfPlugins[1]) as PluginImporter; -#if PLATFORM_WEIXINMINIGAME + +#if PLATFORM_PLAYABLEADS + wxPerf2022Importer.SetCompatibleWithPlatform(BuildTarget.PlayableAds, bShouldEnablePerf2022Plugin); +#elif PLATFORM_WEIXINMINIGAME wxPerf2022Importer.SetCompatibleWithPlatform(BuildTarget.WeixinMiniGame, bShouldEnablePerf2022Plugin); #else wxPerf2022Importer.SetCompatibleWithPlatform(BuildTarget.WebGL, bShouldEnablePerf2022Plugin); @@ -372,7 +380,9 @@ namespace WeChatWASM bool bShouldEnablePerf2021Plugin = config.CompileOptions.enablePerfAnalysis && IsCompatibleWithUnity202102To202203(); var wxPerf2021Importer = AssetImporter.GetAtPath(wxPerfPlugins[2]) as PluginImporter; -#if PLATFORM_WEIXINMINIGAME +#if PLATFORM_PLAYABLEADS + wxPerf2021Importer.SetCompatibleWithPlatform(BuildTarget.PlayableAds, bShouldEnablePerf2021Plugin); +#elif PLATFORM_WEIXINMINIGAME wxPerf2021Importer.SetCompatibleWithPlatform(BuildTarget.WeixinMiniGame, bShouldEnablePerf2021Plugin); #else wxPerf2021Importer.SetCompatibleWithPlatform(BuildTarget.WebGL, bShouldEnablePerf2021Plugin); @@ -572,7 +582,9 @@ namespace WeChatWASM Debug.LogError("Lua Adaptor Importer Not Found: " + maybeBuildFile); continue; } -#if PLATFORM_WEIXINMINIGAME +#if PLATFORM_PLAYABLEADS + wxPerfJSBridgeImporter.SetCompatibleWithPlatform(BuildTarget.PlayableAds, shouldBuild); +#elif PLATFORM_WEIXINMINIGAME wxPerfJSBridgeImporter.SetCompatibleWithPlatform(BuildTarget.WeixinMiniGame, shouldBuild); #else wxPerfJSBridgeImporter.SetCompatibleWithPlatform(BuildTarget.WebGL, shouldBuild); @@ -622,7 +634,12 @@ namespace WeChatWASM else { #if TUANJIE_2022_3_OR_NEWER - EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.WeixinMiniGame, BuildTarget.WeixinMiniGame); + if(EditorUserBuildSettings.activeBuildTarget != BuildTarget.WeixinMiniGame +#if PLATFORM_PLAYABLEADS + && EditorUserBuildSettings.activeBuildTarget != BuildTarget.PlayableAds +#endif + ) + EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.WeixinMiniGame, BuildTarget.WeixinMiniGame); #endif } Emit(LifeCycle.afterSwitchActiveBuildTarget); @@ -1095,7 +1112,11 @@ namespace WeChatWASM } #endif #if TUANJIE_2022_3_OR_NEWER - if (EditorUserBuildSettings.activeBuildTarget != BuildTarget.WeixinMiniGame) + if (EditorUserBuildSettings.activeBuildTarget != BuildTarget.WeixinMiniGame +#if PLATFORM_PLAYABLEADS + && EditorUserBuildSettings.activeBuildTarget != BuildTarget.PlayableAds +#endif + ) { UnityEngine.Debug.LogFormat("[Builder] Current target is: {0}, switching to: {1}", EditorUserBuildSettings.activeBuildTarget, BuildTarget.WeixinMiniGame); if (!EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.WeixinMiniGame, BuildTarget.WeixinMiniGame)) @@ -1106,8 +1127,11 @@ namespace WeChatWASM } var projDir = Path.Combine(config.ProjectConf.DST, webglDir); - +#if PLATFORM_PLAYABLEADS + var result = BuildPipeline.BuildPlayer(GetScenePaths(), projDir, BuildTarget.PlayableAds, option); +#else var result = BuildPipeline.BuildPlayer(GetScenePaths(), projDir, BuildTarget.WeixinMiniGame, option); +#endif if (result.summary.result != UnityEditor.Build.Reporting.BuildResult.Succeeded) { UnityEngine.Debug.LogFormat("[Builder] BuildPlayer failed. emscriptenArgs:{0}", PlayerSettings.WeixinMiniGame.emscriptenArgs); @@ -2246,7 +2270,9 @@ namespace WeChatWASM { var importer = AssetImporter.GetAtPath(jsLibs[i]) as PluginImporter; bool value = i == index; -#if PLATFORM_WEIXINMINIGAME +#if PLATFORM_PLAYABLEADS + importer.SetCompatibleWithPlatform(BuildTarget.PlayableAds, value); +#elif PLATFORM_WEIXINMINIGAME importer.SetCompatibleWithPlatform(BuildTarget.WeixinMiniGame, value); #else importer.SetCompatibleWithPlatform(BuildTarget.WebGL, value); diff --git a/Editor/WXEditorSettingHelper.cs b/Editor/WXEditorSettingHelper.cs index 21ccfe2d2..c6f91baae 100644 --- a/Editor/WXEditorSettingHelper.cs +++ b/Editor/WXEditorSettingHelper.cs @@ -186,7 +186,7 @@ namespace WeChatWASM this.formCheckbox("webgl2", "WebGL2.0"); this.formCheckbox("iOSPerformancePlus", "iOSPerformancePlus(?)", "是否使用iOS高性能+渲染方案,有助于提升渲染兼容性、降低WebContent进程内存"); this.formCheckbox("EmscriptenGLX", "EmscriptenGLX(?)", "是否使用EmscriptenGLX渲染方案"); - // this.formCheckbox("iOSMetal", "iOSMetal(?)", "是否使用iOSMetal渲染方案,需要开启iOS高性能+模式,有助于提升运行性能,降低iOS功耗"); + this.formCheckbox("iOSMetal", "iOSMetal(?)", "是否使用iOSMetal渲染方案,需要开启iOS高性能+模式,有助于提升运行性能,降低iOS功耗"); this.formCheckbox("deleteStreamingAssets", "Clear Streaming Assets"); this.formCheckbox("cleanBuild", "Clean WebGL Build"); // this.formCheckbox("cleanCloudDev", "Clean Cloud Dev"); diff --git a/Editor/WXPluginVersion.cs b/Editor/WXPluginVersion.cs index 9f4575455..161a984c4 100644 --- a/Editor/WXPluginVersion.cs +++ b/Editor/WXPluginVersion.cs @@ -2,7 +2,7 @@ namespace WeChatWASM { public class WXPluginVersion { - public static string pluginVersion = "202509160800"; // 这一行不要改他,导出的时候会自动替换 + public static string pluginVersion = "202511060320"; // 这一行不要改他,导出的时候会自动替换 } public class WXPluginConf diff --git a/Editor/wx-editor.dll b/Editor/wx-editor.dll index 53a65c708..e85b35661 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 2cfd0e4e4..fd2889759 100644 --- a/Editor/wx-editor.xml.meta +++ b/Editor/wx-editor.xml.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 785f17acd70f11683ea185abb2b70992 +guid: 5bba64a2af3ae03ed7d8fb9f9afb45bc DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/DisableKeyboardInput.cs b/Runtime/DisableKeyboardInput.cs index fa300352b..a0cc2330e 100644 --- a/Runtime/DisableKeyboardInput.cs +++ b/Runtime/DisableKeyboardInput.cs @@ -10,7 +10,9 @@ internal class DisableKeyboardInput : MonoBehaviour private static void OnGameLaunch() { #if !UNITY_EDITOR -#if PLATFORM_WEIXINMINIGAME +#if PLATFORM_PLAYABLEADS + PlayableAdsInput.mobileKeyboardSupport = false; +#elif PLATFORM_WEIXINMINIGAME WeixinMiniGameInput.mobileKeyboardSupport = false; #elif PLATFORM_WEBGL #if UNITY_2022_1_OR_NEWER diff --git a/Runtime/Plugins/SDK-Call-JS-Old.jslib b/Runtime/Plugins/SDK-Call-JS-Old.jslib index b22e40206..09d9ec303 100755 --- a/Runtime/Plugins/SDK-Call-JS-Old.jslib +++ b/Runtime/Plugins/SDK-Call-JS-Old.jslib @@ -627,9 +627,6 @@ mergeInto(LibraryManager.library, { stringToUTF8(returnStr, buffer, bufferSize); return buffer; }, - WXSetSyncReadCacheEnabled: function(enabled) { - window.WXWASMSDK.WXSetSyncReadCacheEnabled(enabled); - }, WXGetPluginCachePath: function() { var returnStr = window.WXWASMSDK.WXGetPluginCachePath(); var bufferSize = lengthBytesUTF8(returnStr || '') + 1; diff --git a/Runtime/Plugins/WXAssetBundle.jslib b/Runtime/Plugins/WXAssetBundle.jslib index 9dadd9368..30fa916c2 100644 --- a/Runtime/Plugins/WXAssetBundle.jslib +++ b/Runtime/Plugins/WXAssetBundle.jslib @@ -51,6 +51,7 @@ var WXAssetBundleLibrary = { WXFS.msg = ""; WXFS.fd2wxStream = new Map; WXFS.path2fd = new Map; + WXFS.refRecord = new Map; WXFS.fs = wx.getFileSystemManager(); WXFS.nowfd = FS.MAX_OPEN_FDS + 1; WXFS.isWXAssetBundle = function(url){ @@ -308,6 +309,9 @@ var WXAssetBundleLibrary = { } if(!WXFS.disk.has(path)){ WXFS.disk.set(path, 0); + WXFS.refRecord.set(path, 1); + } else { + WXFS.refRecord.set(path, WXFS.refRecord.get(path) + 1); } return true; }, @@ -315,11 +319,17 @@ var WXAssetBundleLibrary = { UnloadbyPath: function (ptr) { var path = WXFS.url2path(UTF8ToString(ptr)); var fd = WXFS.path2fd.get(path); - if(WXFS.cache.has(fd)){ - WXFS.cache.delete(fd); - } - if(WXFS.disk.has(path)){ - WXFS.disk.delete(path); + var refCount = WXFS.refRecord.get(path); + if(!refCount) return; + refCount -= 1; + WXFS.refRecord.set(path, refCount); + if(!refCount){ + if(WXFS.cache.has(fd)){ + WXFS.cache.delete(fd); + } + if(WXFS.disk.has(path)){ + WXFS.disk.delete(path); + } } }, diff --git a/Runtime/Plugins/libemscriptenglx.a b/Runtime/Plugins/libemscriptenglx.a index 772e45021..30c9ac8d6 100644 Binary files a/Runtime/Plugins/libemscriptenglx.a and b/Runtime/Plugins/libemscriptenglx.a differ diff --git a/Runtime/Plugins/libemscriptenglx_2021.a b/Runtime/Plugins/libemscriptenglx_2021.a index 2bec41e32..145e16a5f 100644 Binary files a/Runtime/Plugins/libemscriptenglx_2021.a and b/Runtime/Plugins/libemscriptenglx_2021.a differ diff --git a/Runtime/Plugins/wx-perf.dll b/Runtime/Plugins/wx-perf.dll index a8a67c6da..262522ce8 100644 Binary files a/Runtime/Plugins/wx-perf.dll and b/Runtime/Plugins/wx-perf.dll differ diff --git a/Runtime/Plugins/wx-perf.dll.meta b/Runtime/Plugins/wx-perf.dll.meta index 01f86625f..99b128da8 100644 --- a/Runtime/Plugins/wx-perf.dll.meta +++ b/Runtime/Plugins/wx-perf.dll.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ffcf22f69c45d4919a04626e60e86c20 +guid: f0cbdcf50f6d52cea758f1ea825443c0 PluginImporter: externalObjects: {} serializedVersion: 2 @@ -7,21 +7,68 @@ PluginImporter: executionOrder: {} defineConstraints: [] isPreloaded: 0 - isOverridable: 0 + isOverridable: 1 isExplicitlyReferenced: 0 validateReferences: 1 platformData: + - first: + : Any + second: + enabled: 0 + settings: + Exclude Editor: 0 + Exclude Linux64: 1 + Exclude OSXUniversal: 1 + Exclude WebGL: 0 + Exclude Win: 1 + Exclude Win64: 1 - first: Any: second: - enabled: 1 + enabled: 0 settings: {} - first: Editor: Editor + second: + enabled: 1 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Standalone: Linux64 second: enabled: 0 settings: - DefaultValueInitialized: true + CPU: None + - first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: None + - first: + WebGL: WebGL + second: + enabled: 1 + settings: {} + - first: + WeixinMiniGame: WeixinMiniGame + second: + enabled: 1 + settings: {} - first: Windows Store Apps: WindowsStoreApps second: diff --git a/Runtime/Plugins/wx-runtime-editor.dll b/Runtime/Plugins/wx-runtime-editor.dll index c063355aa..4ad5fe6e0 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 2f1482e27..64b02fa45 100644 --- a/Runtime/Plugins/wx-runtime-editor.xml +++ b/Runtime/Plugins/wx-runtime-editor.xml @@ -3119,6 +3119,17 @@  是否结束 + + + 错误码,文档可见 https://developers.weixin.qq.com/minigame/dev/api/open-api/openlink/wx.createPageManager.html + + + + + 错误信息 + + + 从不同渠道获得的OPENLINK字符串 @@ -3139,6 +3150,12 @@ 选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填 + + + 结果对象的json字符串,各项为实验的相关信息 + + + 错误信息 @@ -3589,6 +3606,26 @@ 宽度,单位:px + + + 通知组件信息 + + + + + 组件的布局位置信息 + + + + + 组件是否显示 + + + + + 组件的名称 + + 当前占用的空间大小, 单位 KB @@ -3911,7 +3948,7 @@ - 是否开启 profile,默认开启。开启后可在接口回调的 res.profile 中查看性能调试信息。 + 是否开启 profile。iOS 和 Android 端默认开启,其他端暂不支持。开启后可在接口回调的 res.profile 中查看性能调试信息。 @@ -3937,12 +3974,6 @@ 超时时间,单位为毫秒,默认值为 60000 即一分钟。 - - - 需要基础库: `3.4.1` - 使用高性能模式,暂仅支持 Android,默认关闭。该模式下有更优的网络性能表现。 - - 错误信息 @@ -3956,7 +3987,7 @@ 需要基础库: `2.10.4` - 网络请求过程中一些调试信息,[查看详细说明](https://developers.weixin.qq.com/miniprogram/dev/framework/performance/network.html) + 网络请求过程中一些调试信息,[查看详细说明](https://developers.weixin.qq.com/miniprogram/dev/framework/performance/network.html)。目前 iOS 和 Android 端支持。 @@ -3991,12 +4022,12 @@ - DNS 域名查询完成的时间,如果使用了本地缓存(即无 DNS 查询)或持久连接,则与 fetchStart 值相等 + Local DNS 域名查询完成的时间,如果使用了本地缓存(即无 DNS 查询)或持久连接,则与 fetchStart 值相等 - DNS 域名查询开始的时间,如果使用了本地缓存(即无 DNS 查询)或持久连接,则与 fetchStart 值相等 + Local DNS 域名查询开始的时间,如果使用了本地缓存(即无 DNS 查询)或持久连接,则与 fetchStart 值相等 @@ -4014,11 +4045,29 @@ 组件准备好使用 HTTP 请求抓取资源的时间,这发生在检查本地缓存之前 + + + 需要基础库: `3.8.9` + httpDNS 完成查询的时间。仅当开启 httpDNS 功能时返回该字段。目前仅wx.request接口支持 + + + + + 需要基础库: `3.8.9` + httpDNS 开始查询的时间。仅当开启 httpDNS 功能时返回该字段。目前仅wx.request接口支持 + + 协议层根据多个请求评估当前网络的 rtt(仅供参考) + + + 需要基础库: `3.8.10` + 调用接口的时间。 + + 当前请求的IP @@ -4034,6 +4083,18 @@ 使用协议类型,有效值:http1.1, h2, quic, unknown + + + 需要基础库: `3.8.10` + 结束排队的时间。达到并行上限时才需要排队。如果未发生排队,则该字段和 queueStart 字段值相同 + + + + + 需要基础库: `3.8.10` + 开始排队的时间。达到并行上限时才需要排队。 + + 收到字节数 @@ -5534,6 +5595,26 @@ 预告状态:0可用 1取消 2已用 + + + 敏感数据对应的云 ID,开通[云开发](https://developers.weixin.qq.com/minigame/dev/wxcloud/basis/getting-started.html)的小程序才会返回,可通过云调用直接获取开放数据,详细见[云调用直接获取开放数据](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html#method-cloud) + + + + + 包括敏感数据在内的完整转发信息的加密数据,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html) + + + + + 错误信息 + + + + + 加密算法的初始向量,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html) + + 剪贴板的内容 @@ -5619,6 +5700,11 @@ 使用 sha1( rawData + sessionkey ) 得到字符串,用于校验用户信息 + + + 实验参数数组,不填则获取所有实验参数 + + 需要基础库: `3.7.8` @@ -5670,6 +5756,56 @@ 加密算法的初始向量,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html) + + + 需要获取的群用户的 groupOpenId 列表 + + + + + 所选用户的头像昵称列表 + + + + + 用户头像图片 url + + + + + 用户所在城市 + + + + + 用户所在国家 + + + + + 用户性别 + + + + + 显示 country province city 所用的语言 + + + + + 用户昵称 + + + + + 用户 openId + + + + + 用户所在省份 + + AI推理引擎版本 @@ -5805,17 +5941,6 @@ - itemSettings 只返回用户勾选过订阅面板中的“总是保持以上选择,不再询问”的订阅消息。 - - - shareTicket,详见[获取更多转发信息](#) - - - - - 需要基础库: `1.9.90` - 超时时间,单位 ms - - 封面广告组件展示状态码 @@ -6103,12 +6228,12 @@ 超时时间,单位ms - + 错误信息 - + 需要基础库: `2.24.0` errno 错误码,错误码的详细说明参考 [Errno错误码](https://developers.weixin.qq.com/minigame/dev/guide/runtime/debug/PublicErrno.html) @@ -6155,7 +6280,7 @@ - 需要传递给目标小程序的数据,目标小程序可在 `App.onLaunch`,`App.onShow` 中获取到这份数据。如果跳转的是小游戏,可以在 [wx.onShow](https://developers.weixin.qq.com/minigame/dev/api/base/app/life-cycle/wx.onShow.html)、[wx.getLaunchOptionsSync](https://developers.weixin.qq.com/minigame/dev/api/base/app/life-cycle/wx.getLaunchOptionsSync.html) 中可以获取到这份数据数据。 + 需要传递给目标小程序的数据,目标小程序可在 `App.onLaunch`,`App.onShow` 中获取到这份数据。如果跳转的是小游戏,可以在 [wx.onShow](https://developers.weixin.qq.com/minigame/dev/api/base/app/life-cycle/wx.onShow.html)、[wx.getLaunchOptionsSync](https://developers.weixin.qq.com/minigame/dev/api/base/app/life-cycle/wx.getLaunchOptionsSync.html) 中可以获取到这份数据。 @@ -6201,6 +6326,25 @@ 设置特征订阅类型,有效值有 `notification` 和 `indication` + + + + 需要提醒的用户 group_openid 列表 + + + + + 文字链标题,发送的内容将由微信拼接为:@的成员列表+“请完成:”/"请参与:"+打开小程序的文字链,如「@alex @cindy 请完成:团建报名统计」。 + + + + + 展示的动词 + 可选值: + - 'participate': 请参与; + - 'complete': 请完成; + + X 轴 @@ -6366,14 +6510,9 @@ - 'landscapeReverse': 横屏反方向,以 HOME 键在屏幕左侧为反方向; - + - 错误 - - - - - 错误调用堆栈 + 错误信息,包含堆栈 @@ -6498,6 +6637,11 @@ 当前是否处于弱网状态 + + + 全部组件的信息 + + 录屏状态 @@ -6691,6 +6835,14 @@ 变化后的窗口宽度,单位 px + + + 改变的窗口状态,可能的值为: + - 'minimize':窗口最小化 + - 'normalize':窗口恢复正常尺寸 + - 'maximize':窗口最大化 + + 需要基础库: `2.10.0` @@ -6721,6 +6873,11 @@ 视频号 id,以“sph”开头的id,可在视频号助手获取 + + + 视频号的Feed的nonceId,必填 + + 活动 id @@ -6751,6 +6908,21 @@ 视频号 id + + + 群聊类型 + 可选值: + - 1: 微信联系人单聊; + - 2: 企业微信联系人单聊; + - 3: 普通微信群聊; + - 4: 企业微信互通群聊; + + + + + 聊天室 id,不传则拉起群选择框,可以传入多聊群的 opengid 值,或者单聊群的 open_single_roomid 值 + + 企业ID @@ -7147,26 +7319,6 @@ | -10073015 | | 索要功能不可用 | - - - 敏感数据对应的云 ID,开通[云开发](https://developers.weixin.qq.com/minigame/dev/wxcloud/basis/getting-started.html)的小程序才会返回,可通过云调用直接获取开放数据,详细见[云调用直接获取开放数据](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html#method-cloud) - - - - - 包括敏感数据在内的完整转发信息的加密数据,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html) - - - - - 错误信息 - - - - - 加密算法的初始向量,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html) - - 币种 @@ -7426,6 +7578,16 @@ - 'CODE_25': 一维码; + + + 最多可选人数 + + + + + 所选用户在此聊天室下的唯一标识,同一个用户在不同的聊天室下id不同 + + 蓝牙设备 id @@ -7559,6 +7721,66 @@ 是否转发到当前群。该参数只对从群工具栏打开的场景下生效,默认转发到当前群,填入false时可转发到其他会话。 + + + 转发标题 + + + + + 自定义图片路径,支持PNG及JPG,显示图片长宽比是 5:4,默认使用截图 + + + + + + 要分享的表情地址,必须为本地路径或临时路径 + + + + + + 分享的表情消息是否要带小程序入口 + + + + + 要分享的图片地址,必须为本地路径或临时路径 + + + + + + 分享的图片消息是否要带小程序入口 + + + + + 要分享的文本内容 + + + + + + 分享的表情消息是否要带小程序入口 + + + + + 要分享的视频地址,必须为本地路径或临时路径 + + + + + + 分享的图片消息是否要带小程序入口 + + + + + 缩略图路径,若留空则使用视频首帧 + + 按钮的文字数组,数组长度最大为 6 @@ -7601,6 +7823,14 @@ 键盘输入框显示的默认值 + + + 键盘类型,默认为文本类型,客户端8.0.57以上支持数字键盘 + 可选值: + - 'text': 文本; + - 'number': 数字; + + 键盘中文本的最大长度 diff --git a/Runtime/Plugins/wx-runtime-editor.xml.meta b/Runtime/Plugins/wx-runtime-editor.xml.meta index 35f46a811..946c87d61 100644 --- a/Runtime/Plugins/wx-runtime-editor.xml.meta +++ b/Runtime/Plugins/wx-runtime-editor.xml.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 49ec059ae4f60346d43bd805e5cbef1b +guid: e53a27d96c1b4009114242d85f330058 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/Plugins/wx-runtime.dll b/Runtime/Plugins/wx-runtime.dll index c43e152a3..8e1677944 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 482a88a22..1838a1584 100644 --- a/Runtime/Plugins/wx-runtime.xml +++ b/Runtime/Plugins/wx-runtime.xml @@ -3125,6 +3125,17 @@  是否结束 + + + 错误码,文档可见 https://developers.weixin.qq.com/minigame/dev/api/open-api/openlink/wx.createPageManager.html + + + + + 错误信息 + + + 从不同渠道获得的OPENLINK字符串 @@ -3145,6 +3156,12 @@ 选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填 + + + 结果对象的json字符串,各项为实验的相关信息 + + + 错误信息 @@ -3595,6 +3612,26 @@ 宽度,单位:px + + + 通知组件信息 + + + + + 组件的布局位置信息 + + + + + 组件是否显示 + + + + + 组件的名称 + + 当前占用的空间大小, 单位 KB @@ -3917,7 +3954,7 @@ - 是否开启 profile,默认开启。开启后可在接口回调的 res.profile 中查看性能调试信息。 + 是否开启 profile。iOS 和 Android 端默认开启,其他端暂不支持。开启后可在接口回调的 res.profile 中查看性能调试信息。 @@ -3943,12 +3980,6 @@ 超时时间,单位为毫秒,默认值为 60000 即一分钟。 - - - 需要基础库: `3.4.1` - 使用高性能模式,暂仅支持 Android,默认关闭。该模式下有更优的网络性能表现。 - - 错误信息 @@ -3962,7 +3993,7 @@ 需要基础库: `2.10.4` - 网络请求过程中一些调试信息,[查看详细说明](https://developers.weixin.qq.com/miniprogram/dev/framework/performance/network.html) + 网络请求过程中一些调试信息,[查看详细说明](https://developers.weixin.qq.com/miniprogram/dev/framework/performance/network.html)。目前 iOS 和 Android 端支持。 @@ -3997,12 +4028,12 @@ - DNS 域名查询完成的时间,如果使用了本地缓存(即无 DNS 查询)或持久连接,则与 fetchStart 值相等 + Local DNS 域名查询完成的时间,如果使用了本地缓存(即无 DNS 查询)或持久连接,则与 fetchStart 值相等 - DNS 域名查询开始的时间,如果使用了本地缓存(即无 DNS 查询)或持久连接,则与 fetchStart 值相等 + Local DNS 域名查询开始的时间,如果使用了本地缓存(即无 DNS 查询)或持久连接,则与 fetchStart 值相等 @@ -4020,11 +4051,29 @@ 组件准备好使用 HTTP 请求抓取资源的时间,这发生在检查本地缓存之前 + + + 需要基础库: `3.8.9` + httpDNS 完成查询的时间。仅当开启 httpDNS 功能时返回该字段。目前仅wx.request接口支持 + + + + + 需要基础库: `3.8.9` + httpDNS 开始查询的时间。仅当开启 httpDNS 功能时返回该字段。目前仅wx.request接口支持 + + 协议层根据多个请求评估当前网络的 rtt(仅供参考) + + + 需要基础库: `3.8.10` + 调用接口的时间。 + + 当前请求的IP @@ -4040,6 +4089,18 @@ 使用协议类型,有效值:http1.1, h2, quic, unknown + + + 需要基础库: `3.8.10` + 结束排队的时间。达到并行上限时才需要排队。如果未发生排队,则该字段和 queueStart 字段值相同 + + + + + 需要基础库: `3.8.10` + 开始排队的时间。达到并行上限时才需要排队。 + + 收到字节数 @@ -5540,6 +5601,26 @@ 预告状态:0可用 1取消 2已用 + + + 敏感数据对应的云 ID,开通[云开发](https://developers.weixin.qq.com/minigame/dev/wxcloud/basis/getting-started.html)的小程序才会返回,可通过云调用直接获取开放数据,详细见[云调用直接获取开放数据](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html#method-cloud) + + + + + 包括敏感数据在内的完整转发信息的加密数据,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html) + + + + + 错误信息 + + + + + 加密算法的初始向量,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html) + + 剪贴板的内容 @@ -5625,6 +5706,11 @@ 使用 sha1( rawData + sessionkey ) 得到字符串,用于校验用户信息 + + + 实验参数数组,不填则获取所有实验参数 + + 需要基础库: `3.7.8` @@ -5676,6 +5762,56 @@ 加密算法的初始向量,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html) + + + 需要获取的群用户的 groupOpenId 列表 + + + + + 所选用户的头像昵称列表 + + + + + 用户头像图片 url + + + + + 用户所在城市 + + + + + 用户所在国家 + + + + + 用户性别 + + + + + 显示 country province city 所用的语言 + + + + + 用户昵称 + + + + + 用户 openId + + + + + 用户所在省份 + + AI推理引擎版本 @@ -5811,17 +5947,6 @@ - itemSettings 只返回用户勾选过订阅面板中的“总是保持以上选择,不再询问”的订阅消息。 - - - shareTicket,详见[获取更多转发信息](#) - - - - - 需要基础库: `1.9.90` - 超时时间,单位 ms - - 封面广告组件展示状态码 @@ -6109,12 +6234,12 @@ 超时时间,单位ms - + 错误信息 - + 需要基础库: `2.24.0` errno 错误码,错误码的详细说明参考 [Errno错误码](https://developers.weixin.qq.com/minigame/dev/guide/runtime/debug/PublicErrno.html) @@ -6161,7 +6286,7 @@ - 需要传递给目标小程序的数据,目标小程序可在 `App.onLaunch`,`App.onShow` 中获取到这份数据。如果跳转的是小游戏,可以在 [wx.onShow](https://developers.weixin.qq.com/minigame/dev/api/base/app/life-cycle/wx.onShow.html)、[wx.getLaunchOptionsSync](https://developers.weixin.qq.com/minigame/dev/api/base/app/life-cycle/wx.getLaunchOptionsSync.html) 中可以获取到这份数据数据。 + 需要传递给目标小程序的数据,目标小程序可在 `App.onLaunch`,`App.onShow` 中获取到这份数据。如果跳转的是小游戏,可以在 [wx.onShow](https://developers.weixin.qq.com/minigame/dev/api/base/app/life-cycle/wx.onShow.html)、[wx.getLaunchOptionsSync](https://developers.weixin.qq.com/minigame/dev/api/base/app/life-cycle/wx.getLaunchOptionsSync.html) 中可以获取到这份数据。 @@ -6207,6 +6332,25 @@ 设置特征订阅类型,有效值有 `notification` 和 `indication` + + + + 需要提醒的用户 group_openid 列表 + + + + + 文字链标题,发送的内容将由微信拼接为:@的成员列表+“请完成:”/"请参与:"+打开小程序的文字链,如「@alex @cindy 请完成:团建报名统计」。 + + + + + 展示的动词 + 可选值: + - 'participate': 请参与; + - 'complete': 请完成; + + X 轴 @@ -6372,14 +6516,9 @@ - 'landscapeReverse': 横屏反方向,以 HOME 键在屏幕左侧为反方向; - + - 错误 - - - - - 错误调用堆栈 + 错误信息,包含堆栈 @@ -6504,6 +6643,11 @@ 当前是否处于弱网状态 + + + 全部组件的信息 + + 录屏状态 @@ -6697,6 +6841,14 @@ 变化后的窗口宽度,单位 px + + + 改变的窗口状态,可能的值为: + - 'minimize':窗口最小化 + - 'normalize':窗口恢复正常尺寸 + - 'maximize':窗口最大化 + + 需要基础库: `2.10.0` @@ -6727,6 +6879,11 @@ 视频号 id,以“sph”开头的id,可在视频号助手获取 + + + 视频号的Feed的nonceId,必填 + + 活动 id @@ -6757,6 +6914,21 @@ 视频号 id + + + 群聊类型 + 可选值: + - 1: 微信联系人单聊; + - 2: 企业微信联系人单聊; + - 3: 普通微信群聊; + - 4: 企业微信互通群聊; + + + + + 聊天室 id,不传则拉起群选择框,可以传入多聊群的 opengid 值,或者单聊群的 open_single_roomid 值 + + 企业ID @@ -7153,26 +7325,6 @@ | -10073015 | | 索要功能不可用 | - - - 敏感数据对应的云 ID,开通[云开发](https://developers.weixin.qq.com/minigame/dev/wxcloud/basis/getting-started.html)的小程序才会返回,可通过云调用直接获取开放数据,详细见[云调用直接获取开放数据](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html#method-cloud) - - - - - 包括敏感数据在内的完整转发信息的加密数据,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html) - - - - - 错误信息 - - - - - 加密算法的初始向量,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html) - - 币种 @@ -7432,6 +7584,16 @@ - 'CODE_25': 一维码; + + + 最多可选人数 + + + + + 所选用户在此聊天室下的唯一标识,同一个用户在不同的聊天室下id不同 + + 蓝牙设备 id @@ -7565,6 +7727,66 @@ 是否转发到当前群。该参数只对从群工具栏打开的场景下生效,默认转发到当前群,填入false时可转发到其他会话。 + + + 转发标题 + + + + + 自定义图片路径,支持PNG及JPG,显示图片长宽比是 5:4,默认使用截图 + + + + + + 要分享的表情地址,必须为本地路径或临时路径 + + + + + + 分享的表情消息是否要带小程序入口 + + + + + 要分享的图片地址,必须为本地路径或临时路径 + + + + + + 分享的图片消息是否要带小程序入口 + + + + + 要分享的文本内容 + + + + + + 分享的表情消息是否要带小程序入口 + + + + + 要分享的视频地址,必须为本地路径或临时路径 + + + + + + 分享的图片消息是否要带小程序入口 + + + + + 缩略图路径,若留空则使用视频首帧 + + 按钮的文字数组,数组长度最大为 6 @@ -7607,6 +7829,14 @@ 键盘输入框显示的默认值 + + + 键盘类型,默认为文本类型,客户端8.0.57以上支持数字键盘 + 可选值: + - 'text': 文本; + - 'number': 数字; + + 键盘中文本的最大长度 diff --git a/Runtime/Plugins/wx-runtime.xml.meta b/Runtime/Plugins/wx-runtime.xml.meta index dec5f11a0..9485738ea 100644 --- a/Runtime/Plugins/wx-runtime.xml.meta +++ b/Runtime/Plugins/wx-runtime.xml.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 93451de6b6c6c97c35d7801ca242aada +guid: 9e449187876a0efb6fc12897588a6b11 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/WX.cs b/Runtime/WX.cs index 9261cb09f..0049afc2d 100644 --- a/Runtime/WX.cs +++ b/Runtime/WX.cs @@ -276,6 +276,16 @@ namespace WeChatWASM WXSDKManagerHandler.Instance.CreateBLEPeripheralServer(callback); } + /// + /// [wx.exitChatTool(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.exitChatTool.html) + /// 需要基础库: `3.7.12` + /// 退出聊天工具模式 + /// + public static void ExitChatTool(ExitChatToolOption callback) + { + WXSDKManagerHandler.Instance.ExitChatTool(callback); + } + /// /// [wx.exitMiniProgram(Object object)](https://developers.weixin.qq.com/minigame/dev/api/navigate/wx.exitMiniProgram.html) /// 需要基础库: `2.17.3` @@ -511,6 +521,45 @@ namespace WeChatWASM WXSDKManagerHandler.Instance.GetChannelsLiveNoticeInfo(callback); } + /// + /// [wx.getChatToolInfo(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.getChatToolInfo.html) + /// 需要基础库: `3.7.12` + /// 获取聊天工具模式下的群聊信息。 + /// 需要注意的是,单聊群和多聊群下返回的群唯一标识是不同的。 + /// 1. 多聊群下返回 opengid + /// 2. 单聊群下返回 open_single_roomid + /// 同时将返回用户在群(含单聊)下的唯一标识 group_openid。 + /// **示例代码** + /// ```js + /// wx.getChatToolInfo({ + /// success(res) { + /// // res + /// { + /// errMsg: 'getChatToolInfo:ok', + /// encryptedData: '', + /// iv: '' + /// } + /// }, + /// fail() { + /// } + /// }) + /// ``` + /// 敏感数据有两种获取方式,一是使用 [加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html#加密数据解密算法) 。 + /// 获取得到的开放数据为以下 json 结构(其中 opengid 为当前群的唯一标识): + /// ```json + /// { + /// "opengid": "OPENGID", // 多聊群下返回的群唯一标识 + /// "open_single_roomid": "", // 单聊群下返回的群唯一标识 + /// "group_openid": "", // 用户在当前群的唯一标识 + /// "chat_type": 3, // 聊天室类型 + /// } + /// ``` + /// + public static void GetChatToolInfo(GetChatToolInfoOption callback) + { + WXSDKManagerHandler.Instance.GetChatToolInfo(callback); + } + /// /// [wx.getClipboardData(Object object)](https://developers.weixin.qq.com/minigame/dev/api/device/clipboard/wx.getClipboardData.html) /// 需要基础库: `1.1.0` @@ -641,6 +690,16 @@ namespace WeChatWASM WXSDKManagerHandler.Instance.GetGameClubData(callback); } + /// + /// [wx.getGameExptInfo(Object object)](https://developers.weixin.qq.com/minigame/dev/api/data-analysis/wx.getGameExptInfo.html) + /// 需要基础库: `3.8.8` + /// 给定实验参数数组,获取对应的实验参数值 + /// + public static void GetGameExptInfo(GetGameExptInfoOption callback) + { + WXSDKManagerHandler.Instance.GetGameExptInfo(callback); + } + /// /// [wx.getGroupEnterInfo(Object object)](https://developers.weixin.qq.com/minigame/dev/api/open-api/group/wx.getGroupEnterInfo.html) /// 需要基础库: `2.10.4` @@ -683,6 +742,16 @@ namespace WeChatWASM WXSDKManagerHandler.Instance.GetGroupEnterInfo(callback); } + /// + /// [wx.getGroupMembersInfo(Object object)](https://developers.weixin.qq.com/minigame/dev/api/open-api/data/wx.getGroupMembersInfo.html) + /// 需要基础库: `3.7.12` + /// 获取所选群成员的头像、昵称,自行在开放数据域中渲染 + /// + public static void GetGroupMembersInfo(GetGroupMembersInfoOption callback) + { + WXSDKManagerHandler.Instance.GetGroupMembersInfo(callback); + } + /// /// [wx.getInferenceEnvInfo(Object object)](https://developers.weixin.qq.com/minigame/dev/api/ai/inference/wx.getInferenceEnvInfo.html) /// 需要基础库: `2.30.1` @@ -847,27 +916,6 @@ namespace WeChatWASM WXSDKManagerHandler.Instance.GetSetting(callback); } - /// - /// [wx.getShareInfo(Object object)](https://developers.weixin.qq.com/minigame/dev/api/share/wx.getShareInfo.html) - /// 需要基础库: `1.1.0` - /// 获取转发详细信息(主要是获取群ID)。 从群聊内的小程序消息卡片打开小程序时,调用此接口才有效。从基础库 v2.17.3 开始,推荐用 [wx.getGroupEnterInfo](https://developers.weixin.qq.com/minigame/dev/api/open-api/group/wx.getGroupEnterInfo.html) 替代此接口。 - /// **示例代码** - /// 敏感数据获取方式 [加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html#加密数据解密算法) 。 - /// 获取得到的开放数据为以下 json 结构(其中 openGId 为当前群的唯一标识): - /// ```json - /// { - /// "openGId": "OPENGID" - /// } - /// ``` - /// **Tips** - /// - 如需要展示群名称,小程序可以使用 [开放数据组件](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/open-data.html) - /// - 小游戏可以通过 [`wx.getGroupInfo`](https://developers.weixin.qq.com/minigame/dev/api/open-api/data/wx.getGroupInfo.html) 接口获取群名称 - /// - public static void GetShareInfo(GetShareInfoOption callback) - { - WXSDKManagerHandler.Instance.GetShareInfo(callback); - } - /// /// [wx.getShowSplashAdStatus(Object object)](https://developers.weixin.qq.com/minigame/dev/api/ad/wx.getShowSplashAdStatus.html) /// 需要基础库: `3.7.8` @@ -1272,6 +1320,16 @@ namespace WeChatWASM WXSDKManagerHandler.Instance.NotifyBLECharacteristicValueChange(callback); } + /// + /// [wx.notifyGroupMembers(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.notifyGroupMembers.html) + /// 需要基础库: `3.7.12` + /// 提醒用户完成任务,标题长度不超过 30 个字符,支持中英文和数字,中文算2个字符。 + /// + public static void NotifyGroupMembers(NotifyGroupMembersOption callback) + { + WXSDKManagerHandler.Instance.NotifyGroupMembers(callback); + } + /// /// [wx.openAppAuthorizeSetting(Object object)](https://developers.weixin.qq.com/minigame/dev/api/base/system/wx.openAppAuthorizeSetting.html) /// 需要基础库: `2.25.3` @@ -1383,6 +1441,19 @@ namespace WeChatWASM WXSDKManagerHandler.Instance.OpenChannelsUserProfile(callback); } + /// + /// [wx.openChatTool(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.openChatTool.html) + /// 需要基础库: `3.7.12` + /// 进入聊天工具模式。 + /// 1. 不传入聊天室id时,微信会拉起聊天列表让用户选择,用户选择后绑定聊天室进入聊天工具模式。 + /// 2. 传入聊天室id时(群聊为opengid,单聊为open_single_roomid),会直接绑定该聊天室进入,此时必须传入对应的 chatType。 + /// 3. 聊天室类型可从 [[getGroupEnterInfo]](https://developers.weixin.qq.com/minigame/dev/api/open-api/group/wx.getGroupEnterInfo.html) 返回值中获取。 + /// + public static void OpenChatTool(OpenChatToolOption callback) + { + WXSDKManagerHandler.Instance.OpenChatTool(callback); + } + /// /// [wx.openCustomerServiceChat(Object object)](https://developers.weixin.qq.com/minigame/dev/api/open-api/service-chat/wx.openCustomerServiceChat.html) /// 需要基础库: `2.30.4` @@ -1906,6 +1977,25 @@ namespace WeChatWASM WXSDKManagerHandler.Instance.ScanCode(callback); } + /// + /// [wx.selectGroupMembers(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.selectGroupMembers.html) + /// 需要基础库: `3.7.12` + /// 选择聊天室的成员,并返回选择成员的 group_openid。若当前为群聊,则会拉起成员选择器;若当前为单聊,则直接返回双方的 group_openid。 + /// **** + /// ```js + /// wx.selectGroupMembers({ + /// maxSelectCount: 3, + /// success(res) { + /// // res.members + /// } + /// }) + /// ``` + /// + public static void SelectGroupMembers(SelectGroupMembersOption callback) + { + WXSDKManagerHandler.Instance.SelectGroupMembers(callback); + } + /// /// [wx.setBLEMTU(Object object)](https://developers.weixin.qq.com/minigame/dev/api/device/bluetooth-ble/wx.setBLEMTU.html) /// 需要基础库: `2.11.0` @@ -2068,6 +2158,56 @@ namespace WeChatWASM WXSDKManagerHandler.Instance.SetVisualEffectOnCapture(callback); } + /// + /// [wx.shareAppMessageToGroup(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.shareAppMessageToGroup.html) + /// 需要基础库: `3.7.12` + /// 转发小程序卡片到聊天 + /// + public static void ShareAppMessageToGroup(ShareAppMessageToGroupOption callback) + { + WXSDKManagerHandler.Instance.ShareAppMessageToGroup(callback); + } + + /// + /// [wx.shareEmojiToGroup(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.shareEmojiToGroup.html) + /// 需要基础库: `3.7.12` + /// 转发表情到聊天 + /// + public static void ShareEmojiToGroup(ShareEmojiToGroupOption callback) + { + WXSDKManagerHandler.Instance.ShareEmojiToGroup(callback); + } + + /// + /// [wx.shareImageToGroup(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.shareImageToGroup.html) + /// 需要基础库: `3.7.12` + /// 转发图片到聊天 + /// + public static void ShareImageToGroup(ShareImageToGroupOption callback) + { + WXSDKManagerHandler.Instance.ShareImageToGroup(callback); + } + + /// + /// [wx.shareTextToGroup(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.shareTextToGroup.html) + /// 需要基础库: `3.7.12` + /// 转发文本到聊天 + /// + public static void ShareTextToGroup(ShareTextToGroupOption callback) + { + WXSDKManagerHandler.Instance.ShareTextToGroup(callback); + } + + /// + /// [wx.shareVideoToGroup(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.shareVideoToGroup.html) + /// 需要基础库: `3.7.12` + /// 转发视频到聊天 + /// + public static void ShareVideoToGroup(ShareVideoToGroupOption callback) + { + WXSDKManagerHandler.Instance.ShareVideoToGroup(callback); + } + /// /// [wx.showActionSheet(Object object)](https://developers.weixin.qq.com/minigame/dev/api/ui/interaction/wx.showActionSheet.html) /// 显示操作菜单 @@ -2578,6 +2718,16 @@ namespace WeChatWASM WXSDKManagerHandler.Instance.ExitPointerLock(); } + /// + /// [wx.isChatTool()](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.isChatTool.html) + /// 需要基础库: `3.7.12` + /// 是否处于聊天工具模式 + /// + public static void IsChatTool() + { + WXSDKManagerHandler.Instance.IsChatTool(); + } + /// /// [wx.removeStorageSync(string key)](https://developers.weixin.qq.com/minigame/dev/api/storage/wx.removeStorageSync.html) /// [wx.removeStorage](https://developers.weixin.qq.com/minigame/dev/api/storage/wx.removeStorage.html) 的同步版本 @@ -2667,23 +2817,6 @@ namespace WeChatWASM WXSDKManagerHandler.Instance.RevokeBufferURL(url); } - /// - /// [wx.setStorageSync(string key, any data)](https://developers.weixin.qq.com/minigame/dev/api/storage/wx.setStorageSync.html) - /// 将数据存储在本地缓存中指定的 key 中。会覆盖掉原来该 key 对应的内容。除非用户主动删除或因存储空间原因被系统清理,否则数据都一直可用。单个 key 允许存储的最大数据长度为 1MB,所有数据存储上限为 10MB。 - /// **注意** - /// storage 应只用来进行数据的持久化存储,不应用于运行时的数据传递或全局状态管理。启动过程中过多的同步读写存储,会显著影响启动耗时。 - /// **示例代码** - /// ```js - /// try { - /// wx.setStorageSync('key', 'value') - /// } catch (e) { } - /// ``` - /// - public static void SetStorageSync(string key, T data) - { - WXSDKManagerHandler.Instance.SetStorageSync(key, data); - } - /// /// [wx.shareAppMessage(Object object)](https://developers.weixin.qq.com/minigame/dev/api/share/wx.shareAppMessage.html) /// 主动拉起转发,进入选择通讯录界面。 @@ -2992,12 +3125,12 @@ namespace WeChatWASM /// [wx.onError(function listener)](https://developers.weixin.qq.com/minigame/dev/api/base/app/app-event/wx.onError.html) /// 监听全局错误事件 /// - public static void OnError(Action error) + public static void OnError(Action error) { WXSDKManagerHandler.Instance.OnError(error); } - public static void OffError(Action error) + public static void OffError(Action error) { WXSDKManagerHandler.Instance.OffError(error); } @@ -3274,6 +3407,28 @@ namespace WeChatWASM WXSDKManagerHandler.Instance.OffNetworkWeakChange(result); } + /// + /// [wx.onOfficialComponentsInfoChange(function listener)](https://developers.weixin.qq.com/minigame/dev/api/ui/menu/wx.onOfficialComponentsInfoChange.html) + /// 需要基础库: `3.7.12` + /// 监听官方组件信息变化事件 + /// **示例代码** + /// ```js + /// const callback = res => console.log('officialComponentsInfoChange', res) + /// wx.onOfficialComponentsInfoChange(callback) + /// // 取消监听 + /// wx.offOfficialComponentsInfoChange(callback) + /// ``` + /// + public static void OnOfficialComponentsInfoChange(Action result) + { + WXSDKManagerHandler.Instance.OnOfficialComponentsInfoChange(result); + } + + public static void OffOfficialComponentsInfoChange(Action result) + { + WXSDKManagerHandler.Instance.OffOfficialComponentsInfoChange(result); + } + /// /// [wx.onScreenRecordingStateChanged(function listener)](https://developers.weixin.qq.com/minigame/dev/api/device/screen/wx.onScreenRecordingStateChanged.html) /// 需要基础库: `3.1.4` @@ -3455,10 +3610,25 @@ namespace WeChatWASM WXSDKManagerHandler.Instance.OffWindowResize(result); } + /// + /// [wx.onWindowStateChange(function listener)](https://developers.weixin.qq.com/minigame/dev/api/ui/window/wx.onWindowStateChange.html) + /// 需要基础库: `3.8.8` + /// 监听小程序窗口状态变化事件。仅适用于 PC 平台 + /// + public static void OnWindowStateChange(Action result) + { + WXSDKManagerHandler.Instance.OnWindowStateChange(result); + } + + public static void OffWindowStateChange(Action result) + { + WXSDKManagerHandler.Instance.OffWindowStateChange(result); + } + /// /// [wx.onAddToFavorites(function listener)](https://developers.weixin.qq.com/minigame/dev/api/share/wx.onAddToFavorites.html) /// 需要基础库: `2.10.3` - /// 监听用户点击菜单「收藏」按钮时触发的事件(安卓7.0.15起支持,iOS 暂不支持) + /// 监听用户点击菜单「收藏」按钮时触发的事件 /// public static void OnAddToFavorites(Action> callback) { @@ -3769,6 +3939,30 @@ namespace WeChatWASM return WXSDKManagerHandler.GetMenuButtonBoundingClientRect(); } + /// + /// [Object wx.getOfficialComponentsInfo()](https://developers.weixin.qq.com/minigame/dev/api/ui/menu/wx.getOfficialComponentsInfo.html) + /// 需要基础库: `3.7.12` + /// 获取所有官方组件的相关信息 + /// **示例代码** + /// ```js + /// const componentsInfo = wx.getOfficialComponentsInfo(); + /// const { notificationComponentInfo } = componentsInfo; + /// if (notificationComponentInfo.isShow) { + /// console.log(notificationComponentInfo.boundingClientRect.width); + /// console.log(notificationComponentInfo.boundingClientRect.height); + /// console.log(notificationComponentInfo.boundingClientRect.top); + /// console.log(notificationComponentInfo.boundingClientRect.left); + /// console.log(notificationComponentInfo.boundingClientRect.bottom); + /// console.log(notificationComponentInfo.boundingClientRect.right); + /// } + /// ``` + /// + /// + public static OfficialComponentsInfo GetOfficialComponentsInfo() + { + return WXSDKManagerHandler.GetOfficialComponentsInfo(); + } + /// /// [Object wx.getStorageInfoSync()](https://developers.weixin.qq.com/minigame/dev/api/storage/wx.getStorageInfoSync.html) /// [wx.getStorageInfo](https://developers.weixin.qq.com/minigame/dev/api/storage/wx.getStorageInfo.html) 的同步版本 diff --git a/Runtime/WXBase.cs b/Runtime/WXBase.cs index 2ff47d7ab..836dd9d00 100644 --- a/Runtime/WXBase.cs +++ b/Runtime/WXBase.cs @@ -766,16 +766,6 @@ namespace WeChatWASM return WXSDKManagerHandler.Instance.GetCachePath(url); } - /// - /// 临时修复安卓在主线程繁忙时,异步读缓存耗时高,但需关注同步读文件可能导致掉帧 - /// 仅在有需要的情况下主动开启,需要同步读的场景完成后再主动关闭 - /// - /// - public static void SetSyncReadCacheEnabled(bool enabled) - { - WXSDKManagerHandler.Instance.SetSyncReadCacheEnabled(enabled); - } - #endregion /// @@ -1147,6 +1137,7 @@ namespace WeChatWASM } #endregion +#region PageManager /// /// [[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` @@ -1172,6 +1163,22 @@ namespace WeChatWASM { return WXSDKManagerHandler.Instance.CreatePageManager(); } +#endregion + +#region 上报 + /// + public static WXMiniReportManager GetMiniReportManager(GetMiniReportManagerParam param) + { + return WXSDKManagerHandler.Instance.GetMiniReportManager(param); + } +#endregion + +#region 社交特色能力 + public static WXRankManager GetRankManager() { + return WXSDKManagerHandler.Instance.GetRankManager(); + } } } +#endregion + #endif diff --git a/Runtime/WXTouchInputOverride.cs b/Runtime/WXTouchInputOverride.cs index dc7ca2b6d..82a963b51 100644 --- a/Runtime/WXTouchInputOverride.cs +++ b/Runtime/WXTouchInputOverride.cs @@ -149,7 +149,9 @@ public class WXTouchInputOverride : BaseInput Text text = selectedObject.GetComponent(); if (text != null) { -#if PLATFORM_WEIXINMINIGAME +#if PLATFORM_PLAYABLEADS + PlayableAdsInput.mobileKeyboardSupport = true; +#elif PLATFORM_WEIXINMINIGAME WeixinMiniGameInput.mobileKeyboardSupport = true; #elif PLATFORM_WEBGL #if UNITY_2022_1_OR_NEWER @@ -159,7 +161,9 @@ public class WXTouchInputOverride : BaseInput } else { -#if PLATFORM_WEIXINMINIGAME +#if PLATFORM_PLAYABLEADS + PlayableAdsInput.mobileKeyboardSupport = false; +#elif PLATFORM_WEIXINMINIGAME WeixinMiniGameInput.mobileKeyboardSupport = false; #elif PLATFORM_WEBGL #if UNITY_2022_1_OR_NEWER diff --git a/Runtime/playable-default/check-version.js.meta b/Runtime/playable-default/check-version.js.meta index 0899dc7d5..d79c69982 100644 --- a/Runtime/playable-default/check-version.js.meta +++ b/Runtime/playable-default/check-version.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 2612d39a2adf9a6014127cd39e6b3407 + guid: 41885bcfe9ea3a1a326785a3542266f4 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/data-package.meta b/Runtime/playable-default/data-package.meta index d8186dff9..665dab2be 100644 --- a/Runtime/playable-default/data-package.meta +++ b/Runtime/playable-default/data-package.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 9db32e7236ff03460e55a764bffa846f +guid: 2b333c5e045721202deed395960e1e64 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 61a6e8222..9ea5c0f41 100644 --- a/Runtime/playable-default/data-package/game.js.meta +++ b/Runtime/playable-default/data-package/game.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: db9548343468a2e8dde2f89e151158aa + guid: ae90ab805d16aa807a27ececf5b81a56 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/events.js.meta b/Runtime/playable-default/events.js.meta index 90ff2e8eb..df9e16cf2 100644 --- a/Runtime/playable-default/events.js.meta +++ b/Runtime/playable-default/events.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: da96340677c85a07609fc9ccdb2fdf24 + guid: 48d23c4d295b923eb34b890d6a97e646 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/game.js.meta b/Runtime/playable-default/game.js.meta index 9e6b17c72..71532a732 100644 --- a/Runtime/playable-default/game.js.meta +++ b/Runtime/playable-default/game.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 745f86b07dbcdd56ff62b3681ffce1c9 + guid: 87c92b7d0eeb1d92e18ede4dad0ef327 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/game.json.meta b/Runtime/playable-default/game.json.meta index fa6f1bd77..0c99842ac 100644 --- a/Runtime/playable-default/game.json.meta +++ b/Runtime/playable-default/game.json.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 2744a3804c0377e30a5b0c5d51db2f6b + guid: d0ed4456f2c1a2e2571836ad4f2a55f4 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/playable-fix.js.meta b/Runtime/playable-default/playable-fix.js.meta index f6071b4aa..ac092a27a 100644 --- a/Runtime/playable-default/playable-fix.js.meta +++ b/Runtime/playable-default/playable-fix.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 2af611a65a2f1bbf650bd9c1d10b1aa5 + guid: fba43022bd8d609bab2235e82e1bd6f6 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/plugin-config.js.meta b/Runtime/playable-default/plugin-config.js.meta index cbac3cc17..86fb19cf7 100644 --- a/Runtime/playable-default/plugin-config.js.meta +++ b/Runtime/playable-default/plugin-config.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: b24e6e83b8de92590a80f407d3fe3d86 + guid: 41b88895efce03b1caba9f578bd0e9da DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/plugins.meta b/Runtime/playable-default/plugins.meta index e0e2b8263..2466e3970 100644 --- a/Runtime/playable-default/plugins.meta +++ b/Runtime/playable-default/plugins.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: c87d2375a205f8546f74f0d50655013d +guid: 1d0736ee73ec25d1821ecb7accf6163f 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 ffcd1cdea..d7ec46482 100644 --- a/Runtime/playable-default/plugins/check-update.js.meta +++ b/Runtime/playable-default/plugins/check-update.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 95aafc6e2a2de80a3828b19d70b20736 + guid: 9add3d65518d6415c69d32223a561fb6 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/plugins/screen-adapter.js.meta b/Runtime/playable-default/plugins/screen-adapter.js.meta index 13f50ee04..d92784332 100644 --- a/Runtime/playable-default/plugins/screen-adapter.js.meta +++ b/Runtime/playable-default/plugins/screen-adapter.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 0b7bcc43f99a8c3fbee8a06897a24eb3 + guid: 82577bd1980733769100d711f65e8a70 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/project.config.json.meta b/Runtime/playable-default/project.config.json.meta index d2b0a00fa..459bf7efd 100644 --- a/Runtime/playable-default/project.config.json.meta +++ b/Runtime/playable-default/project.config.json.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: c9a6074eea58ed29d860754dafceba5a + guid: 7692924a0a2c1250ed447a7e3cfa1301 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/texture-config.js.meta b/Runtime/playable-default/texture-config.js.meta index 97a572749..37fba7d02 100644 --- a/Runtime/playable-default/texture-config.js.meta +++ b/Runtime/playable-default/texture-config.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 138b3932896ad9a137aab4ec8fc6968d + guid: d9ede00139c7c99fda76ee317dfb78c9 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/unity-namespace.js.meta b/Runtime/playable-default/unity-namespace.js.meta index e0097863e..f129a21fb 100644 --- a/Runtime/playable-default/unity-namespace.js.meta +++ b/Runtime/playable-default/unity-namespace.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 85d0efb5e64dec929be71386d5a3a849 + guid: 37ead32a360982a4d81514f597f29706 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/unity-playable-plugin.meta b/Runtime/playable-default/unity-playable-plugin.meta index 79f5ab795..7ebc2ef40 100644 --- a/Runtime/playable-default/unity-playable-plugin.meta +++ b/Runtime/playable-default/unity-playable-plugin.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 1ef20c0b38c5b07c5536eaa23a8c608b +guid: d3ae4d1be7542172bd808d667f4f8a4e 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 b60af3ed0..12da326cf 100644 --- a/Runtime/playable-default/unity-playable-plugin/index.js.meta +++ b/Runtime/playable-default/unity-playable-plugin/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: df42191698513563c97ee768190b167e + guid: 80e2b0b1dbb4642b41652f47e64b4b45 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/unity-sdk.meta b/Runtime/playable-default/unity-sdk.meta index 238e998f6..a9f70f9f9 100644 --- a/Runtime/playable-default/unity-sdk.meta +++ b/Runtime/playable-default/unity-sdk.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ea935edd486cdcf95e3db226d30f9bb4 +guid: 40de6bbcbd3c64f6224719cb2ad9888b folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/playable-default/unity-sdk/audio.meta b/Runtime/playable-default/unity-sdk/audio.meta index 884206bc9..cd574ea71 100644 --- a/Runtime/playable-default/unity-sdk/audio.meta +++ b/Runtime/playable-default/unity-sdk/audio.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4b7a82f0b678e556cd45dc018482af2c +guid: a88310b552e82d3a0a72e6fe1f82d8ec 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 21bc5d993..0a0da8d67 100644 --- a/Runtime/playable-default/unity-sdk/audio/common.js.meta +++ b/Runtime/playable-default/unity-sdk/audio/common.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: fcb5b701ca418377f4b87aa57ad9e44f + guid: 3c3f04505c50d4ce9730c494ecf13ae1 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/unity-sdk/audio/const.js.meta b/Runtime/playable-default/unity-sdk/audio/const.js.meta index ee08b9055..18253298c 100644 --- a/Runtime/playable-default/unity-sdk/audio/const.js.meta +++ b/Runtime/playable-default/unity-sdk/audio/const.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 036ace672923b7964ca607be47797ff8 + guid: 26bddc7a527d469a90c030a82e330f7f DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/unity-sdk/audio/index.js.meta b/Runtime/playable-default/unity-sdk/audio/index.js.meta index e849691fc..bfc226dec 100644 --- a/Runtime/playable-default/unity-sdk/audio/index.js.meta +++ b/Runtime/playable-default/unity-sdk/audio/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: f138d3d7e862c98ca876465d76614410 + guid: 487b3418ea44508df954c50b41293cc8 DefaultImporter: externalObjects: {} userData: 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 6f9a1e777..d23767a9f 100644 --- a/Runtime/playable-default/unity-sdk/audio/inner-audio.js.meta +++ b/Runtime/playable-default/unity-sdk/audio/inner-audio.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 7e4f43362c5185fa63fd2368cde02947 + guid: 32572dab2d5db60fac2c841381b2e5a4 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/unity-sdk/audio/store.js.meta b/Runtime/playable-default/unity-sdk/audio/store.js.meta index aab59fd38..95d6f4755 100644 --- a/Runtime/playable-default/unity-sdk/audio/store.js.meta +++ b/Runtime/playable-default/unity-sdk/audio/store.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: d507fcc681e3df61a68daefe78742477 + guid: 8b4991b09088adbde3da2eb00b77e258 DefaultImporter: externalObjects: {} userData: 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 55144c2a5..f0bc25d3f 100644 --- a/Runtime/playable-default/unity-sdk/audio/unity-audio.js.meta +++ b/Runtime/playable-default/unity-sdk/audio/unity-audio.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 051e3ad4761d5bb61a28f8e9108082ab + guid: 04908e73671bbdaa133ea999afd91cb6 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/unity-sdk/audio/utils.js.meta b/Runtime/playable-default/unity-sdk/audio/utils.js.meta index 6a1d15cc9..2c15283ac 100644 --- a/Runtime/playable-default/unity-sdk/audio/utils.js.meta +++ b/Runtime/playable-default/unity-sdk/audio/utils.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: c438d3f8f415ad74021aac02b89c85fe + guid: a8d91201378e1bd72aa5975f40a33046 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/unity-sdk/canvas-context.js.meta b/Runtime/playable-default/unity-sdk/canvas-context.js.meta index ae11dea01..6ba91830d 100644 --- a/Runtime/playable-default/unity-sdk/canvas-context.js.meta +++ b/Runtime/playable-default/unity-sdk/canvas-context.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 3d1b49fb81fe86f40c24585d3b404808 + guid: e6442c04c91fabd3aa3b143009da7782 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/unity-sdk/canvas.js.meta b/Runtime/playable-default/unity-sdk/canvas.js.meta index 3e8a2b32a..c75b7add2 100644 --- a/Runtime/playable-default/unity-sdk/canvas.js.meta +++ b/Runtime/playable-default/unity-sdk/canvas.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 0032633c9aa4b01fd61e9459e65bc5ce + guid: 2166092b4cb6fd897880c12019181d20 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/unity-sdk/conf.js.meta b/Runtime/playable-default/unity-sdk/conf.js.meta index 373e4efb8..ddf8bcafc 100644 --- a/Runtime/playable-default/unity-sdk/conf.js.meta +++ b/Runtime/playable-default/unity-sdk/conf.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 73b09a7d95e4911191700ec882b070f2 + guid: 8c8cabfa1a51358d5c57df56fecaec94 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/unity-sdk/file-info.js.meta b/Runtime/playable-default/unity-sdk/file-info.js.meta index 79a5e44e3..5fe846948 100644 --- a/Runtime/playable-default/unity-sdk/file-info.js.meta +++ b/Runtime/playable-default/unity-sdk/file-info.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 5bf0f010954ad7c7188ec4a4e67bc84c + guid: 7242ceef931a8b99c26c107b40aeb4a9 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/unity-sdk/fix.js.meta b/Runtime/playable-default/unity-sdk/fix.js.meta index 37c9f2945..7fd8c60e2 100644 --- a/Runtime/playable-default/unity-sdk/fix.js.meta +++ b/Runtime/playable-default/unity-sdk/fix.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 3192f10263543e32c6127a2724b631aa + guid: 71c96763182bacaaa55d2b51b0d8eedc DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/unity-sdk/fs.js.meta b/Runtime/playable-default/unity-sdk/fs.js.meta index 4a67beff8..56d8ac4a9 100644 --- a/Runtime/playable-default/unity-sdk/fs.js.meta +++ b/Runtime/playable-default/unity-sdk/fs.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 3b762d5ea1a4f425455ae341319cb565 + guid: 93251ff3c7164a7a2dff28c3762b9c6c DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/unity-sdk/index.js.meta b/Runtime/playable-default/unity-sdk/index.js.meta index 8badbf1e8..277605820 100644 --- a/Runtime/playable-default/unity-sdk/index.js.meta +++ b/Runtime/playable-default/unity-sdk/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: ac4dc8990b0dc9d2ecb9e22fceb30c09 + guid: a642d3bb13b81189a1d40ff9e2909444 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/unity-sdk/logger.js.meta b/Runtime/playable-default/unity-sdk/logger.js.meta index 3356c4fc6..9d8491143 100644 --- a/Runtime/playable-default/unity-sdk/logger.js.meta +++ b/Runtime/playable-default/unity-sdk/logger.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 660bbb210dcebf2e3bdc3e3adcedd22a + guid: 33c03293fcbd47c272250d626f16d46a DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/unity-sdk/mobileKeyboard.meta b/Runtime/playable-default/unity-sdk/mobileKeyboard.meta index b3b081fff..b12da4a43 100644 --- a/Runtime/playable-default/unity-sdk/mobileKeyboard.meta +++ b/Runtime/playable-default/unity-sdk/mobileKeyboard.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 1294735d54e3c7e85cc717243837b4ae +guid: 02a8a99a23a8b992dd816fc9ab328e80 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 2c3992b82..89e1bfc90 100644 --- a/Runtime/playable-default/unity-sdk/mobileKeyboard/index.js.meta +++ b/Runtime/playable-default/unity-sdk/mobileKeyboard/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 8f111902f93174de27cb26ceda552d74 + guid: de4edebb693d07b060d1a8afb67e617d DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/unity-sdk/module-helper.js.meta b/Runtime/playable-default/unity-sdk/module-helper.js.meta index 828b59333..e0728838a 100644 --- a/Runtime/playable-default/unity-sdk/module-helper.js.meta +++ b/Runtime/playable-default/unity-sdk/module-helper.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: dfe9a302c0cfaf5d50fc7c4ac231a8d2 + guid: 9e60b06118ccf9d6c302b48abf34ef11 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/unity-sdk/recorder.js.meta b/Runtime/playable-default/unity-sdk/recorder.js.meta index ae8a6fabb..dee3b3bd6 100644 --- a/Runtime/playable-default/unity-sdk/recorder.js.meta +++ b/Runtime/playable-default/unity-sdk/recorder.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 6f6bf7b1d614ea2cb43955e0926f6775 + guid: c6d635efd4d48ad924ddea3e096e486b DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/unity-sdk/resType.js b/Runtime/playable-default/unity-sdk/resType.js index 1cc38b161..a4a98d884 100644 --- a/Runtime/playable-default/unity-sdk/resType.js +++ b/Runtime/playable-default/unity-sdk/resType.js @@ -93,6 +93,14 @@ export const ResType = { top: 'number', width: 'number', }, + OfficialComponentsInfo: { + notificationComponentInfo: 'OfficialComponentInfo', + }, + OfficialComponentInfo: { + boundingClientRect: 'ClientRect', + isVisible: 'bool', + name: 'string', + }, GetStorageInfoSyncOption: { currentSize: 'number', keys: 'string[]', @@ -180,10 +188,15 @@ export const ResType = { downstreamThroughputKbpsEstimate: 'number', estimate_nettype: 'number', fetchStart: 'number', + httpDNSDomainLookUpEnd: 'number', + httpDNSDomainLookUpStart: 'number', httpRttEstimate: 'number', + invokeStart: 'number', peerIP: 'string', port: 'number', protocol: 'string', + queueEnd: 'number', + queueStart: 'number', receivedBytedCount: 'number', redirectEnd: 'number', redirectStart: 'number', @@ -518,6 +531,12 @@ export const ResType = { status: 'number', errMsg: 'string', }, + GetChatToolInfoSuccessCallbackResult: { + cloudID: 'string', + encryptedData: 'string', + errMsg: 'string', + iv: 'string', + }, GetClipboardDataSuccessCallbackOption: { data: 'string', errMsg: 'string', @@ -555,6 +574,10 @@ export const ResType = { signature: 'string', errMsg: 'string', }, + GetGameExptInfoSuccessCallbackResult: { + list: 'object', + errMsg: 'string', + }, GetGroupEnterInfoError: { errMsg: 'string', errCode: 'number', @@ -565,6 +588,20 @@ export const ResType = { errMsg: 'string', iv: 'string', }, + GetGroupMembersInfoSuccessCallbackResult: { + membersInfo: 'ResultOpenDataContextUserInfo[]', + errMsg: 'string', + }, + ResultOpenDataContextUserInfo: { + avatarUrl: 'string', + city: 'string', + country: 'string', + gender: 'number', + language: 'string', + nickName: 'string', + openId: 'string', + province: 'string', + }, GetInferenceEnvInfoSuccessCallbackResult: { ver: 'string', errMsg: 'string', @@ -667,7 +704,7 @@ export const ResType = { errMsg: 'string', openIdList: 'string[]', }, - RequestFailCallbackErr: { + LoginFailCallbackErr: { errMsg: 'string', errno: 'number', }, @@ -736,9 +773,8 @@ export const ResType = { OnDeviceOrientationChangeListenerResult: { value: 'string', }, - Error: { + ListenerError: { message: 'string', - stack: 'string', }, OnGamepadConnectedListenerResult: { gamepad: 'string', @@ -784,6 +820,9 @@ export const ResType = { networkType: 'string', weakNet: 'bool', }, + OnOfficialComponentsInfoChangeListenerResult: { + OfficialComponentsInfo: 'OfficialComponentsInfo', + }, OnScreenRecordingStateChangedListenerResult: { state: 'string', }, @@ -846,6 +885,9 @@ export const ResType = { windowHeight: 'number', windowWidth: 'number', }, + OnWindowStateChangeListenerResult: { + state: 'string', + }, OpenCardRequestInfo: { cardId: 'string', code: 'string', @@ -889,12 +931,6 @@ export const ResType = { errMsg: 'string', errCode: 'number', }, - RequestMidasFriendPaymentSuccessCallbackResult: { - cloudID: 'string', - encryptedData: 'string', - errMsg: 'string', - iv: 'string', - }, MidasPaymentError: { errMsg: 'string', errCode: 'number', @@ -940,6 +976,10 @@ export const ResType = { scanType: 'string', errMsg: 'string', }, + GroupMemberInfo: { + members: 'string[]', + errMsg: 'string', + }, SetBLEMTUFailCallbackResult: { mtu: 'number', }, diff --git a/Runtime/playable-default/unity-sdk/resType.js.meta b/Runtime/playable-default/unity-sdk/resType.js.meta index a3a85e739..aef195c6e 100644 --- a/Runtime/playable-default/unity-sdk/resType.js.meta +++ b/Runtime/playable-default/unity-sdk/resType.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 41c8deca0ff34d264f1244b563739b50 + guid: 35c6f005184b2fe0dfbe1428ec1d061c DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/unity-sdk/resTypeOther.js b/Runtime/playable-default/unity-sdk/resTypeOther.js index 9ca8b5a42..ead21e383 100644 --- a/Runtime/playable-default/unity-sdk/resTypeOther.js +++ b/Runtime/playable-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/playable-default/unity-sdk/resTypeOther.js.meta b/Runtime/playable-default/unity-sdk/resTypeOther.js.meta index 474597200..ac8a207e9 100644 --- a/Runtime/playable-default/unity-sdk/resTypeOther.js.meta +++ b/Runtime/playable-default/unity-sdk/resTypeOther.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 5329bb0b502c4916572146e7353c8880 + guid: e93cdc45e79477053c8e471253c68cf4 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/unity-sdk/response.js.meta b/Runtime/playable-default/unity-sdk/response.js.meta index 55a764fe3..1fcec6d6e 100644 --- a/Runtime/playable-default/unity-sdk/response.js.meta +++ b/Runtime/playable-default/unity-sdk/response.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 9aa844e47796f1fe344b8d60b82fa9b7 + guid: 64652d696fc163a3b338e0300fdedbef DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/unity-sdk/sdk.js b/Runtime/playable-default/unity-sdk/sdk.js index 0c1957ed6..9046d24b0 100644 --- a/Runtime/playable-default/unity-sdk/sdk.js +++ b/Runtime/playable-default/unity-sdk/sdk.js @@ -27,10 +27,12 @@ function WX_OneWayNoFunction(functionName, ...params) { } -const onlyReadyResponse = [ +const onlyReadResponse = [ 'getSystemSetting', 'getAppAuthorizeSetting', ]; + +const needParseJson = ['WXMiniReportManagerReport']; // eslint-disable-next-line @typescript-eslint/naming-convention function WX_SyncFunction(functionName, ...params) { return wx[functionName.replace(/^\w/, (a) => a.toLowerCase())](...params); @@ -72,6 +74,10 @@ export default { ...config, success(res) { formatResponse(successType, res); + + if (lowerFunctionName === 'getGameExptInfo') { + res.list = JSON.stringify(res.list); + } moduleHelper.send(`${functionName}Callback`, JSON.stringify({ callbackId, type: 'success', res: JSON.stringify(res), })); @@ -234,7 +240,7 @@ export default { }, WX_SyncFunction_t(functionName, returnType) { const res = WX_SyncFunction(functionName); - if (onlyReadyResponse.includes(functionName.replace(/^\w/, (a) => a.toLowerCase()))) { + if (onlyReadResponse.includes(functionName.replace(/^\w/, (a) => a.toLowerCase()))) { formatResponse(returnType, JSON.parse(JSON.stringify(res))); return JSON.stringify(res); } @@ -355,7 +361,8 @@ export default { } ClassOnEventLists[className + functionName][id + eventName].push(callback); // WXVideoDecoder OnEvent 不规范 特殊处理 - if (className === 'WXVideoDecoder') { + // update: 2025.9.27: 严重怀疑之前 WXPageManager 压根没有跑通过事件监听,跑到下面去了 + if (className === 'WXVideoDecoder' || className === 'WXPageManager') { obj[functionName.replace(/^\w/, (a) => a.toLowerCase())](eventName, callback); } else { @@ -378,7 +385,8 @@ export default { } ClassOnEventLists[className + functionName][id + eventName].forEach((v) => { - if (className === 'WXVideoDecoder') { + + if (className === 'WXVideoDecoder' || className === 'WXPageManager') { obj[functionName.replace(/^\w/, (a) => a.toLowerCase())](eventName, v); } else { @@ -391,6 +399,10 @@ export default { WX_ClassOneWayNoFunction(className, functionName, id); }, WX_ClassOneWayNoFunction_vs(className, functionName, id, param1) { + if (needParseJson.includes(className + functionName)) { + // eslint-disable-next-line no-param-reassign + param1 = JSON.parse(param1); + } WX_ClassOneWayNoFunction(className, functionName, id, param1); }, WX_ClassOneWayNoFunction_t(className, functionName, returnType, id) { diff --git a/Runtime/playable-default/unity-sdk/sdk.js.meta b/Runtime/playable-default/unity-sdk/sdk.js.meta index a1905a8ca..7f843a6b5 100644 --- a/Runtime/playable-default/unity-sdk/sdk.js.meta +++ b/Runtime/playable-default/unity-sdk/sdk.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 6b3e5628522459cc3dd7964d0a814173 + guid: 4cfe97453bf4202c80bae20f354d828f DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/unity-sdk/special-callbacks.js.meta b/Runtime/playable-default/unity-sdk/special-callbacks.js.meta index c2f66caf5..8874ca5c4 100644 --- a/Runtime/playable-default/unity-sdk/special-callbacks.js.meta +++ b/Runtime/playable-default/unity-sdk/special-callbacks.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 4b7402032742928010f5479de54a3d93 + guid: 578a5e31065d981d9cc4be05c9a747c9 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/unity-sdk/texture.js.meta b/Runtime/playable-default/unity-sdk/texture.js.meta index 6114c2cd4..0ad6bafab 100644 --- a/Runtime/playable-default/unity-sdk/texture.js.meta +++ b/Runtime/playable-default/unity-sdk/texture.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 29ce6695da09a0631c4ec513c0da92ae + guid: 97de99f658d3a2c85442a4c03b880d03 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/unity-sdk/touch.meta b/Runtime/playable-default/unity-sdk/touch.meta index c9b411361..c83768e17 100644 --- a/Runtime/playable-default/unity-sdk/touch.meta +++ b/Runtime/playable-default/unity-sdk/touch.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d2f786864680ee6890aa7b3f9a91e748 +guid: 073ac8c4445da3f3f066d92c3b33b78b 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 94bd2e440..2d142d8e1 100644 --- a/Runtime/playable-default/unity-sdk/touch/index.js.meta +++ b/Runtime/playable-default/unity-sdk/touch/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 14b58d35b818a6a38adec667a7a4aac3 + guid: f5141571e63aa624216bb747b178e31f DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/unity-sdk/util.js.meta b/Runtime/playable-default/unity-sdk/util.js.meta index d955f312a..efa38507f 100644 --- a/Runtime/playable-default/unity-sdk/util.js.meta +++ b/Runtime/playable-default/unity-sdk/util.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: f1c0b302460c710eb5d6f78e7bbc77b6 + guid: b89fddf778d260d7e0a6cf0e477b8aed DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/unity-sdk/utils.js.meta b/Runtime/playable-default/unity-sdk/utils.js.meta index 0b5bebee0..837493345 100644 --- a/Runtime/playable-default/unity-sdk/utils.js.meta +++ b/Runtime/playable-default/unity-sdk/utils.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 23d83e7ac4b7b30b2f8202d7147cd332 + guid: 99b6d5934861bd793d2cda356a5761c6 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/unity-sdk/video.js.meta b/Runtime/playable-default/unity-sdk/video.js.meta index 9a9bd6132..f6e0475c4 100644 --- a/Runtime/playable-default/unity-sdk/video.js.meta +++ b/Runtime/playable-default/unity-sdk/video.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 970ffb90d4864c9490b01e9bc44c5de1 + guid: 759245cddb432ecbc5f1eabe7e736194 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/unity-sdk/video.meta b/Runtime/playable-default/unity-sdk/video.meta index 68e0d7162..c90fa6d72 100644 --- a/Runtime/playable-default/unity-sdk/video.meta +++ b/Runtime/playable-default/unity-sdk/video.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 01fc114f60b2df8e2e439805212c97df +guid: 39a581f47f9ee3e06ce82941b47c4124 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 3d8430570..212dc9b33 100644 --- a/Runtime/playable-default/unity-sdk/video/index.js.meta +++ b/Runtime/playable-default/unity-sdk/video/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: ba12dcb22c6474a3ca54b389f5a3332c + guid: c96472bc59832b5a2acd9f7a911e6678 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/wasmcode.meta b/Runtime/playable-default/wasmcode.meta index 7e88eb716..2c7e42c08 100644 --- a/Runtime/playable-default/wasmcode.meta +++ b/Runtime/playable-default/wasmcode.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 0e128f7c44dd1bce2d633506e5a47d40 +guid: aac019ddacfc52dcf1c017ec188d1b36 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/playable-default/wasmcode/game.js.meta b/Runtime/playable-default/wasmcode/game.js.meta index ddf212fac..81e2bfce2 100644 --- a/Runtime/playable-default/wasmcode/game.js.meta +++ b/Runtime/playable-default/wasmcode/game.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: fd4e694f43b0aa3f5a5092bd0511f7d2 + guid: aa3a37ecfc12f4b45594a5de8e00e40e DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/playable-default/weapp-adapter.js.meta b/Runtime/playable-default/weapp-adapter.js.meta index 5e02c8360..4b9688f19 100644 --- a/Runtime/playable-default/weapp-adapter.js.meta +++ b/Runtime/playable-default/weapp-adapter.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: ade8e1257dceffd8772fecb37c8c20fb + guid: ab44db8c3bd56b8e26b8e422c5921743 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/check-version.js.meta b/Runtime/wechat-default/check-version.js.meta index e88c6ce9c..89c178ed4 100644 --- a/Runtime/wechat-default/check-version.js.meta +++ b/Runtime/wechat-default/check-version.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: b93c9a0067d6f24d0ee31907c9b8dee0 + guid: 1bdfe5c6407ef4e83efab066c34be263 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/data-package.meta b/Runtime/wechat-default/data-package.meta index e19bc99ec..90420f171 100644 --- a/Runtime/wechat-default/data-package.meta +++ b/Runtime/wechat-default/data-package.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 159d3ecf3853f33f27f82dc14eb1223f +guid: dc28642e08d63e497eb3963854c03106 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/data-package/game.js.meta b/Runtime/wechat-default/data-package/game.js.meta index 3f03bb689..858f951ce 100644 --- a/Runtime/wechat-default/data-package/game.js.meta +++ b/Runtime/wechat-default/data-package/game.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: ccfdb628122b7b06b4050606f8eafd89 + guid: df040487682307b95188d678c0fb5206 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/events.js.meta b/Runtime/wechat-default/events.js.meta index 3ddd3504e..0b07e6dfa 100644 --- a/Runtime/wechat-default/events.js.meta +++ b/Runtime/wechat-default/events.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: e21691107c19c03863b6b94613ee293b + guid: 9af74070e22b14adfe5daacb78c6bb18 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/game.js.meta b/Runtime/wechat-default/game.js.meta index aa451edd0..c69fb0e45 100644 --- a/Runtime/wechat-default/game.js.meta +++ b/Runtime/wechat-default/game.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: f9dcd5068f86566abbb47b7dc12581a4 + guid: e0fa3af31a536ac598e03f41e6fc03a3 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/game.json b/Runtime/wechat-default/game.json index 8968c9355..7916885b2 100644 --- a/Runtime/wechat-default/game.json +++ b/Runtime/wechat-default/game.json @@ -23,7 +23,7 @@ ], "plugins": { "UnityPlugin": { - "version": "1.2.83", + "version": "1.2.84", "provider": "wxe5a48f1ed5f544b7", "contexts": [ { diff --git a/Runtime/wechat-default/game.json.meta b/Runtime/wechat-default/game.json.meta index 8641447d0..224d2f9b6 100644 --- a/Runtime/wechat-default/game.json.meta +++ b/Runtime/wechat-default/game.json.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 7d49b22178f2450803293d12a61eb31e + guid: 1c2c714339c9f91ac614deef79550fe3 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/images.meta b/Runtime/wechat-default/images.meta index da5fd8fc7..f3fde05dd 100644 --- a/Runtime/wechat-default/images.meta +++ b/Runtime/wechat-default/images.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 7a1cdee40104ef4f2d71cce0739e9c5c +guid: 4aef6f37ebdb736fcc31123c75850f86 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/images/background.jpg.meta b/Runtime/wechat-default/images/background.jpg.meta index 7b12ca5dc..3dbbccee1 100644 --- a/Runtime/wechat-default/images/background.jpg.meta +++ b/Runtime/wechat-default/images/background.jpg.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 5ab2fd9f05d6d847703e15429e8745a3 + guid: b4b1b22adade56974c5b5bf75108d822 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/images/unity_logo.png.meta b/Runtime/wechat-default/images/unity_logo.png.meta index de9ceba5e..095bce36e 100644 --- a/Runtime/wechat-default/images/unity_logo.png.meta +++ b/Runtime/wechat-default/images/unity_logo.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: a1bedbee2f4f8aa1e5e1881b864c7183 + guid: 6e2be1b409edd0a28f78d892fa14c4ab DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/open-data.meta b/Runtime/wechat-default/open-data.meta index 7883edb80..588e5f2a5 100644 --- a/Runtime/wechat-default/open-data.meta +++ b/Runtime/wechat-default/open-data.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 5ede05d304e27f419955e65b3e270d9e +guid: 706df420d7fbc906880f63ac916157f8 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/open-data/data.meta b/Runtime/wechat-default/open-data/data.meta index a0771aa09..f43f7bffa 100644 --- a/Runtime/wechat-default/open-data/data.meta +++ b/Runtime/wechat-default/open-data/data.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 94f7f561ba2e9090cb9ccaefe8fdef90 +guid: a406610f63a15ad06d4ae7929dbaec95 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/open-data/data/index.js.meta b/Runtime/wechat-default/open-data/data/index.js.meta index 59fdf4bc7..b18b1acbf 100644 --- a/Runtime/wechat-default/open-data/data/index.js.meta +++ b/Runtime/wechat-default/open-data/data/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: d3ca90f5308418f9e8f878fa484f6aa9 + guid: eb7a5828fbbaa4c5f36bdc4f5e2f64c0 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/open-data/data/utils.js.meta b/Runtime/wechat-default/open-data/data/utils.js.meta index 7b6ff1dd9..3a53f6ee9 100644 --- a/Runtime/wechat-default/open-data/data/utils.js.meta +++ b/Runtime/wechat-default/open-data/data/utils.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: c7081b3840feb201cfbe20e241877fb5 + guid: 668d82a57138d65f02480e1c1163c5f4 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/open-data/index.js.meta b/Runtime/wechat-default/open-data/index.js.meta index e5ec711e6..c1a11ed2e 100644 --- a/Runtime/wechat-default/open-data/index.js.meta +++ b/Runtime/wechat-default/open-data/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 424d12a4cf887bd4cf31b2757a7e3345 + guid: f4ca5aab6d333ae0b4d7be616aec14ea DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/open-data/loading.js.meta b/Runtime/wechat-default/open-data/loading.js.meta index 0ed2379c4..3e67b35d9 100644 --- a/Runtime/wechat-default/open-data/loading.js.meta +++ b/Runtime/wechat-default/open-data/loading.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: a97f287cbcbf865f60ede1c89af50756 + guid: d951c79cdec039ff7d292c8fe458763c DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/open-data/render.meta b/Runtime/wechat-default/open-data/render.meta index c3f15bda1..351f91ec6 100644 --- a/Runtime/wechat-default/open-data/render.meta +++ b/Runtime/wechat-default/open-data/render.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: c077b7c5073887a22817a1de3463cbaa +guid: 59faa2dee29930bdabd109fb90a2c70d folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/open-data/render/image.meta b/Runtime/wechat-default/open-data/render/image.meta index 605fb16cd..d4d625784 100644 --- a/Runtime/wechat-default/open-data/render/image.meta +++ b/Runtime/wechat-default/open-data/render/image.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 7ca9ace473c408950c8e70a9b587f59b +guid: 631259101f83e894fb397f256ae314ed folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/open-data/render/image/avatar.png.meta b/Runtime/wechat-default/open-data/render/image/avatar.png.meta index e4945e522..1ba8a2bf8 100644 --- a/Runtime/wechat-default/open-data/render/image/avatar.png.meta +++ b/Runtime/wechat-default/open-data/render/image/avatar.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: ed7b40fffc12b226d0f17c68ec425955 + guid: 3db0a9987f4a3ea03a4b70bbb08a7c3c DefaultImporter: externalObjects: {} userData: 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 566bdb92a..5c9dfc527 100644 --- a/Runtime/wechat-default/open-data/render/image/button1.png.meta +++ b/Runtime/wechat-default/open-data/render/image/button1.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 35a524449d53878bbdf7b5b5c5ee52e0 + guid: e7533e92bdac02c85d2e48a8442892f5 DefaultImporter: externalObjects: {} userData: 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 a6ac74a64..f3a719934 100644 --- a/Runtime/wechat-default/open-data/render/image/button2.png.meta +++ b/Runtime/wechat-default/open-data/render/image/button2.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 2562183ed446cc91b818a488f02b810b + guid: f34d8c71a66e55489e99240129182e65 DefaultImporter: externalObjects: {} userData: 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 21d21acd5..5eca1bdc0 100644 --- a/Runtime/wechat-default/open-data/render/image/button3.png.meta +++ b/Runtime/wechat-default/open-data/render/image/button3.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: a9e9ca6bcf166e7557365863b246dd5f + guid: 81b7cff5a1058ae4491a177e116e391f DefaultImporter: externalObjects: {} userData: 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 14faa881f..e569a18b1 100644 --- a/Runtime/wechat-default/open-data/render/image/loading.png.meta +++ b/Runtime/wechat-default/open-data/render/image/loading.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 5828dd6840780c92a087e55722ea515a + guid: e45a23f2ada8c02b14109a0c6ad4c68f DefaultImporter: externalObjects: {} userData: 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 3e9de07c3..2c0b986c7 100644 --- a/Runtime/wechat-default/open-data/render/image/nameBg.png.meta +++ b/Runtime/wechat-default/open-data/render/image/nameBg.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 1e349f79e5388b6f7548c37648a70439 + guid: 56eea4a7a0f46af0dd7b173c04a1c12a DefaultImporter: externalObjects: {} userData: 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 0c63fc01c..493bf3622 100644 --- a/Runtime/wechat-default/open-data/render/image/rankAvatar.png.meta +++ b/Runtime/wechat-default/open-data/render/image/rankAvatar.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 0756ab81db4819b8e9d84502746d080a + guid: 955e5f3477800b8cce6eedad61eb57c7 DefaultImporter: externalObjects: {} userData: 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 098615464..0b6a2d9b3 100644 --- a/Runtime/wechat-default/open-data/render/image/rankBg.png.meta +++ b/Runtime/wechat-default/open-data/render/image/rankBg.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 746fc56a705d56725b57c1823bb94be5 + guid: 948b00439387dc986491f5791b509a54 DefaultImporter: externalObjects: {} userData: 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 90b421345..029b44966 100644 --- a/Runtime/wechat-default/open-data/render/image/shareBg.png.meta +++ b/Runtime/wechat-default/open-data/render/image/shareBg.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 7b613eba0d9f2bc926e100aa3cc9a4bd + guid: d24529c29f6555961ce1c9c783993af4 DefaultImporter: externalObjects: {} userData: 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 2867f1c41..afd174ec3 100644 --- a/Runtime/wechat-default/open-data/render/image/shareBg2.png.meta +++ b/Runtime/wechat-default/open-data/render/image/shareBg2.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 1d960c8696a881a2ad0244eec51f3a96 + guid: 40dd071f2b9367924148b5d80a1f1a57 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/open-data/render/styles.meta b/Runtime/wechat-default/open-data/render/styles.meta index 39ff8a311..da5a3d429 100644 --- a/Runtime/wechat-default/open-data/render/styles.meta +++ b/Runtime/wechat-default/open-data/render/styles.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ffdff0bedcaf5e4694ce6a8860c934aa +guid: 95a66b05489ed20cc90a3218af2f4a8c folderAsset: yes DefaultImporter: externalObjects: {} 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 2afe90b18..29dbe0705 100644 --- a/Runtime/wechat-default/open-data/render/styles/friendRank.js.meta +++ b/Runtime/wechat-default/open-data/render/styles/friendRank.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: fb4aaad37610738fde384b889580f6fb + guid: e2345f5f18c4f2ce50a94bb3fee04ce5 DefaultImporter: externalObjects: {} userData: 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 314dfb27a..c506de669 100644 --- a/Runtime/wechat-default/open-data/render/styles/tips.js.meta +++ b/Runtime/wechat-default/open-data/render/styles/tips.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: e0e1626872852bf606b184dee65736ca + guid: 8a6482bb3d8ec6f46f222087b0f26ef1 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/open-data/render/tpls.meta b/Runtime/wechat-default/open-data/render/tpls.meta index 1ebebcfe0..4ef975b45 100644 --- a/Runtime/wechat-default/open-data/render/tpls.meta +++ b/Runtime/wechat-default/open-data/render/tpls.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 7a622c2af1899b98a0d9c71d74dee8d8 +guid: 48c5fc4e67b52a2a13f41289b17d83ea folderAsset: yes DefaultImporter: externalObjects: {} 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 8a96ce1ae..ace33b620 100644 --- a/Runtime/wechat-default/open-data/render/tpls/friendRank.js.meta +++ b/Runtime/wechat-default/open-data/render/tpls/friendRank.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 8689b7eaf67fb8ea0829f2c9fa446659 + guid: 5b8c1bdc4306f8626ba1c90df83cd39d DefaultImporter: externalObjects: {} userData: 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 9793c66e6..2db04436f 100644 --- a/Runtime/wechat-default/open-data/render/tpls/tips.js.meta +++ b/Runtime/wechat-default/open-data/render/tpls/tips.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 2f0f259b2ae2f1aa7c3f9436a5301301 + guid: bdb7d8324899c47b916e6bf49fb74c99 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/plugin-config.js.meta b/Runtime/wechat-default/plugin-config.js.meta index 2d9d33eb7..30c1378de 100644 --- a/Runtime/wechat-default/plugin-config.js.meta +++ b/Runtime/wechat-default/plugin-config.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: b7e2e6c67097e6d412bc78367c39e949 + guid: 300adc0912892fcff141b65366a67d64 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/plugins.meta b/Runtime/wechat-default/plugins.meta index 586bfa62b..8072696e2 100644 --- a/Runtime/wechat-default/plugins.meta +++ b/Runtime/wechat-default/plugins.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: cec67b180a97ea11a8536168c02ab1d2 +guid: 387e14b88fe48960ccb50eb775a9b05c 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 6d6ad7ff4..217a012a4 100644 --- a/Runtime/wechat-default/plugins/check-update.js.meta +++ b/Runtime/wechat-default/plugins/check-update.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 8e88ab1dc2bf8dda1edfd3072513592c + guid: 3de5a2608465fdcab41762eac0d80177 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/plugins/screen-adapter.js.meta b/Runtime/wechat-default/plugins/screen-adapter.js.meta index 6a7becdbc..9ce19b175 100644 --- a/Runtime/wechat-default/plugins/screen-adapter.js.meta +++ b/Runtime/wechat-default/plugins/screen-adapter.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 48bb057579c3e1324c2b82b43d5feb84 + guid: 409ca26b666ed7a188f838f43519d2ca DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/project.config.json.meta b/Runtime/wechat-default/project.config.json.meta index cf35a5de5..dc79dd21e 100644 --- a/Runtime/wechat-default/project.config.json.meta +++ b/Runtime/wechat-default/project.config.json.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 2327c77d4aa2f9ead5b8b2cb0ec3db06 + guid: be881f23a75d8bf366187d437fb25e0b DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/texture-config.js.meta b/Runtime/wechat-default/texture-config.js.meta index 707fe9d23..92cff2644 100644 --- a/Runtime/wechat-default/texture-config.js.meta +++ b/Runtime/wechat-default/texture-config.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 077c652441625a47e365ed3ae5440c29 + guid: 284c21f85e03e116a1c719aeb15f7a35 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-namespace.js.meta b/Runtime/wechat-default/unity-namespace.js.meta index f2ee1d953..a62686016 100644 --- a/Runtime/wechat-default/unity-namespace.js.meta +++ b/Runtime/wechat-default/unity-namespace.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 9aca56e770c5aa6e9aed5659a45a13ff + guid: 5f277c3fd7acdb0f70720af5e02bef83 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk.meta b/Runtime/wechat-default/unity-sdk.meta index ca1a7b2c1..538b90a6c 100644 --- a/Runtime/wechat-default/unity-sdk.meta +++ b/Runtime/wechat-default/unity-sdk.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 8da402a9a8e70b56ab98b8c34dac663d +guid: 4a14ba613686d17b07529ee7988cac5a folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/unity-sdk/TCPSocket.meta b/Runtime/wechat-default/unity-sdk/TCPSocket.meta index 555704b98..4be7e51fa 100644 --- a/Runtime/wechat-default/unity-sdk/TCPSocket.meta +++ b/Runtime/wechat-default/unity-sdk/TCPSocket.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4b5c9adf75f2ce1671c9fbf36f1bd2e1 +guid: 967dba5f36a2ad8adbb75ee6fd323144 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/unity-sdk/TCPSocket/index.js.meta b/Runtime/wechat-default/unity-sdk/TCPSocket/index.js.meta index 64764e4a3..ed6b3902c 100644 --- a/Runtime/wechat-default/unity-sdk/TCPSocket/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/TCPSocket/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: e966fc7928ae459970c211b298b65396 + guid: 30f3f9533a08a05440646624e27879f1 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/UDPSocket.meta b/Runtime/wechat-default/unity-sdk/UDPSocket.meta index ca36a3b58..1caaa9868 100644 --- a/Runtime/wechat-default/unity-sdk/UDPSocket.meta +++ b/Runtime/wechat-default/unity-sdk/UDPSocket.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: a45c88b0f31f7e17ceb1617f760ee837 +guid: 50842e7954d8a67f38a45cf67aa7a9e5 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/unity-sdk/UDPSocket/index.js.meta b/Runtime/wechat-default/unity-sdk/UDPSocket/index.js.meta index 99aeaf170..b9d10e93b 100644 --- a/Runtime/wechat-default/unity-sdk/UDPSocket/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/UDPSocket/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: d2b02a174bea11383c38cc409cc0902f + guid: c7bdca460bde6703dedd1053e49c648a DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/ad.js.meta b/Runtime/wechat-default/unity-sdk/ad.js.meta index 771924a95..ce46f427c 100644 --- a/Runtime/wechat-default/unity-sdk/ad.js.meta +++ b/Runtime/wechat-default/unity-sdk/ad.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 138fed8c0342d2d999e5eb7e1a7cd389 + guid: 79002f96b987cdf137be04f59e0e2437 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/audio.meta b/Runtime/wechat-default/unity-sdk/audio.meta index 2cebc5c31..4ae0b0876 100644 --- a/Runtime/wechat-default/unity-sdk/audio.meta +++ b/Runtime/wechat-default/unity-sdk/audio.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 9eb42ad1889588435cacf8853c152bce +guid: e4a5d97a57397f2cf24e9a3ad384b654 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/unity-sdk/audio/common.js.meta b/Runtime/wechat-default/unity-sdk/audio/common.js.meta index e2591a977..63366ba65 100644 --- a/Runtime/wechat-default/unity-sdk/audio/common.js.meta +++ b/Runtime/wechat-default/unity-sdk/audio/common.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 74bd9343a8f6a7efe1e022819fd7fead + guid: d612d105f739c150cb1fa54b3f5b8738 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/audio/const.js.meta b/Runtime/wechat-default/unity-sdk/audio/const.js.meta index 449a1f339..e36b3c5f9 100644 --- a/Runtime/wechat-default/unity-sdk/audio/const.js.meta +++ b/Runtime/wechat-default/unity-sdk/audio/const.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 6e128d34f739ed1a78b0403827cf93ad + guid: a8c0c0d77c1c7a02ac97b35c92afa938 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/audio/index.js.meta b/Runtime/wechat-default/unity-sdk/audio/index.js.meta index 6c937b199..2c5f5962d 100644 --- a/Runtime/wechat-default/unity-sdk/audio/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/audio/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: ca340c48401eaa8679a4fd9047f24266 + guid: 788acf4b45d3a4d7fcc439535ae24c5c DefaultImporter: externalObjects: {} userData: 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 f8a6fc5b9..a0ed85af0 100644 --- a/Runtime/wechat-default/unity-sdk/audio/inner-audio.js.meta +++ b/Runtime/wechat-default/unity-sdk/audio/inner-audio.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 306e5636e5fad91f1a322e4218c2a220 + guid: 4965aa18d00b05bceb8a1bc1df76004f DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/audio/store.js.meta b/Runtime/wechat-default/unity-sdk/audio/store.js.meta index d13cd3339..82b82b2de 100644 --- a/Runtime/wechat-default/unity-sdk/audio/store.js.meta +++ b/Runtime/wechat-default/unity-sdk/audio/store.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 907ed92f97c308de890742cc28317f4f + guid: 9e183f06571a85984d6d11520df30278 DefaultImporter: externalObjects: {} userData: 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 a4eefa149..0101eae89 100644 --- a/Runtime/wechat-default/unity-sdk/audio/unity-audio.js.meta +++ b/Runtime/wechat-default/unity-sdk/audio/unity-audio.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: eab76dfc34abf5cf3914d4dd83d54b25 + guid: 6adb87b103316e6b95455e5cd60925dd DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/audio/utils.js.meta b/Runtime/wechat-default/unity-sdk/audio/utils.js.meta index b30fb82a5..86bd09c48 100644 --- a/Runtime/wechat-default/unity-sdk/audio/utils.js.meta +++ b/Runtime/wechat-default/unity-sdk/audio/utils.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 895c9fe42dae4537019b8ea5404dbff2 + guid: 58d09efc09d93ab5f64926c3e049245a DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/authorize.js.meta b/Runtime/wechat-default/unity-sdk/authorize.js.meta index e48ca7b3d..8702e6f7e 100644 --- a/Runtime/wechat-default/unity-sdk/authorize.js.meta +++ b/Runtime/wechat-default/unity-sdk/authorize.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: c953b592f6d37be4919a0b88680e21fd + guid: ee8990dd93239f4dec2237ee2255cdb9 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/bluetooth.meta b/Runtime/wechat-default/unity-sdk/bluetooth.meta index 69aff7bc8..ce18a58d2 100644 --- a/Runtime/wechat-default/unity-sdk/bluetooth.meta +++ b/Runtime/wechat-default/unity-sdk/bluetooth.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: f61814f248e8f96861fc7c67d225840c +guid: aaf793846fd3ae3ba62dd295cb71cb0f folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/unity-sdk/bluetooth/index.js.meta b/Runtime/wechat-default/unity-sdk/bluetooth/index.js.meta index ee52da59c..3f9b14b16 100644 --- a/Runtime/wechat-default/unity-sdk/bluetooth/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/bluetooth/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 23b19627b097cb8c23f8aa898dfc09e2 + guid: a3971523a8772ffb9d62999dff6c586a DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/camera.js.meta b/Runtime/wechat-default/unity-sdk/camera.js.meta index 549694cbb..1611cd48b 100644 --- a/Runtime/wechat-default/unity-sdk/camera.js.meta +++ b/Runtime/wechat-default/unity-sdk/camera.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: e0b7f5c499c2802f9fe30325d409610f + guid: 7c7076dd5cb2eec344e8ebe0962af2b4 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/canvas-context.js.meta b/Runtime/wechat-default/unity-sdk/canvas-context.js.meta index 7e7f8f478..57837a954 100644 --- a/Runtime/wechat-default/unity-sdk/canvas-context.js.meta +++ b/Runtime/wechat-default/unity-sdk/canvas-context.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 817f452ab445fab8f0bc0a6a4e8b288b + guid: a7cad98aef556b5d1d4ef7b883e929e5 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/canvas.js.meta b/Runtime/wechat-default/unity-sdk/canvas.js.meta index 6ad4ca075..a663b1408 100644 --- a/Runtime/wechat-default/unity-sdk/canvas.js.meta +++ b/Runtime/wechat-default/unity-sdk/canvas.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 6cb9fc877b27425a0659933c6dc9dab6 + guid: be49ed4e8c72c7f3fa3409817e178e9b DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/chat.js.meta b/Runtime/wechat-default/unity-sdk/chat.js.meta index f23a085bb..032411f8c 100644 --- a/Runtime/wechat-default/unity-sdk/chat.js.meta +++ b/Runtime/wechat-default/unity-sdk/chat.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 23891dc38a582f67f1aef1fc5585a294 + guid: 2cf0a834fa4d668ee0ae59c4819e381e DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/cloud.js.meta b/Runtime/wechat-default/unity-sdk/cloud.js.meta index abc7e98d0..83c7729fb 100644 --- a/Runtime/wechat-default/unity-sdk/cloud.js.meta +++ b/Runtime/wechat-default/unity-sdk/cloud.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 9831e082c5cc52c7f23401725c2053fa + guid: 8bea86f329f7109ad971734b64657f1b DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/conf.js.meta b/Runtime/wechat-default/unity-sdk/conf.js.meta index 9af01b68e..2e13e698c 100644 --- a/Runtime/wechat-default/unity-sdk/conf.js.meta +++ b/Runtime/wechat-default/unity-sdk/conf.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: b5cc43672048b3a82ef19e000d54e16c + guid: e579deacc1ec2ea20dd368c76a80be0b DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/file-info.js.meta b/Runtime/wechat-default/unity-sdk/file-info.js.meta index f7bb0c2c2..4ab8e473f 100644 --- a/Runtime/wechat-default/unity-sdk/file-info.js.meta +++ b/Runtime/wechat-default/unity-sdk/file-info.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 2a7d32d21df82f9982c760fb111f1751 + guid: 16fb026716e565ae3813b65ddd5bfcd3 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/fix.js.meta b/Runtime/wechat-default/unity-sdk/fix.js.meta index 32bd0bb75..b613a9834 100644 --- a/Runtime/wechat-default/unity-sdk/fix.js.meta +++ b/Runtime/wechat-default/unity-sdk/fix.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: e00f0425e43c8ab397801593eda1ae0c + guid: 1f41d407bba3358475aca6e7de66c18f DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/font.meta b/Runtime/wechat-default/unity-sdk/font.meta index 67d859119..7686dd8c6 100644 --- a/Runtime/wechat-default/unity-sdk/font.meta +++ b/Runtime/wechat-default/unity-sdk/font.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ad5eeb9e744b42526734add0e8692375 +guid: 13b7f3644b63af6ec8c1c33b192fb1f7 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/unity-sdk/font/fix-cmap.js.meta b/Runtime/wechat-default/unity-sdk/font/fix-cmap.js.meta index 7d97bab2f..f261c89d0 100644 --- a/Runtime/wechat-default/unity-sdk/font/fix-cmap.js.meta +++ b/Runtime/wechat-default/unity-sdk/font/fix-cmap.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 8f6a26ee9d01a47797009356b3b6dd9a + guid: 600efc2a5c87d0300d96624996a7742c DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/font/index.js b/Runtime/wechat-default/unity-sdk/font/index.js index 925e34c8d..33c798af7 100644 --- a/Runtime/wechat-default/unity-sdk/font/index.js +++ b/Runtime/wechat-default/unity-sdk/font/index.js @@ -170,8 +170,8 @@ function WXGetFontRawData(conf, callbackId, forceFallback = false) { } }) .catch((err) => { - if (err.errmsg === 'no support font' && forceFallback === false) { - + + if (!loadFromRemote && !!config && forceFallback === false) { WXGetFontRawData(conf, callbackId, true); } else { diff --git a/Runtime/wechat-default/unity-sdk/font/index.js.meta b/Runtime/wechat-default/unity-sdk/font/index.js.meta index eb2132d9a..d3500db4f 100644 --- a/Runtime/wechat-default/unity-sdk/font/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/font/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 7a56f955d234df04b8b19054dfb297b4 + guid: 0d4cb55e19017fcd882c34a5e967daa1 DefaultImporter: externalObjects: {} userData: 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 86873e2d2..7a79ff620 100644 --- a/Runtime/wechat-default/unity-sdk/font/read-metrics.js.meta +++ b/Runtime/wechat-default/unity-sdk/font/read-metrics.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 91d62b57cad2c245aadc689fdef6efdc + guid: 8720297e8f0de7890c25d6e4b172f5ee DefaultImporter: externalObjects: {} userData: 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 909873a3a..7a03f2c1c 100644 --- a/Runtime/wechat-default/unity-sdk/font/split-sc.js.meta +++ b/Runtime/wechat-default/unity-sdk/font/split-sc.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: f48e9b617d8fa4015f2e8004690d7548 + guid: fbf8241107b08de77e39229d33594a9b DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/font/util.js.meta b/Runtime/wechat-default/unity-sdk/font/util.js.meta index c4ebf28d5..16538f70c 100644 --- a/Runtime/wechat-default/unity-sdk/font/util.js.meta +++ b/Runtime/wechat-default/unity-sdk/font/util.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 67f1396dab7da177e98fb0b8762b621c + guid: aa10c946c7c04ad99d4a986437adce6b DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/fs.js.meta b/Runtime/wechat-default/unity-sdk/fs.js.meta index 786036811..5be0b4394 100644 --- a/Runtime/wechat-default/unity-sdk/fs.js.meta +++ b/Runtime/wechat-default/unity-sdk/fs.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 0c07fd17b7e62d34f07365a3d0ca2253 + guid: 51098b0219d62407b1fd883f4921efd9 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/game-club.js.meta b/Runtime/wechat-default/unity-sdk/game-club.js.meta index 11a073912..48f87ce30 100644 --- a/Runtime/wechat-default/unity-sdk/game-club.js.meta +++ b/Runtime/wechat-default/unity-sdk/game-club.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 028951420d5be79b590ee5dc79cc5c47 + guid: fc067a5515ce2e786a26bdc89b946d5d DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/game-recorder.js.meta b/Runtime/wechat-default/unity-sdk/game-recorder.js.meta index 3c036ed5a..a76a33872 100644 --- a/Runtime/wechat-default/unity-sdk/game-recorder.js.meta +++ b/Runtime/wechat-default/unity-sdk/game-recorder.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 2f71c0a398c0336475ab67cc155b8499 + guid: 9dabd1a05614224f0cb3e3fb0b1565b5 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/gyroscope.meta b/Runtime/wechat-default/unity-sdk/gyroscope.meta index 3eea814b9..22c51d48a 100644 --- a/Runtime/wechat-default/unity-sdk/gyroscope.meta +++ b/Runtime/wechat-default/unity-sdk/gyroscope.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 931616e4b04eb49b9f98901fb3858909 +guid: 572bcb2f3d097b4caae26e9311eff4fe folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/unity-sdk/gyroscope/index.js.meta b/Runtime/wechat-default/unity-sdk/gyroscope/index.js.meta index 9346896ef..11a93ac07 100644 --- a/Runtime/wechat-default/unity-sdk/gyroscope/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/gyroscope/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: bb6f7658bf0e2103afce20b94bf3c458 + guid: 04fd0cc8ddd81819ddb3df767c1fa383 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/index.js.meta b/Runtime/wechat-default/unity-sdk/index.js.meta index 9325140d5..b0da7f6eb 100644 --- a/Runtime/wechat-default/unity-sdk/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 11ec3cc46741a8a0d51959fadc2b3bca + guid: 25c26971e8e6ad9866ee06837395a89c DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/logger.js.meta b/Runtime/wechat-default/unity-sdk/logger.js.meta index e5e9a79b6..86c18cdc1 100644 --- a/Runtime/wechat-default/unity-sdk/logger.js.meta +++ b/Runtime/wechat-default/unity-sdk/logger.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 51894a8268827c8e2817bc24eb1a595b + guid: 482d9b142c248fc561b5b7ff7a5dced0 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/mobileKeyboard.meta b/Runtime/wechat-default/unity-sdk/mobileKeyboard.meta index ee09cb78d..d72752ca4 100644 --- a/Runtime/wechat-default/unity-sdk/mobileKeyboard.meta +++ b/Runtime/wechat-default/unity-sdk/mobileKeyboard.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 2c7fe8e249666c9d31fee07076662170 +guid: 1cf376cf4eb35280e07f84b8d59a3599 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/unity-sdk/mobileKeyboard/index.js.meta b/Runtime/wechat-default/unity-sdk/mobileKeyboard/index.js.meta index d32b56c04..c7076e110 100644 --- a/Runtime/wechat-default/unity-sdk/mobileKeyboard/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/mobileKeyboard/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 1ad7ee5e30bd460e6e0dca4b413f19e0 + guid: f36c1d8c76b587b4f772be241a14e739 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/module-helper.js.meta b/Runtime/wechat-default/unity-sdk/module-helper.js.meta index 602cbeab1..6d985c3c4 100644 --- a/Runtime/wechat-default/unity-sdk/module-helper.js.meta +++ b/Runtime/wechat-default/unity-sdk/module-helper.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: d85968fd23e16830b72507294ef4603e + guid: 3f5562ffbfea724e89958cfec50db228 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/open-data.js b/Runtime/wechat-default/unity-sdk/open-data.js index 7e3660613..377c1f5f6 100644 --- a/Runtime/wechat-default/unity-sdk/open-data.js +++ b/Runtime/wechat-default/unity-sdk/open-data.js @@ -12,6 +12,8 @@ var SharedCanvasMode; })(SharedCanvasMode || (SharedCanvasMode = {})); let sharedCanvasMode; let timerId; +let textureObject = null; +let unityTextureObject = null; let textureId; function getOpenDataContext(mode) { @@ -60,12 +62,34 @@ function hookUnityRender() { } else { - gl.bindTexture(gl.TEXTURE_2D, GL.textures[textureId]); - if (isLinearColorSpace) { - gl.texImage2D(gl.TEXTURE_2D, 0, gl.SRGB8_ALPHA8, gl.RGBA, gl.UNSIGNED_BYTE, getSharedCanvas()); + const commonTexImage2DHandler = () => { + + if (textureId) { + gl.bindTexture(gl.TEXTURE_2D, GL.textures[textureId]); + if (isLinearColorSpace) { + gl.texImage2D(gl.TEXTURE_2D, 0, gl.SRGB8_ALPHA8, gl.RGBA, gl.UNSIGNED_BYTE, getSharedCanvas()); + } + else { + gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, getSharedCanvas()); + } + } + }; + if (!textureObject) { + textureObject = gl.createTexture(); + + unityTextureObject = GL.textures[textureId]; + + GL.textures[textureId] = textureObject; + commonTexImage2DHandler(); + + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); } else { - gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, getSharedCanvas()); + + commonTexImage2DHandler(); } timerId = requestAnimationFrame(hookUnityRender); } @@ -91,6 +115,12 @@ function stopHookUnityRender() { const Module = GameGlobal.manager.gameInstance.Module; const { GL } = Module; const gl = GL.currentContext.GLctx; + if (textureObject) { + gl.deleteTexture(textureObject); + GL.textures[textureId] = unityTextureObject; + textureObject = null; + unityTextureObject = null; + } if (gl.emscriptenGLX) { Module.ccall('glxHideOpenData', null, [], []); diff --git a/Runtime/wechat-default/unity-sdk/open-data.js.meta b/Runtime/wechat-default/unity-sdk/open-data.js.meta index dd7377bae..fbc6fd3a5 100644 --- a/Runtime/wechat-default/unity-sdk/open-data.js.meta +++ b/Runtime/wechat-default/unity-sdk/open-data.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: fe7b92854a385e714071e41a63c88ef8 + guid: dc8af1cb1099e6663641957ef26d653d DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/recorder.js.meta b/Runtime/wechat-default/unity-sdk/recorder.js.meta index 141dda536..98f2074c7 100644 --- a/Runtime/wechat-default/unity-sdk/recorder.js.meta +++ b/Runtime/wechat-default/unity-sdk/recorder.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 0f235ac0a118c94f983d7d895a2c4a58 + guid: 45cbf1f3a6ed0448c547cb1194f10713 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/resType.js b/Runtime/wechat-default/unity-sdk/resType.js index 1cc38b161..a4a98d884 100644 --- a/Runtime/wechat-default/unity-sdk/resType.js +++ b/Runtime/wechat-default/unity-sdk/resType.js @@ -93,6 +93,14 @@ export const ResType = { top: 'number', width: 'number', }, + OfficialComponentsInfo: { + notificationComponentInfo: 'OfficialComponentInfo', + }, + OfficialComponentInfo: { + boundingClientRect: 'ClientRect', + isVisible: 'bool', + name: 'string', + }, GetStorageInfoSyncOption: { currentSize: 'number', keys: 'string[]', @@ -180,10 +188,15 @@ export const ResType = { downstreamThroughputKbpsEstimate: 'number', estimate_nettype: 'number', fetchStart: 'number', + httpDNSDomainLookUpEnd: 'number', + httpDNSDomainLookUpStart: 'number', httpRttEstimate: 'number', + invokeStart: 'number', peerIP: 'string', port: 'number', protocol: 'string', + queueEnd: 'number', + queueStart: 'number', receivedBytedCount: 'number', redirectEnd: 'number', redirectStart: 'number', @@ -518,6 +531,12 @@ export const ResType = { status: 'number', errMsg: 'string', }, + GetChatToolInfoSuccessCallbackResult: { + cloudID: 'string', + encryptedData: 'string', + errMsg: 'string', + iv: 'string', + }, GetClipboardDataSuccessCallbackOption: { data: 'string', errMsg: 'string', @@ -555,6 +574,10 @@ export const ResType = { signature: 'string', errMsg: 'string', }, + GetGameExptInfoSuccessCallbackResult: { + list: 'object', + errMsg: 'string', + }, GetGroupEnterInfoError: { errMsg: 'string', errCode: 'number', @@ -565,6 +588,20 @@ export const ResType = { errMsg: 'string', iv: 'string', }, + GetGroupMembersInfoSuccessCallbackResult: { + membersInfo: 'ResultOpenDataContextUserInfo[]', + errMsg: 'string', + }, + ResultOpenDataContextUserInfo: { + avatarUrl: 'string', + city: 'string', + country: 'string', + gender: 'number', + language: 'string', + nickName: 'string', + openId: 'string', + province: 'string', + }, GetInferenceEnvInfoSuccessCallbackResult: { ver: 'string', errMsg: 'string', @@ -667,7 +704,7 @@ export const ResType = { errMsg: 'string', openIdList: 'string[]', }, - RequestFailCallbackErr: { + LoginFailCallbackErr: { errMsg: 'string', errno: 'number', }, @@ -736,9 +773,8 @@ export const ResType = { OnDeviceOrientationChangeListenerResult: { value: 'string', }, - Error: { + ListenerError: { message: 'string', - stack: 'string', }, OnGamepadConnectedListenerResult: { gamepad: 'string', @@ -784,6 +820,9 @@ export const ResType = { networkType: 'string', weakNet: 'bool', }, + OnOfficialComponentsInfoChangeListenerResult: { + OfficialComponentsInfo: 'OfficialComponentsInfo', + }, OnScreenRecordingStateChangedListenerResult: { state: 'string', }, @@ -846,6 +885,9 @@ export const ResType = { windowHeight: 'number', windowWidth: 'number', }, + OnWindowStateChangeListenerResult: { + state: 'string', + }, OpenCardRequestInfo: { cardId: 'string', code: 'string', @@ -889,12 +931,6 @@ export const ResType = { errMsg: 'string', errCode: 'number', }, - RequestMidasFriendPaymentSuccessCallbackResult: { - cloudID: 'string', - encryptedData: 'string', - errMsg: 'string', - iv: 'string', - }, MidasPaymentError: { errMsg: 'string', errCode: 'number', @@ -940,6 +976,10 @@ export const ResType = { scanType: 'string', errMsg: 'string', }, + GroupMemberInfo: { + members: 'string[]', + errMsg: 'string', + }, SetBLEMTUFailCallbackResult: { mtu: 'number', }, diff --git a/Runtime/wechat-default/unity-sdk/resType.js.meta b/Runtime/wechat-default/unity-sdk/resType.js.meta index a2944ea4a..aa6debc65 100644 --- a/Runtime/wechat-default/unity-sdk/resType.js.meta +++ b/Runtime/wechat-default/unity-sdk/resType.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 4ac847704785d5ca9da60ec30a481c1d + guid: 6bf65fd3130a42636706e8f27c88ac25 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/resTypeOther.js.meta b/Runtime/wechat-default/unity-sdk/resTypeOther.js.meta index 7d82133cd..931547b1b 100644 --- a/Runtime/wechat-default/unity-sdk/resTypeOther.js.meta +++ b/Runtime/wechat-default/unity-sdk/resTypeOther.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 56f1932b7976d66cd03a53a245db200a + guid: ee8c124c28fecd6e628ef0358de0d070 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/response.js.meta b/Runtime/wechat-default/unity-sdk/response.js.meta index 77e49672c..944e4e3fe 100644 --- a/Runtime/wechat-default/unity-sdk/response.js.meta +++ b/Runtime/wechat-default/unity-sdk/response.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: fe0ac2b4a0295a7d85ba3e4b2b46676b + guid: 9408b8133f3ff839076800c71691f775 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/sdk.js b/Runtime/wechat-default/unity-sdk/sdk.js index 0c1957ed6..9046d24b0 100644 --- a/Runtime/wechat-default/unity-sdk/sdk.js +++ b/Runtime/wechat-default/unity-sdk/sdk.js @@ -27,10 +27,12 @@ function WX_OneWayNoFunction(functionName, ...params) { } -const onlyReadyResponse = [ +const onlyReadResponse = [ 'getSystemSetting', 'getAppAuthorizeSetting', ]; + +const needParseJson = ['WXMiniReportManagerReport']; // eslint-disable-next-line @typescript-eslint/naming-convention function WX_SyncFunction(functionName, ...params) { return wx[functionName.replace(/^\w/, (a) => a.toLowerCase())](...params); @@ -72,6 +74,10 @@ export default { ...config, success(res) { formatResponse(successType, res); + + if (lowerFunctionName === 'getGameExptInfo') { + res.list = JSON.stringify(res.list); + } moduleHelper.send(`${functionName}Callback`, JSON.stringify({ callbackId, type: 'success', res: JSON.stringify(res), })); @@ -234,7 +240,7 @@ export default { }, WX_SyncFunction_t(functionName, returnType) { const res = WX_SyncFunction(functionName); - if (onlyReadyResponse.includes(functionName.replace(/^\w/, (a) => a.toLowerCase()))) { + if (onlyReadResponse.includes(functionName.replace(/^\w/, (a) => a.toLowerCase()))) { formatResponse(returnType, JSON.parse(JSON.stringify(res))); return JSON.stringify(res); } @@ -355,7 +361,8 @@ export default { } ClassOnEventLists[className + functionName][id + eventName].push(callback); // WXVideoDecoder OnEvent 不规范 特殊处理 - if (className === 'WXVideoDecoder') { + // update: 2025.9.27: 严重怀疑之前 WXPageManager 压根没有跑通过事件监听,跑到下面去了 + if (className === 'WXVideoDecoder' || className === 'WXPageManager') { obj[functionName.replace(/^\w/, (a) => a.toLowerCase())](eventName, callback); } else { @@ -378,7 +385,8 @@ export default { } ClassOnEventLists[className + functionName][id + eventName].forEach((v) => { - if (className === 'WXVideoDecoder') { + + if (className === 'WXVideoDecoder' || className === 'WXPageManager') { obj[functionName.replace(/^\w/, (a) => a.toLowerCase())](eventName, v); } else { @@ -391,6 +399,10 @@ export default { WX_ClassOneWayNoFunction(className, functionName, id); }, WX_ClassOneWayNoFunction_vs(className, functionName, id, param1) { + if (needParseJson.includes(className + functionName)) { + // eslint-disable-next-line no-param-reassign + param1 = JSON.parse(param1); + } WX_ClassOneWayNoFunction(className, functionName, id, param1); }, WX_ClassOneWayNoFunction_t(className, functionName, returnType, id) { diff --git a/Runtime/wechat-default/unity-sdk/sdk.js.meta b/Runtime/wechat-default/unity-sdk/sdk.js.meta index c92d5adbb..e41bc72f8 100644 --- a/Runtime/wechat-default/unity-sdk/sdk.js.meta +++ b/Runtime/wechat-default/unity-sdk/sdk.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 012f4309985e3751e01b4d3283dac03c + guid: abf4fdbba4fc829a641d257934116a49 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/share.js.meta b/Runtime/wechat-default/unity-sdk/share.js.meta index d25487d32..c97e0f177 100644 --- a/Runtime/wechat-default/unity-sdk/share.js.meta +++ b/Runtime/wechat-default/unity-sdk/share.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 06160b6b3caeea9e1b890754fe1c966b + guid: 39c499c857b324d3f2b657d0f53c2288 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/storage.js.meta b/Runtime/wechat-default/unity-sdk/storage.js.meta index 6f5aba0c6..ee98f54bc 100644 --- a/Runtime/wechat-default/unity-sdk/storage.js.meta +++ b/Runtime/wechat-default/unity-sdk/storage.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: c761af256ebdc99f2d237a384cf7c686 + guid: de9f77cb472c82e8ee78415653e3274d DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/texture.js b/Runtime/wechat-default/unity-sdk/texture.js index ad06d3ebd..242514223 100644 --- a/Runtime/wechat-default/unity-sdk/texture.js +++ b/Runtime/wechat-default/unity-sdk/texture.js @@ -39,8 +39,15 @@ const mod = { if (hasCheckSupportedExtensions) { return GameGlobal.TextureCompressedFormat; } - const list = canvas - .getContext(GameGlobal.managerConfig.contextConfig.contextType === 2 ? 'webgl2' : 'webgl') + + const isSupportEmscriptenGLX = wx.env.isSuppportEmscriptenGLX || wx.env.isSupportEmscriptenGLX; + const isWebGL2 = GameGlobal.managerConfig.contextConfig.contextType === 2; + let finalContextType = isWebGL2 ? 'webgl2' : 'webgl'; + if (isSupportEmscriptenGLX) { + finalContextType = isWebGL2 ? 'wxwebgl2' : 'wxwebgl'; + } + const list = canvas + .getContext(finalContextType) .getSupportedExtensions(); const noneLimitSupportedTextures = ['']; // 兜底采用png GameGlobal.TextureCompressedFormat = ''; diff --git a/Runtime/wechat-default/unity-sdk/texture.js.meta b/Runtime/wechat-default/unity-sdk/texture.js.meta index 299bda62c..24c8da3a6 100644 --- a/Runtime/wechat-default/unity-sdk/texture.js.meta +++ b/Runtime/wechat-default/unity-sdk/texture.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 643ced95ec50b8b8e0c0308bc954b9cd + guid: 1678f0c6f67ae49c595da654ac248883 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/touch.meta b/Runtime/wechat-default/unity-sdk/touch.meta index a4701a3a5..7a9b4af32 100644 --- a/Runtime/wechat-default/unity-sdk/touch.meta +++ b/Runtime/wechat-default/unity-sdk/touch.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 20d266f730a420747d016823173cb47b +guid: fcf54fc5792304505268e2aef4496937 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/unity-sdk/touch/index.js.meta b/Runtime/wechat-default/unity-sdk/touch/index.js.meta index 5dcef0fef..1132ee3e7 100644 --- a/Runtime/wechat-default/unity-sdk/touch/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/touch/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 2bc6b2cbe7228a1ff14e98e258ea570d + guid: 49820a9536a186382cd43a65d1ae6a3b DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/upload-file.js.meta b/Runtime/wechat-default/unity-sdk/upload-file.js.meta index 5d4b9c6fa..fa80f663e 100644 --- a/Runtime/wechat-default/unity-sdk/upload-file.js.meta +++ b/Runtime/wechat-default/unity-sdk/upload-file.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 4f19e7f58cb25f9caac4917dc1a335dd + guid: 56e0563ef19745961382ad027ec3a14e DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/userinfo.js.meta b/Runtime/wechat-default/unity-sdk/userinfo.js.meta index 02dd800f2..aca51c860 100644 --- a/Runtime/wechat-default/unity-sdk/userinfo.js.meta +++ b/Runtime/wechat-default/unity-sdk/userinfo.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 321ab22c6613c690a54a85cf066ac67d + guid: c7264fcf0714d30313d3326ac09a971e DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/util.js b/Runtime/wechat-default/unity-sdk/util.js index ce3058ba6..3108ab050 100644 --- a/Runtime/wechat-default/unity-sdk/util.js +++ b/Runtime/wechat-default/unity-sdk/util.js @@ -174,9 +174,4 @@ export default { WX_SetPreferredFramesPerSecond(fps) { wx.setPreferredFramesPerSecond(fps); }, - WXSetSyncReadCacheEnabled(enabled) { - if (GameGlobal.manager && GameGlobal.manager.fs.setSyncReadCacheEnabled) { - GameGlobal.manager.fs.setSyncReadCacheEnabled(!!enabled); - } - } }; diff --git a/Runtime/wechat-default/unity-sdk/util.js.meta b/Runtime/wechat-default/unity-sdk/util.js.meta index 21c325fd7..6cfee32b8 100644 --- a/Runtime/wechat-default/unity-sdk/util.js.meta +++ b/Runtime/wechat-default/unity-sdk/util.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: bb9f8b6f85db51c20faa6892266915bf + guid: dd196993697468dfffcf8af3cd985ade DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/utils.js.meta b/Runtime/wechat-default/unity-sdk/utils.js.meta index 7f57ddb57..abdb84290 100644 --- a/Runtime/wechat-default/unity-sdk/utils.js.meta +++ b/Runtime/wechat-default/unity-sdk/utils.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: a936b59abeb0effa7a6e4c9709641ebd + guid: ada67422e3122b21f489f3db657445e0 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/video.js.meta b/Runtime/wechat-default/unity-sdk/video.js.meta index c783031c7..fa63eecf1 100644 --- a/Runtime/wechat-default/unity-sdk/video.js.meta +++ b/Runtime/wechat-default/unity-sdk/video.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: bb8cc998a47d08dfac5713b055d91de3 + guid: ae981dfb212eedaa546eebe3993c1818 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/video.meta b/Runtime/wechat-default/unity-sdk/video.meta index 9087b83c6..2f3d89eb6 100644 --- a/Runtime/wechat-default/unity-sdk/video.meta +++ b/Runtime/wechat-default/unity-sdk/video.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 460287e509a815f9b1e0f7cd9dec2943 +guid: 3a194ba57013b61d7938eedac76e60c8 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/unity-sdk/video/index.js.meta b/Runtime/wechat-default/unity-sdk/video/index.js.meta index 97aed0043..b87487fec 100644 --- a/Runtime/wechat-default/unity-sdk/video/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/video/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 01a00edfa108c43e918cc0a0692a1874 + guid: caf2dfcb72134de94453de0ff6d224e5 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/wasmcode.meta b/Runtime/wechat-default/wasmcode.meta index cf319d244..9ff6e32b9 100644 --- a/Runtime/wechat-default/wasmcode.meta +++ b/Runtime/wechat-default/wasmcode.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ed56ef0e3c9686d4f3bf47b8a81eb9b9 +guid: 5a5b2712e3e919b1748550900126ce1f folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/wasmcode/game.js.meta b/Runtime/wechat-default/wasmcode/game.js.meta index 02b9123aa..b8c94ff26 100644 --- a/Runtime/wechat-default/wasmcode/game.js.meta +++ b/Runtime/wechat-default/wasmcode/game.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: aaf41f384053e4d2805c7884ec970806 + guid: 73fbb207d25fff330c82c900a7c381fa DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/weapp-adapter.js.meta b/Runtime/wechat-default/weapp-adapter.js.meta index eb9c4fc08..38e11dab7 100644 --- a/Runtime/wechat-default/weapp-adapter.js.meta +++ b/Runtime/wechat-default/weapp-adapter.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: ac182ca527598d0da6f4d9f85fcf0830 + guid: c0398fa622ea1ac233b9258163dddf98 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/workers.meta b/Runtime/wechat-default/workers.meta index c0eb52b4e..9b4c72425 100644 --- a/Runtime/wechat-default/workers.meta +++ b/Runtime/wechat-default/workers.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: bbbb9cb57730b5875cbf0a03dd33bdcb +guid: 550a6ff66acc9db2c2294922460fe265 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/workers/response.meta b/Runtime/wechat-default/workers/response.meta index c7fa08284..d4d4cd420 100644 --- a/Runtime/wechat-default/workers/response.meta +++ b/Runtime/wechat-default/workers/response.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 2e02502ad30c5e5533e44462c589871b +guid: d28f70545164e00705470791009d0c3c folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/wechat-default/workers/response/index.js.meta b/Runtime/wechat-default/workers/response/index.js.meta index 5a050db08..e6c12f433 100644 --- a/Runtime/wechat-default/workers/response/index.js.meta +++ b/Runtime/wechat-default/workers/response/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 - guid: 9b829bd07fed28065eff0c43283958db + guid: 5006ae0e7394ed55a12e8add95ca46fb DefaultImporter: externalObjects: {} userData: diff --git a/package.json b/package.json index 4e01cbcca..400f1db12 100644 --- a/package.json +++ b/package.json @@ -1 +1 @@ -{"name":"com.qq.weixin.minigame","displayName":"WXSDK","description":"WeChat Mini Game Tuanjie Engine Adapter SDK Package.","version":"0.1.29","unity":"2019.4","unityRelease":"29f1","keywords":["Tuanjie","WX"],"dependencies":{}} +{"name":"com.qq.weixin.minigame","displayName":"WXSDK","description":"WeChat Mini Game Tuanjie Engine Adapter SDK Package.","version":"0.1.30","unity":"2019.4","unityRelease":"29f1","keywords":["Tuanjie","WX"],"dependencies":{}}