mirror of
https://github.com/wechat-miniprogram/minigame-tuanjie-transform-sdk.git
synced 2026-04-22 01:35:56 +08:00
Auto-publish.
This commit is contained in:
parent
5d12c4af03
commit
11ead9d9b0
26
CHANGELOG.md
26
CHANGELOG.md
@ -6,6 +6,32 @@ Removed - 删除功能/接口
|
||||
Fixed - 修复问题
|
||||
Others - 其他
|
||||
-->
|
||||
## 2026-3-16 v0.1.32 【普通更新】
|
||||
### Feature
|
||||
* 普通:更新基础库版本
|
||||
* 普通:擂台赛api新增subScoreKey参数
|
||||
* 普通:支持gameeventreport(试玩)
|
||||
* 普通:添加WX数据保护插件,支持游戏数据加密存储和篡改检测
|
||||
### Fixed
|
||||
* 普通:修复订阅消息报错问题
|
||||
|
||||
## 2026-1-13 v0.1.31 【普通更新】
|
||||
### Fixed
|
||||
* 普通:修复glx模式下 createVideo underGameView为true 黑屏的问题
|
||||
* 普通:修复build profile在团结1.6之后的导出问题
|
||||
|
||||
## 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)以加快读取速度
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5de16ad36f64db23a22cae68133a4cd6
|
||||
guid: b2764f66c7a7ee9dfaf53ffe5f6215d0
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 082529088926e488aeebff321e33bf34
|
||||
guid: aacc596790ffe1aad08acb624adcdfaa
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d2446107c636a44e9f63a597550ecd47
|
||||
guid: 8b57398b893716f5822f5e196466fee6
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
267
Editor/PCHighPerformance/WXApkgPacker.cs
Normal file
267
Editor/PCHighPerformance/WXApkgPacker.cs
Normal file
@ -0,0 +1,267 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
|
||||
namespace WeChatWASM
|
||||
{
|
||||
/// <summary>
|
||||
/// wxapkg 文件打包器
|
||||
/// 将目录内容打包成 .wxapkg 格式
|
||||
///
|
||||
/// wxapkg 格式结构:
|
||||
/// 1. 头部段 (14 字节)
|
||||
/// - 起始标志: 1 字节 (0xBE)
|
||||
/// - 未知字段: 4 字节 (固定为 0)
|
||||
/// - 结束标志: 1 字节 (0xED)
|
||||
/// - 索引段长度: 4 字节 (大端序)
|
||||
/// - 数据段长度: 4 字节 (大端序)
|
||||
/// 2. 索引段
|
||||
/// - 文件数量: 4 字节 (大端序)
|
||||
/// - 文件信息块序列(每个文件):
|
||||
/// - 文件名长度: 4 字节 (大端序)
|
||||
/// - 文件名: 可变长度 (UTF-8)
|
||||
/// - 文件偏移: 4 字节 (大端序)
|
||||
/// - 文件长度: 4 字节 (大端序)
|
||||
/// 3. 数据段
|
||||
/// - 实际文件内容的二进制数据
|
||||
/// </summary>
|
||||
public static class WXApkgPacker
|
||||
{
|
||||
private const byte HEADER_MARK_START = 0xBE;
|
||||
private const byte HEADER_MARK_END = 0xED;
|
||||
private const int HEADER_SIZE = 14;
|
||||
|
||||
/// <summary>
|
||||
/// 文件信息结构
|
||||
/// </summary>
|
||||
private class FileInfo
|
||||
{
|
||||
public string RelativePath; // 相对路径(以 / 开头)
|
||||
public string FullPath; // 完整路径
|
||||
public int Size; // 文件大小
|
||||
public int Offset; // 在数据段中的偏移
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 将目录打包成 wxapkg 文件
|
||||
/// </summary>
|
||||
/// <param name="sourceDir">源目录路径</param>
|
||||
/// <param name="outputPath">输出的 wxapkg 文件路径</param>
|
||||
/// <returns>是否成功</returns>
|
||||
public static bool Pack(string sourceDir, string outputPath)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!Directory.Exists(sourceDir))
|
||||
{
|
||||
Debug.LogError($"[WXApkgPacker] 源目录不存在: {sourceDir}");
|
||||
return false;
|
||||
}
|
||||
|
||||
// 收集所有文件信息
|
||||
var files = CollectFiles(sourceDir);
|
||||
if (files.Count == 0)
|
||||
{
|
||||
Debug.LogError($"[WXApkgPacker] 目录为空: {sourceDir}");
|
||||
return false;
|
||||
}
|
||||
|
||||
Debug.Log($"[WXApkgPacker] 收集到 {files.Count} 个文件");
|
||||
|
||||
// 构建索引段
|
||||
byte[] indexData = BuildIndexSection(files);
|
||||
|
||||
// 构建数据段
|
||||
byte[] dataSection = BuildDataSection(files);
|
||||
|
||||
// 构建头部
|
||||
byte[] header = BuildHeader(indexData.Length, dataSection.Length);
|
||||
|
||||
// 确保输出目录存在
|
||||
string outputDir = Path.GetDirectoryName(outputPath);
|
||||
if (!string.IsNullOrEmpty(outputDir) && !Directory.Exists(outputDir))
|
||||
{
|
||||
Directory.CreateDirectory(outputDir);
|
||||
}
|
||||
|
||||
// 写入文件
|
||||
using (var fs = new FileStream(outputPath, FileMode.Create, FileAccess.Write))
|
||||
{
|
||||
fs.Write(header, 0, header.Length);
|
||||
fs.Write(indexData, 0, indexData.Length);
|
||||
fs.Write(dataSection, 0, dataSection.Length);
|
||||
}
|
||||
|
||||
long totalSize = header.Length + indexData.Length + dataSection.Length;
|
||||
Debug.Log($"[WXApkgPacker] 打包完成: {outputPath}");
|
||||
Debug.Log($"[WXApkgPacker] 文件大小: {totalSize / 1024.0 / 1024.0:F2} MB");
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogError($"[WXApkgPacker] 打包失败: {e.Message}");
|
||||
Debug.LogException(e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 收集目录下所有文件
|
||||
/// </summary>
|
||||
private static List<FileInfo> CollectFiles(string sourceDir)
|
||||
{
|
||||
var files = new List<FileInfo>();
|
||||
var allFiles = Directory.GetFiles(sourceDir, "*", SearchOption.AllDirectories);
|
||||
|
||||
foreach (var filePath in allFiles)
|
||||
{
|
||||
// 跳过 .DS_Store 等隐藏文件
|
||||
string fileName = Path.GetFileName(filePath);
|
||||
if (fileName.StartsWith("."))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// 计算相对路径(使用正斜杠,以 / 开头)
|
||||
string relativePath = filePath.Substring(sourceDir.Length);
|
||||
relativePath = relativePath.Replace('\\', '/');
|
||||
if (!relativePath.StartsWith("/"))
|
||||
{
|
||||
relativePath = "/" + relativePath;
|
||||
}
|
||||
|
||||
var info = new System.IO.FileInfo(filePath);
|
||||
files.Add(new FileInfo
|
||||
{
|
||||
RelativePath = relativePath,
|
||||
FullPath = filePath,
|
||||
Size = (int)info.Length
|
||||
});
|
||||
}
|
||||
|
||||
// 按路径排序,保持一致性
|
||||
files.Sort((a, b) => string.Compare(a.RelativePath, b.RelativePath, StringComparison.Ordinal));
|
||||
|
||||
return files;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 构建头部段 (14 字节)
|
||||
/// </summary>
|
||||
private static byte[] BuildHeader(int indexLength, int dataLength)
|
||||
{
|
||||
byte[] header = new byte[HEADER_SIZE];
|
||||
|
||||
// 起始标志
|
||||
header[0] = HEADER_MARK_START;
|
||||
|
||||
// 4 字节未知字段 (固定为 0)
|
||||
header[1] = 0;
|
||||
header[2] = 0;
|
||||
header[3] = 0;
|
||||
header[4] = 0;
|
||||
|
||||
// 结束标志
|
||||
header[5] = HEADER_MARK_END;
|
||||
|
||||
// 索引段长度 (大端序)
|
||||
WriteInt32BE(header, 6, indexLength);
|
||||
|
||||
// 数据段长度 (大端序)
|
||||
WriteInt32BE(header, 10, dataLength);
|
||||
|
||||
return header;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 构建索引段
|
||||
/// </summary>
|
||||
private static byte[] BuildIndexSection(List<FileInfo> files)
|
||||
{
|
||||
using (var ms = new MemoryStream())
|
||||
using (var writer = new BinaryWriter(ms))
|
||||
{
|
||||
// 文件数量 (大端序)
|
||||
WriteInt32BE(writer, files.Count);
|
||||
|
||||
// 计算数据段起始偏移
|
||||
// 偏移量 = 头部大小 + 索引段大小
|
||||
// 需要先计算索引段大小
|
||||
int indexSize = 4; // 文件数量
|
||||
foreach (var file in files)
|
||||
{
|
||||
byte[] nameBytes = Encoding.UTF8.GetBytes(file.RelativePath);
|
||||
indexSize += 4 + nameBytes.Length + 4 + 4; // nameLen + name + offset + size
|
||||
}
|
||||
|
||||
int dataOffset = HEADER_SIZE + indexSize;
|
||||
|
||||
// 写入每个文件的索引信息
|
||||
foreach (var file in files)
|
||||
{
|
||||
byte[] nameBytes = Encoding.UTF8.GetBytes(file.RelativePath);
|
||||
|
||||
// 文件名长度 (大端序)
|
||||
WriteInt32BE(writer, nameBytes.Length);
|
||||
|
||||
// 文件名
|
||||
writer.Write(nameBytes);
|
||||
|
||||
// 文件偏移 (大端序)
|
||||
file.Offset = dataOffset;
|
||||
WriteInt32BE(writer, dataOffset);
|
||||
|
||||
// 文件大小 (大端序)
|
||||
WriteInt32BE(writer, file.Size);
|
||||
|
||||
// 更新下一个文件的偏移
|
||||
dataOffset += file.Size;
|
||||
}
|
||||
|
||||
return ms.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 构建数据段
|
||||
/// </summary>
|
||||
private static byte[] BuildDataSection(List<FileInfo> files)
|
||||
{
|
||||
using (var ms = new MemoryStream())
|
||||
{
|
||||
foreach (var file in files)
|
||||
{
|
||||
byte[] content = File.ReadAllBytes(file.FullPath);
|
||||
ms.Write(content, 0, content.Length);
|
||||
}
|
||||
|
||||
return ms.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 写入 32 位大端序整数到字节数组
|
||||
/// </summary>
|
||||
private static void WriteInt32BE(byte[] buffer, int offset, int value)
|
||||
{
|
||||
buffer[offset] = (byte)((value >> 24) & 0xFF);
|
||||
buffer[offset + 1] = (byte)((value >> 16) & 0xFF);
|
||||
buffer[offset + 2] = (byte)((value >> 8) & 0xFF);
|
||||
buffer[offset + 3] = (byte)(value & 0xFF);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 写入 32 位大端序整数到流
|
||||
/// </summary>
|
||||
private static void WriteInt32BE(BinaryWriter writer, int value)
|
||||
{
|
||||
writer.Write((byte)((value >> 24) & 0xFF));
|
||||
writer.Write((byte)((value >> 16) & 0xFF));
|
||||
writer.Write((byte)((value >> 8) & 0xFF));
|
||||
writer.Write((byte)(value & 0xFF));
|
||||
}
|
||||
}
|
||||
}
|
||||
7
Editor/PCHighPerformance/WXApkgPacker.cs.meta
Normal file
7
Editor/PCHighPerformance/WXApkgPacker.cs.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 92432ea937bc0c5eb90a582c16865d31
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
234
Editor/PCHighPerformance/WXPCHPBuildHelper.cs
Normal file
234
Editor/PCHighPerformance/WXPCHPBuildHelper.cs
Normal file
@ -0,0 +1,234 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using UnityEditor.Build.Reporting;
|
||||
|
||||
namespace WeChatWASM
|
||||
{
|
||||
/// <summary>
|
||||
/// PC高性能小游戏构建辅助类
|
||||
/// 用于在微信小游戏转换工具面板中集成PC高性能模式构建
|
||||
/// </summary>
|
||||
public static class WXPCHPBuildHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// PC高性能构建产物目录名
|
||||
/// </summary>
|
||||
public const string PCHPOutputDir = "pchpcode";
|
||||
|
||||
/// <summary>
|
||||
/// 检查是否开启了PC高性能模式
|
||||
/// </summary>
|
||||
public static bool IsPCHighPerformanceEnabled()
|
||||
{
|
||||
var config = UnityUtil.GetEditorConf();
|
||||
bool enabled = config != null && config.ProjectConf.EnablePCHighPerformance;
|
||||
Debug.Log($"[PC高性能模式] 检查配置: config={config != null}, EnablePCHighPerformance={config?.ProjectConf?.EnablePCHighPerformance}, 结果={enabled}");
|
||||
return enabled;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 执行PC高性能构建
|
||||
/// </summary>
|
||||
/// <param name="exportBasePath">导出基础路径(来自小游戏面板配置)</param>
|
||||
/// <returns>构建是否成功</returns>
|
||||
public static bool BuildPCHighPerformance(string exportBasePath)
|
||||
{
|
||||
if (string.IsNullOrEmpty(exportBasePath))
|
||||
{
|
||||
Debug.LogError("[PC高性能模式] 导出路径为空,无法构建");
|
||||
return false;
|
||||
}
|
||||
|
||||
// 确定构建目标平台
|
||||
var currentPlatform = Application.platform;
|
||||
BuildTarget buildTarget;
|
||||
string platformName;
|
||||
|
||||
if (currentPlatform == RuntimePlatform.OSXEditor)
|
||||
{
|
||||
buildTarget = BuildTarget.StandaloneOSX;
|
||||
platformName = "Mac";
|
||||
}
|
||||
else
|
||||
{
|
||||
buildTarget = BuildTarget.StandaloneWindows64;
|
||||
platformName = "Windows";
|
||||
}
|
||||
|
||||
// 构建输出路径:直接放在 minigame/pchpcode 目录下
|
||||
string pchpOutputPath = Path.Combine(exportBasePath, WXConvertCore.miniGameDir, PCHPOutputDir);
|
||||
|
||||
Debug.Log($"[PC高性能模式] 开始构建,目标平台: {platformName}");
|
||||
Debug.Log($"[PC高性能模式] 输出路径: {pchpOutputPath}");
|
||||
|
||||
// 保存当前构建目标
|
||||
var originalTarget = EditorUserBuildSettings.activeBuildTarget;
|
||||
var originalTargetGroup = EditorUserBuildSettings.selectedBuildTargetGroup;
|
||||
|
||||
try
|
||||
{
|
||||
// 切换构建目标(如果需要)
|
||||
if (originalTarget != buildTarget)
|
||||
{
|
||||
Debug.Log($"[PC高性能模式] 切换构建目标: {originalTarget} -> {buildTarget}");
|
||||
if (!EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.Standalone, buildTarget))
|
||||
{
|
||||
Debug.LogError("[PC高性能模式] 切换构建目标失败");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// 配置 Player Settings
|
||||
ConfigurePlayerSettings();
|
||||
|
||||
// 确保输出目录存在
|
||||
if (!Directory.Exists(pchpOutputPath))
|
||||
{
|
||||
Directory.CreateDirectory(pchpOutputPath);
|
||||
}
|
||||
|
||||
// 获取可执行文件路径
|
||||
string executablePath = GetExecutablePath(pchpOutputPath, buildTarget);
|
||||
|
||||
// 获取场景列表
|
||||
var scenes = GetEnabledScenes();
|
||||
if (scenes.Length == 0)
|
||||
{
|
||||
Debug.LogError("[PC高性能模式] 没有启用的场景,请在 Build Settings 中添加场景");
|
||||
EditorUtility.DisplayDialog("PC高性能模式构建失败", "没有启用的场景,请在 Build Settings 中添加场景", "确定");
|
||||
return false;
|
||||
}
|
||||
|
||||
// 构建选项
|
||||
var buildOptions = BuildOptions.None;
|
||||
|
||||
// 执行构建
|
||||
Debug.Log($"[PC高性能模式] 执行构建,输出: {executablePath}");
|
||||
var report = BuildPipeline.BuildPlayer(scenes, executablePath, buildTarget, buildOptions);
|
||||
|
||||
// 检查构建结果
|
||||
if (report.summary.result == BuildResult.Succeeded)
|
||||
{
|
||||
Debug.Log($"[PC高性能模式] 构建成功! 耗时: {report.summary.totalTime.TotalSeconds:F2}秒");
|
||||
Debug.Log($"[PC高性能模式] 输出路径: {pchpOutputPath}");
|
||||
|
||||
// 打包成 wxapkg 格式(先打包到临时位置)
|
||||
string tempWxapkgPath = Path.Combine(exportBasePath, WXConvertCore.miniGameDir, $"{PCHPOutputDir}_temp.wxapkg");
|
||||
string finalWxapkgPath = Path.Combine(pchpOutputPath, $"{PCHPOutputDir}.wxapkg");
|
||||
|
||||
Debug.Log($"[PC高性能模式] 开始打包 wxapkg...");
|
||||
|
||||
if (WXApkgPacker.Pack(pchpOutputPath, tempWxapkgPath))
|
||||
{
|
||||
// 删除原始构建材料
|
||||
Debug.Log($"[PC高性能模式] 清理原始构建材料...");
|
||||
Directory.Delete(pchpOutputPath, true);
|
||||
|
||||
// 重新创建目录并移动 wxapkg
|
||||
Directory.CreateDirectory(pchpOutputPath);
|
||||
File.Move(tempWxapkgPath, finalWxapkgPath);
|
||||
|
||||
Debug.Log($"[PC高性能模式] wxapkg 打包完成: {finalWxapkgPath}");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("[PC高性能模式] wxapkg 打包失败,保留原始构建产物");
|
||||
if (File.Exists(tempWxapkgPath))
|
||||
{
|
||||
File.Delete(tempWxapkgPath);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError($"[PC高性能模式] 构建失败: {report.summary.result}");
|
||||
foreach (var step in report.steps)
|
||||
{
|
||||
foreach (var message in step.messages)
|
||||
{
|
||||
if (message.type == LogType.Error)
|
||||
{
|
||||
Debug.LogError($"[PC高性能模式] 构建错误: {message.content}");
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch (System.Exception e)
|
||||
{
|
||||
Debug.LogError($"[PC高性能模式] 构建异常: {e.Message}");
|
||||
Debug.LogException(e);
|
||||
return false;
|
||||
}
|
||||
finally
|
||||
{
|
||||
// 始终恢复到 WebGL 构建目标,确保微信小游戏转换工具能正常加载
|
||||
if (EditorUserBuildSettings.activeBuildTarget != BuildTarget.WebGL)
|
||||
{
|
||||
Debug.Log($"[PC高性能模式] 切换回 WebGL 构建目标");
|
||||
EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.WebGL, BuildTarget.WebGL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 配置 Player Settings 用于 PC 高性能构建
|
||||
/// </summary>
|
||||
private static void ConfigurePlayerSettings()
|
||||
{
|
||||
// 设置窗口模式
|
||||
PlayerSettings.fullScreenMode = FullScreenMode.Windowed;
|
||||
|
||||
// 设置默认分辨率
|
||||
PlayerSettings.defaultScreenWidth = 1280;
|
||||
PlayerSettings.defaultScreenHeight = 720;
|
||||
|
||||
// 允许调整窗口大小
|
||||
PlayerSettings.resizableWindow = true;
|
||||
|
||||
Debug.Log("[PC高性能模式] Player Settings 配置完成");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取可执行文件路径
|
||||
/// </summary>
|
||||
private static string GetExecutablePath(string outputPath, BuildTarget target)
|
||||
{
|
||||
string productName = PlayerSettings.productName;
|
||||
if (string.IsNullOrEmpty(productName))
|
||||
{
|
||||
productName = "Game";
|
||||
}
|
||||
|
||||
if (target == BuildTarget.StandaloneOSX)
|
||||
{
|
||||
return Path.Combine(outputPath, $"{productName}.app");
|
||||
}
|
||||
else
|
||||
{
|
||||
return Path.Combine(outputPath, $"{productName}.exe");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取启用的场景列表
|
||||
/// </summary>
|
||||
private static string[] GetEnabledScenes()
|
||||
{
|
||||
var scenes = new List<string>();
|
||||
foreach (var scene in EditorBuildSettings.scenes)
|
||||
{
|
||||
if (scene.enabled)
|
||||
{
|
||||
scenes.Add(scene.path);
|
||||
}
|
||||
}
|
||||
return scenes.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
7
Editor/PCHighPerformance/WXPCHPBuildHelper.cs.meta
Normal file
7
Editor/PCHighPerformance/WXPCHPBuildHelper.cs.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1455a91f4635862b70423ea92eff07bb
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -273,6 +273,24 @@ namespace WeChatWASM
|
||||
finishExport();
|
||||
}
|
||||
}
|
||||
|
||||
// PC高性能模式:在小游戏构建完成后构建PC版本
|
||||
if (buildWebGL && WXPCHPBuildHelper.IsPCHighPerformanceEnabled())
|
||||
{
|
||||
Debug.Log("[微信小游戏] 小游戏构建完成,开始构建PC高性能版本...");
|
||||
|
||||
if (!WXPCHPBuildHelper.BuildPCHighPerformance(config.ProjectConf.DST))
|
||||
{
|
||||
Debug.LogError("[微信小游戏] PC高性能模式构建失败");
|
||||
EditorUtility.DisplayDialog("PC高性能模式构建失败",
|
||||
"PC高性能版本构建失败,但小游戏版本已构建成功。", "确定");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("[微信小游戏] PC高性能版本构建完成!");
|
||||
}
|
||||
}
|
||||
|
||||
return WXExportError.SUCCEED;
|
||||
}
|
||||
|
||||
@ -428,11 +446,11 @@ namespace WeChatWASM
|
||||
bool showEnableGLX2022Plugin = config.CompileOptions.enableEmscriptenGLX && IsCompatibleWithUnity202203OrNewer();
|
||||
|
||||
var glx2022Importer = AssetImporter.GetAtPath(glLibs[0]) as PluginImporter;
|
||||
#if PLATFORM_WEIXINMINIGAME
|
||||
#if PLATFORM_WEIXINMINIGAME
|
||||
glx2022Importer.SetCompatibleWithPlatform(BuildTarget.WeixinMiniGame, showEnableGLX2022Plugin);
|
||||
#else
|
||||
glx2022Importer.SetCompatibleWithPlatform(BuildTarget.WebGL, showEnableGLX2022Plugin);
|
||||
#endif
|
||||
#else
|
||||
glx2022Importer.SetCompatibleWithPlatform(BuildTarget.WebGL, showEnableGLX2022Plugin);
|
||||
#endif
|
||||
SetPluginCompatibilityByModifyingMetadataFile(glLibs[0], showEnableGLX2022Plugin);
|
||||
}
|
||||
|
||||
@ -441,11 +459,11 @@ namespace WeChatWASM
|
||||
bool showEnableGLX2021Plugin = config.CompileOptions.enableEmscriptenGLX && IsCompatibleWithUnity202102To202203();
|
||||
|
||||
var glx2021Importer = AssetImporter.GetAtPath(glLibs[1]) as PluginImporter;
|
||||
#if PLATFORM_WEIXINMINIGAME
|
||||
#if PLATFORM_WEIXINMINIGAME
|
||||
glx2021Importer.SetCompatibleWithPlatform(BuildTarget.WeixinMiniGame, showEnableGLX2021Plugin);
|
||||
#else
|
||||
glx2021Importer.SetCompatibleWithPlatform(BuildTarget.WebGL, showEnableGLX2021Plugin);
|
||||
#endif
|
||||
#else
|
||||
glx2021Importer.SetCompatibleWithPlatform(BuildTarget.WebGL, showEnableGLX2021Plugin);
|
||||
#endif
|
||||
SetPluginCompatibilityByModifyingMetadataFile(glLibs[1], showEnableGLX2021Plugin);
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,7 @@ namespace WeChatWASM
|
||||
{
|
||||
public class WXPluginVersion
|
||||
{
|
||||
public static string pluginVersion = "202603030315"; // 这一行不要改他,导出的时候会自动替换
|
||||
public static string pluginVersion = "202603191252"; // 这一行不要改他,导出的时候会自动替换
|
||||
}
|
||||
|
||||
public class WXPluginConf
|
||||
|
||||
Binary file not shown.
@ -493,6 +493,11 @@
|
||||
注意:不要随意修改,默认值为0,0表示不限制
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.WXProjectConf.EnablePCHighPerformance">
|
||||
<summary>
|
||||
是否开启PC高性能模式
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.CompressTexture.halfSize">
|
||||
<summary>
|
||||
自动将图片尺寸减小一半
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 01f24b642a2b90e786ee873037b35a96
|
||||
guid: 84292b2775189daf4efde379175af966
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
8
Runtime/Examples.meta
Normal file
8
Runtime/Examples.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7d6c78027d6455a42af92e84d7d7763e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
257
Runtime/Examples/PCHPTestExample.cs
Normal file
257
Runtime/Examples/PCHPTestExample.cs
Normal file
@ -0,0 +1,257 @@
|
||||
using UnityEngine;
|
||||
using WeChatWASM;
|
||||
|
||||
namespace WeChatWASM.Examples
|
||||
{
|
||||
/// <summary>
|
||||
/// PC高性能小游戏通信测试示例
|
||||
///
|
||||
/// 通信链路:
|
||||
/// 1. C# 调用 ShowToast
|
||||
/// 2. WXPCHPInitScript.CallWXAPI 构建 PCHPRequestMessage
|
||||
/// 3. SendMsgAsync -> direct_applet_sdk.dll -> 内核
|
||||
/// 4. 内核 -> 基础库 pc-adapter -> game.js
|
||||
/// 5. game.js 执行 wx.showToast
|
||||
/// 6. 回调 -> 基础库 -> 内核 -> DLL -> HandleAsyncMessage
|
||||
/// 7. 解析 PCHPResponseMessage -> 触发 C# 回调
|
||||
/// </summary>
|
||||
public class PCHPTestExample : MonoBehaviour
|
||||
{
|
||||
private WXPCHighPerformanceManager _pcManager;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
Debug.Log("[PCHPTestExample] Start - 获取 PC 高性能管理器");
|
||||
|
||||
#if UNITY_STANDALONE_WIN
|
||||
_pcManager = WX.GetPCHighPerformanceManager();
|
||||
|
||||
if (_pcManager != null && _pcManager.IsSupported)
|
||||
{
|
||||
Debug.Log("[PCHPTestExample] PC 高性能模式已支持!");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("[PCHPTestExample] PC 高性能模式不可用");
|
||||
}
|
||||
#else
|
||||
Debug.Log("[PCHPTestExample] 当前平台非 Windows,PC 高性能模式不可用");
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 测试 ShowToast - 在 Inspector 中调用或通过 UI 按钮调用
|
||||
/// </summary>
|
||||
[ContextMenu("Test ShowToast")]
|
||||
public void TestShowToast()
|
||||
{
|
||||
if (_pcManager == null || !_pcManager.IsSupported)
|
||||
{
|
||||
Debug.LogError("[PCHPTestExample] PC 高性能模式不可用");
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.Log("[PCHPTestExample] 调用 ShowToast...");
|
||||
|
||||
_pcManager.ShowToast(
|
||||
new PCHPShowToastOption
|
||||
{
|
||||
title = "Hello from Unity!",
|
||||
icon = "success",
|
||||
duration = 2000,
|
||||
mask = false
|
||||
},
|
||||
success: (res) =>
|
||||
{
|
||||
Debug.Log($"[PCHPTestExample] ShowToast 成功: {res.errMsg}");
|
||||
},
|
||||
fail: (res) =>
|
||||
{
|
||||
Debug.LogError($"[PCHPTestExample] ShowToast 失败: {res.errMsg}");
|
||||
},
|
||||
complete: (res) =>
|
||||
{
|
||||
Debug.Log($"[PCHPTestExample] ShowToast 完成");
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 测试 ShowModal - 在 Inspector 中调用或通过 UI 按钮调用
|
||||
/// </summary>
|
||||
[ContextMenu("Test ShowModal")]
|
||||
public void TestShowModal()
|
||||
{
|
||||
if (_pcManager == null || !_pcManager.IsSupported)
|
||||
{
|
||||
Debug.LogError("[PCHPTestExample] PC 高性能模式不可用");
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.Log("[PCHPTestExample] 调用 ShowModal...");
|
||||
|
||||
_pcManager.ShowModal(
|
||||
new PCHPShowModalOption
|
||||
{
|
||||
title = "提示",
|
||||
content = "这是一个来自 Unity 的模态框测试",
|
||||
showCancel = true,
|
||||
cancelText = "取消",
|
||||
confirmText = "确定"
|
||||
},
|
||||
success: (res) =>
|
||||
{
|
||||
if (res.confirm)
|
||||
{
|
||||
Debug.Log("[PCHPTestExample] 用户点击了确定");
|
||||
}
|
||||
else if (res.cancel)
|
||||
{
|
||||
Debug.Log("[PCHPTestExample] 用户点击了取消");
|
||||
}
|
||||
},
|
||||
fail: (res) =>
|
||||
{
|
||||
Debug.LogError($"[PCHPTestExample] ShowModal 失败: {res.errMsg}");
|
||||
},
|
||||
complete: (res) =>
|
||||
{
|
||||
Debug.Log($"[PCHPTestExample] ShowModal 完成");
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 测试 ShowLoading - 在 Inspector 中调用或通过 UI 按钮调用
|
||||
/// </summary>
|
||||
[ContextMenu("Test ShowLoading")]
|
||||
public void TestShowLoading()
|
||||
{
|
||||
if (_pcManager == null || !_pcManager.IsSupported)
|
||||
{
|
||||
Debug.LogError("[PCHPTestExample] PC 高性能模式不可用");
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.Log("[PCHPTestExample] 调用 ShowLoading...");
|
||||
|
||||
_pcManager.ShowLoading("加载中...", true,
|
||||
success: (res) =>
|
||||
{
|
||||
Debug.Log($"[PCHPTestExample] ShowLoading 成功");
|
||||
|
||||
// 2秒后隐藏
|
||||
StartCoroutine(HideLoadingAfterDelay(2f));
|
||||
},
|
||||
fail: (res) =>
|
||||
{
|
||||
Debug.LogError($"[PCHPTestExample] ShowLoading 失败: {res.errMsg}");
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
private System.Collections.IEnumerator HideLoadingAfterDelay(float delay)
|
||||
{
|
||||
yield return new WaitForSeconds(delay);
|
||||
|
||||
_pcManager?.HideLoading(
|
||||
success: (res) =>
|
||||
{
|
||||
Debug.Log("[PCHPTestExample] HideLoading 成功");
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 测试通用 API 调用
|
||||
/// </summary>
|
||||
[ContextMenu("Test Generic API Call")]
|
||||
public void TestGenericAPICall()
|
||||
{
|
||||
if (_pcManager == null || !_pcManager.IsSupported)
|
||||
{
|
||||
Debug.LogError("[PCHPTestExample] PC 高性能模式不可用");
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.Log("[PCHPTestExample] 调用通用 API (getSystemInfoSync)...");
|
||||
|
||||
// 示例:调用任意 wx API
|
||||
_pcManager.CallWXAPI(
|
||||
"getSystemInfo",
|
||||
new { }, // 无参数
|
||||
onSuccess: (res) =>
|
||||
{
|
||||
Debug.Log($"[PCHPTestExample] getSystemInfo 成功: {res}");
|
||||
},
|
||||
onFail: (res) =>
|
||||
{
|
||||
Debug.LogError($"[PCHPTestExample] getSystemInfo 失败: {res}");
|
||||
},
|
||||
onComplete: (res) =>
|
||||
{
|
||||
Debug.Log("[PCHPTestExample] getSystemInfo 完成");
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 测试事件监听
|
||||
/// </summary>
|
||||
[ContextMenu("Test Event Listener")]
|
||||
public void TestEventListener()
|
||||
{
|
||||
if (_pcManager == null || !_pcManager.IsSupported)
|
||||
{
|
||||
Debug.LogError("[PCHPTestExample] PC 高性能模式不可用");
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.Log("[PCHPTestExample] 注册 onShow 事件监听...");
|
||||
|
||||
_pcManager.On("onShow", (data) =>
|
||||
{
|
||||
Debug.Log($"[PCHPTestExample] 收到 onShow 事件: {data}");
|
||||
});
|
||||
|
||||
_pcManager.On("onHide", (data) =>
|
||||
{
|
||||
Debug.Log($"[PCHPTestExample] 收到 onHide 事件: {data}");
|
||||
});
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
// 简单的测试按钮 UI
|
||||
GUILayout.BeginArea(new Rect(10, 10, 200, 300));
|
||||
GUILayout.Label("PC高性能小游戏测试");
|
||||
|
||||
if (GUILayout.Button("ShowToast"))
|
||||
{
|
||||
TestShowToast();
|
||||
}
|
||||
|
||||
if (GUILayout.Button("ShowModal"))
|
||||
{
|
||||
TestShowModal();
|
||||
}
|
||||
|
||||
if (GUILayout.Button("ShowLoading"))
|
||||
{
|
||||
TestShowLoading();
|
||||
}
|
||||
|
||||
if (GUILayout.Button("GetSystemInfo"))
|
||||
{
|
||||
TestGenericAPICall();
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Register Events"))
|
||||
{
|
||||
TestEventListener();
|
||||
}
|
||||
|
||||
GUILayout.EndArea();
|
||||
}
|
||||
}
|
||||
}
|
||||
7
Runtime/Examples/PCHPTestExample.cs.meta
Normal file
7
Runtime/Examples/PCHPTestExample.cs.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0ded19877eaa0ed06ad5a1d789d245ee
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
Binary file not shown.
@ -3410,7 +3410,7 @@
|
||||
需要基础库: `2.10.0`
|
||||
小程序版本
|
||||
可选值:
|
||||
- 'develop': 开发版;
|
||||
- 'develop': 开发版,提交代码审核时默认使用开发版进行审核。;
|
||||
- 'trial': 体验版;
|
||||
- 'release': 正式版;
|
||||
</summary>
|
||||
@ -3486,6 +3486,11 @@
|
||||
允许微信读写日历的开关
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.AppBaseInfo.PCKernelVersion">
|
||||
<summary>
|
||||
PC 内核版本号,仅在 PC 端存在该值
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.AppBaseInfo.SDKVersion">
|
||||
<summary>
|
||||
客户端基础库版本
|
||||
@ -3588,6 +3593,14 @@
|
||||
<member name="F:WeChatWASM.DeviceInfo.platform">
|
||||
<summary>
|
||||
客户端平台
|
||||
可选值:
|
||||
- 'ios': iOS微信(包含 iPhone、iPad);
|
||||
- 'android': Android微信;
|
||||
- 'ohos': HarmonyOS 手机端微信;
|
||||
- 'ohos_pc': HarmonyOS PC微信;
|
||||
- 'windows': Windows微信;
|
||||
- 'mac': macOS微信;
|
||||
- 'devtools': 微信开发者工具;
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.DeviceInfo.system">
|
||||
@ -3595,6 +3608,16 @@
|
||||
操作系统及版本
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.DirectAdStatusInfo.isInDirectGameAd">
|
||||
<summary>
|
||||
当前是否处于直接广告中
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.DirectAdStatusInfo.isInMask">
|
||||
<summary>
|
||||
当前是否处于蒙层阶段
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.EnterOptionsGame.apiCategory">
|
||||
<summary>
|
||||
需要基础库: `2.20.0`
|
||||
@ -3661,6 +3684,11 @@
|
||||
直播间 id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.LaunchOptionsGame.hostExtraData">
|
||||
<summary>
|
||||
宿主传递的数据,第三方 app 中运行小游戏时返回
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.LaunchOptionsGame.query">
|
||||
<summary>
|
||||
启动小游戏的 query 参数
|
||||
@ -3691,6 +3719,11 @@
|
||||
shareTicket,详见[获取更多转发信息](#)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.HostExtraData.host_scene">
|
||||
<summary>
|
||||
宿主app对应的场景值
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ClientRect.bottom">
|
||||
<summary>
|
||||
下边界坐标,单位:px
|
||||
@ -3721,11 +3754,86 @@
|
||||
宽度,单位:px
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OfficialComponentsInfo.challengeRewardsComponentInfo">
|
||||
<summary>
|
||||
擂台赛组件领奖信息
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OfficialComponentsInfo.notificationComponentInfo">
|
||||
<summary>
|
||||
通知组件信息
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OfficialComponentsInfo.rewardsComponentInfo">
|
||||
<summary>
|
||||
福利组件信息
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ChallengeRewardsComponentInfo.name">
|
||||
<summary>
|
||||
组件的名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ChallengeRewardsComponentInfo.receiveDetail">
|
||||
<summary>
|
||||
领取事件详情(只在onOfficialComponentsInfoChange回调中返回)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ChallengeReceiveDetail.awardResult">
|
||||
<summary>
|
||||
奖励领取结果:1-全部成功, 2-部分成功(礼物达到领取上限), 3-领奖失败
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ChallengeReceiveDetail.receivedRareReward">
|
||||
<summary>
|
||||
是否收到了稀有奖励
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ChallengeReceiveDetail.userSourceList">
|
||||
<summary>
|
||||
用户领取的奖励列表
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.UserSource.sourceType">
|
||||
<summary>
|
||||
奖励类型:0-道具礼包, 1-微信蓝包, 2-h5商家券, 3-现金红包, 4-小程序券, 5-盲盒
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.UserSource.source">
|
||||
<summary>
|
||||
奖励来源信息
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.UserSource.sourceNum">
|
||||
<summary>
|
||||
获取的奖励数量
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SourceInfo.propList">
|
||||
<summary>
|
||||
道具列表
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SourceInfo.type">
|
||||
<summary>
|
||||
奖励类型:1-普通奖励, 2-稀有奖励
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SourceInfo.sourceName">
|
||||
<summary>
|
||||
礼包名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.PropInfo.propName">
|
||||
<summary>
|
||||
道具名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.PropInfo.propNum">
|
||||
<summary>
|
||||
道具数量
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OfficialComponentInfo.boundingClientRect">
|
||||
<summary>
|
||||
组件的布局位置信息
|
||||
@ -3741,6 +3849,46 @@
|
||||
组件的名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RewardsComponentInfo.canReceiveFriendGiftCount">
|
||||
<summary>
|
||||
可领取的好友礼包数量
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RewardsComponentInfo.canReceiveGiftCount">
|
||||
<summary>
|
||||
可领取的礼包数量
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RewardsComponentInfo.name">
|
||||
<summary>
|
||||
组件的名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RewardsComponentInfo.receiveDetail">
|
||||
<summary>
|
||||
领取事件详情(只在onOfficialComponentsInfoChange回调中返回)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ReceiveDetail.desc">
|
||||
<summary>
|
||||
礼包描述,只有 gift 类型才有
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ReceiveDetail.icon">
|
||||
<summary>
|
||||
礼包图标,只有 gift 类型才有
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ReceiveDetail.name">
|
||||
<summary>
|
||||
礼包名称,只有 gift 类型才有
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ReceiveDetail.type">
|
||||
<summary>
|
||||
gift: 礼包, friendGift: 好友礼包
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetStorageInfoSyncOption.currentSize">
|
||||
<summary>
|
||||
当前占用的空间大小, 单位 KB
|
||||
@ -3887,7 +4035,8 @@
|
||||
可选值:
|
||||
- 'ios': iOS微信(包含 iPhone、iPad);
|
||||
- 'android': Android微信;
|
||||
- 'ohos': HarmonyOS微信;
|
||||
- 'ohos': HarmonyOS 手机端微信;
|
||||
- 'ohos_pc': HarmonyOS PC微信;
|
||||
- 'windows': Windows微信;
|
||||
- 'mac': macOS微信;
|
||||
- 'devtools': 微信开发者工具;
|
||||
@ -4542,6 +4691,36 @@
|
||||
是否被添加至 「我的小程序」
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.CheckIsSupportMidasPaymentFailCallbackErr.errMsg">
|
||||
<summary>
|
||||
错误信息
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.CheckIsSupportMidasPaymentSuccessCallbackResult.data">
|
||||
<summary>
|
||||
支付支持信息对象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.CheckIsSupportMidasPaymentSuccessCallbackResult.errMsg">
|
||||
<summary>
|
||||
调用结果信息,格式为 "checkIsSupportMidasPayment:ok"
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.CheckIsSupportMidasPaymentSuccessCallbackDataResult.allow_pay">
|
||||
<summary>
|
||||
是否支持支付,true 表示支持,false 表示不支持
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.CheckIsSupportMidasPaymentSuccessCallbackDataResult.err_code">
|
||||
<summary>
|
||||
错误码,0 表示成功
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.CheckIsSupportMidasPaymentSuccessCallbackDataResult.err_msg">
|
||||
<summary>
|
||||
错误信息,"success" 表示成功
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ChooseImageOption.count">
|
||||
<summary>
|
||||
最多可以选择的图片张数
|
||||
@ -5710,22 +5889,22 @@
|
||||
预告状态:0可用 1取消 2已用
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetChatToolInfoSuccessCallbackResult.cloudID">
|
||||
<member name="F:WeChatWASM.RequestMidasFriendPaymentSuccessCallbackResult.cloudID">
|
||||
<summary>
|
||||
敏感数据对应的云 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)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetChatToolInfoSuccessCallbackResult.encryptedData">
|
||||
<member name="F:WeChatWASM.RequestMidasFriendPaymentSuccessCallbackResult.encryptedData">
|
||||
<summary>
|
||||
包括敏感数据在内的完整转发信息的加密数据,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetChatToolInfoSuccessCallbackResult.errMsg">
|
||||
<member name="F:WeChatWASM.RequestMidasFriendPaymentSuccessCallbackResult.errMsg">
|
||||
<summary>
|
||||
错误信息
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetChatToolInfoSuccessCallbackResult.iv">
|
||||
<member name="F:WeChatWASM.RequestMidasFriendPaymentSuccessCallbackResult.iv">
|
||||
<summary>
|
||||
加密算法的初始向量,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html)
|
||||
</summary>
|
||||
@ -5820,6 +5999,21 @@
|
||||
实验参数数组,不填则获取所有实验参数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GameExptInfo.expt_id">
|
||||
<summary>
|
||||
实验ID,标识实验
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GameExptInfo.param_name">
|
||||
<summary>
|
||||
参数名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GameExptInfo.param_value">
|
||||
<summary>
|
||||
参数值
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetGroupEnterInfoOption.allowSingleChat">
|
||||
<summary>
|
||||
需要基础库: `3.7.8`
|
||||
@ -5941,6 +6135,67 @@
|
||||
本机局域网子网掩码,基础库 2.24.0 开始支持
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetLocationOption.altitude">
|
||||
<summary>
|
||||
需要基础库: `1.6.0`
|
||||
传入 true 会返回高度信息,由于获取高度需要较高精确度,会减慢接口返回速度
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetLocationOption.highAccuracyExpireTime">
|
||||
<summary>
|
||||
需要基础库: `2.9.0`
|
||||
高精度定位超时时间(ms),指定时间内返回最高精度,该值3000ms以上高精度定位才有效果
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetLocationOption.isHighAccuracy">
|
||||
<summary>
|
||||
需要基础库: `2.9.0`
|
||||
开启高精度定位
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetLocationOption.type">
|
||||
<summary>
|
||||
wgs84 返回 gps 坐标,gcj02 返回可用于 wx.openLocation 的坐标
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetLocationSuccessCallbackResult.accuracy">
|
||||
<summary>
|
||||
位置的精确度,反应与真实位置之间的接近程度,可以理解成10即与真实位置相差10m,越小越精确
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetLocationSuccessCallbackResult.altitude">
|
||||
<summary>
|
||||
需要基础库: `1.2.0`
|
||||
高度,单位 m
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetLocationSuccessCallbackResult.horizontalAccuracy">
|
||||
<summary>
|
||||
需要基础库: `1.2.0`
|
||||
水平精度,单位 m
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetLocationSuccessCallbackResult.latitude">
|
||||
<summary>
|
||||
纬度,范围为 -90~90,负数表示南纬
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetLocationSuccessCallbackResult.longitude">
|
||||
<summary>
|
||||
经度,范围为 -180~180,负数表示西经
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetLocationSuccessCallbackResult.speed">
|
||||
<summary>
|
||||
速度,单位 m/s
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetLocationSuccessCallbackResult.verticalAccuracy">
|
||||
<summary>
|
||||
需要基础库: `1.2.0`
|
||||
垂直精度,单位 m(Android 无法获取,返回 0)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetNetworkTypeSuccessCallbackResult.hasSystemProxy">
|
||||
<summary>
|
||||
需要基础库: `2.22.1`
|
||||
@ -6056,6 +6311,17 @@
|
||||
- itemSettings 只返回用户勾选过订阅面板中的“总是保持以上选择,不再询问”的订阅消息。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetShareInfoOption.shareTicket">
|
||||
<summary>
|
||||
shareTicket,详见[获取更多转发信息](#)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetShareInfoOption.timeout">
|
||||
<summary>
|
||||
需要基础库: `1.9.90`
|
||||
超时时间,单位 ms
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetShowSplashAdStatusSuccessCallbackResult.code">
|
||||
<summary>
|
||||
封面广告组件展示状态码
|
||||
@ -6602,6 +6868,11 @@
|
||||
用短链打开小程序时当前页面携带的查询字符串。小程序中使用时,应在进入页面时调用 `wx.onCopyUrl` 自定义 `query`,退出页面时调用 `wx.offCopyUrl`,防止影响其它页面。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OnCopyUrlListenerResult.title">
|
||||
<summary>
|
||||
短链中的自定义标题,显示在小程序名称之后,可以不填
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OnDeviceMotionChangeListenerResult.alpha">
|
||||
<summary>
|
||||
当 手机坐标 X/Y 和 地球 X/Y 重合时,绕着 Z 轴转动的夹角为 alpha,范围值为 [0, 2*PI)。逆时针转动为正。
|
||||
@ -6625,6 +6896,21 @@
|
||||
- 'landscapeReverse': 横屏反方向,以 HOME 键在屏幕左侧为反方向;
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OnDirectAdStatusChangeListenerResult.isEndByAbnormal">
|
||||
<summary>
|
||||
当前直玩广告是否由于异常流程而结束(如 下拉/搜索 进入正在直玩广告流程中的游戏)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OnDirectAdStatusChangeListenerResult.isInDirectGameAd">
|
||||
<summary>
|
||||
当前是否处于直接广告中
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OnDirectAdStatusChangeListenerResult.isInMask">
|
||||
<summary>
|
||||
当前是否处于蒙层阶段
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ListenerError.message">
|
||||
<summary>
|
||||
错误信息,包含堆栈
|
||||
@ -7020,7 +7306,7 @@
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OpenChannelsUserProfileOption.finderUserName">
|
||||
<summary>
|
||||
视频号 id
|
||||
视频号id(参考格式为:sphcqO59YEPCvoe;查看路径为:微信客户端->我tab->视频号->右上角.->视频号名字-视频号ID)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OpenChatToolOption.chatType">
|
||||
@ -7340,6 +7626,53 @@
|
||||
自定义维度,基础库 v2.14.0 开始支持可选
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.FacialRecognitionError.errMsg">
|
||||
<summary>
|
||||
错误信息
|
||||
| 错误码 | 错误信息 | 说明 |
|
||||
| - | - | - |
|
||||
| 0 | 人脸识别成功 | |
|
||||
| 2002004 | 人脸识别失败 | |
|
||||
| 2002006 | 用户取消/超时/不同意,导致未完成人脸识别 | |
|
||||
| 2002007 | 本用户7天内人脸识别已通过,通过日期为XX | |
|
||||
| 2002008 | 本日已调起过人脸识别或者本月调用次数已达上限 | |
|
||||
| 2002009 | 无权限发起人脸识别 | |
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.FacialRecognitionError.errCode">
|
||||
<summary>
|
||||
错误码
|
||||
| 错误码 | 错误信息 | 说明 |
|
||||
| - | - | - |
|
||||
| 0 | 人脸识别成功 | |
|
||||
| 2002004 | 人脸识别失败 | |
|
||||
| 2002006 | 用户取消/超时/不同意,导致未完成人脸识别 | |
|
||||
| 2002007 | 本用户7天内人脸识别已通过,通过日期为XX | |
|
||||
| 2002008 | 本日已调起过人脸识别或者本月调用次数已达上限 | |
|
||||
| 2002009 | 无权限发起人脸识别 | |
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestFacialVerifyOption.verifyId">
|
||||
<summary>
|
||||
人脸核身会话唯一标识(小程序后台根据「用户实名信息(姓名+身份证)」调用微信后台[getVerifyId](https://developers.weixin.qq.com/miniprogram/dev/server/API/face/api_getverifyid.html)接口获取)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestFacialVerifyError.errMsg">
|
||||
<summary>
|
||||
错误信息
|
||||
| 错误码 | 错误信息 | 说明 |
|
||||
| - | - | - |
|
||||
| 0 | 人脸识别完成(需要通过[queryVerifyInfo](https://developers.weixin.qq.com/miniprogram/dev/server/API/face/api_queryverifyinfo.html)接口查询人脸核身真实验证结果) | |
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestFacialVerifyError.errCode">
|
||||
<summary>
|
||||
错误码
|
||||
| 错误码 | 错误信息 | 说明 |
|
||||
| - | - | - |
|
||||
| 0 | 人脸识别完成(需要通过[queryVerifyInfo](https://developers.weixin.qq.com/miniprogram/dev/server/API/face/api_queryverifyinfo.html)接口查询人脸核身真实验证结果) | |
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestMidasFriendPaymentOption.buyQuantity">
|
||||
<summary>
|
||||
购买数量。mode=game 时必填。购买数量。详见 [buyQuantity 限制说明](#buyQuantity限制说明)。
|
||||
@ -7725,7 +8058,7 @@
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SetBackgroundFetchTokenOption.token">
|
||||
<summary>
|
||||
自定义的登录态
|
||||
自定义的登录态。上限 1024 字符。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SetClipboardDataOption.data">
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 71e9b55c1d032860fb8a8436cd200183
|
||||
guid: f16c957495a42f3bc9459358eafe87b7
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
Binary file not shown.
@ -3410,7 +3410,7 @@
|
||||
需要基础库: `2.10.0`
|
||||
小程序版本
|
||||
可选值:
|
||||
- 'develop': 开发版;
|
||||
- 'develop': 开发版,提交代码审核时默认使用开发版进行审核。;
|
||||
- 'trial': 体验版;
|
||||
- 'release': 正式版;
|
||||
</summary>
|
||||
@ -3486,6 +3486,11 @@
|
||||
允许微信读写日历的开关
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.AppBaseInfo.PCKernelVersion">
|
||||
<summary>
|
||||
PC 内核版本号,仅在 PC 端存在该值
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.AppBaseInfo.SDKVersion">
|
||||
<summary>
|
||||
客户端基础库版本
|
||||
@ -3588,6 +3593,14 @@
|
||||
<member name="F:WeChatWASM.DeviceInfo.platform">
|
||||
<summary>
|
||||
客户端平台
|
||||
可选值:
|
||||
- 'ios': iOS微信(包含 iPhone、iPad);
|
||||
- 'android': Android微信;
|
||||
- 'ohos': HarmonyOS 手机端微信;
|
||||
- 'ohos_pc': HarmonyOS PC微信;
|
||||
- 'windows': Windows微信;
|
||||
- 'mac': macOS微信;
|
||||
- 'devtools': 微信开发者工具;
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.DeviceInfo.system">
|
||||
@ -3595,6 +3608,16 @@
|
||||
操作系统及版本
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.DirectAdStatusInfo.isInDirectGameAd">
|
||||
<summary>
|
||||
当前是否处于直接广告中
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.DirectAdStatusInfo.isInMask">
|
||||
<summary>
|
||||
当前是否处于蒙层阶段
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.EnterOptionsGame.apiCategory">
|
||||
<summary>
|
||||
需要基础库: `2.20.0`
|
||||
@ -3661,6 +3684,11 @@
|
||||
直播间 id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.LaunchOptionsGame.hostExtraData">
|
||||
<summary>
|
||||
宿主传递的数据,第三方 app 中运行小游戏时返回
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.LaunchOptionsGame.query">
|
||||
<summary>
|
||||
启动小游戏的 query 参数
|
||||
@ -3691,6 +3719,11 @@
|
||||
shareTicket,详见[获取更多转发信息](#)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.HostExtraData.host_scene">
|
||||
<summary>
|
||||
宿主app对应的场景值
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ClientRect.bottom">
|
||||
<summary>
|
||||
下边界坐标,单位:px
|
||||
@ -3721,11 +3754,86 @@
|
||||
宽度,单位:px
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OfficialComponentsInfo.challengeRewardsComponentInfo">
|
||||
<summary>
|
||||
擂台赛组件领奖信息
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OfficialComponentsInfo.notificationComponentInfo">
|
||||
<summary>
|
||||
通知组件信息
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OfficialComponentsInfo.rewardsComponentInfo">
|
||||
<summary>
|
||||
福利组件信息
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ChallengeRewardsComponentInfo.name">
|
||||
<summary>
|
||||
组件的名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ChallengeRewardsComponentInfo.receiveDetail">
|
||||
<summary>
|
||||
领取事件详情(只在onOfficialComponentsInfoChange回调中返回)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ChallengeReceiveDetail.awardResult">
|
||||
<summary>
|
||||
奖励领取结果:1-全部成功, 2-部分成功(礼物达到领取上限), 3-领奖失败
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ChallengeReceiveDetail.receivedRareReward">
|
||||
<summary>
|
||||
是否收到了稀有奖励
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ChallengeReceiveDetail.userSourceList">
|
||||
<summary>
|
||||
用户领取的奖励列表
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.UserSource.sourceType">
|
||||
<summary>
|
||||
奖励类型:0-道具礼包, 1-微信蓝包, 2-h5商家券, 3-现金红包, 4-小程序券, 5-盲盒
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.UserSource.source">
|
||||
<summary>
|
||||
奖励来源信息
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.UserSource.sourceNum">
|
||||
<summary>
|
||||
获取的奖励数量
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SourceInfo.propList">
|
||||
<summary>
|
||||
道具列表
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SourceInfo.type">
|
||||
<summary>
|
||||
奖励类型:1-普通奖励, 2-稀有奖励
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SourceInfo.sourceName">
|
||||
<summary>
|
||||
礼包名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.PropInfo.propName">
|
||||
<summary>
|
||||
道具名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.PropInfo.propNum">
|
||||
<summary>
|
||||
道具数量
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OfficialComponentInfo.boundingClientRect">
|
||||
<summary>
|
||||
组件的布局位置信息
|
||||
@ -3741,6 +3849,46 @@
|
||||
组件的名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RewardsComponentInfo.canReceiveFriendGiftCount">
|
||||
<summary>
|
||||
可领取的好友礼包数量
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RewardsComponentInfo.canReceiveGiftCount">
|
||||
<summary>
|
||||
可领取的礼包数量
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RewardsComponentInfo.name">
|
||||
<summary>
|
||||
组件的名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RewardsComponentInfo.receiveDetail">
|
||||
<summary>
|
||||
领取事件详情(只在onOfficialComponentsInfoChange回调中返回)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ReceiveDetail.desc">
|
||||
<summary>
|
||||
礼包描述,只有 gift 类型才有
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ReceiveDetail.icon">
|
||||
<summary>
|
||||
礼包图标,只有 gift 类型才有
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ReceiveDetail.name">
|
||||
<summary>
|
||||
礼包名称,只有 gift 类型才有
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ReceiveDetail.type">
|
||||
<summary>
|
||||
gift: 礼包, friendGift: 好友礼包
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetStorageInfoSyncOption.currentSize">
|
||||
<summary>
|
||||
当前占用的空间大小, 单位 KB
|
||||
@ -3887,7 +4035,8 @@
|
||||
可选值:
|
||||
- 'ios': iOS微信(包含 iPhone、iPad);
|
||||
- 'android': Android微信;
|
||||
- 'ohos': HarmonyOS微信;
|
||||
- 'ohos': HarmonyOS 手机端微信;
|
||||
- 'ohos_pc': HarmonyOS PC微信;
|
||||
- 'windows': Windows微信;
|
||||
- 'mac': macOS微信;
|
||||
- 'devtools': 微信开发者工具;
|
||||
@ -4542,6 +4691,36 @@
|
||||
是否被添加至 「我的小程序」
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.CheckIsSupportMidasPaymentFailCallbackErr.errMsg">
|
||||
<summary>
|
||||
错误信息
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.CheckIsSupportMidasPaymentSuccessCallbackResult.data">
|
||||
<summary>
|
||||
支付支持信息对象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.CheckIsSupportMidasPaymentSuccessCallbackResult.errMsg">
|
||||
<summary>
|
||||
调用结果信息,格式为 "checkIsSupportMidasPayment:ok"
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.CheckIsSupportMidasPaymentSuccessCallbackDataResult.allow_pay">
|
||||
<summary>
|
||||
是否支持支付,true 表示支持,false 表示不支持
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.CheckIsSupportMidasPaymentSuccessCallbackDataResult.err_code">
|
||||
<summary>
|
||||
错误码,0 表示成功
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.CheckIsSupportMidasPaymentSuccessCallbackDataResult.err_msg">
|
||||
<summary>
|
||||
错误信息,"success" 表示成功
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ChooseImageOption.count">
|
||||
<summary>
|
||||
最多可以选择的图片张数
|
||||
@ -5710,22 +5889,22 @@
|
||||
预告状态:0可用 1取消 2已用
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetChatToolInfoSuccessCallbackResult.cloudID">
|
||||
<member name="F:WeChatWASM.RequestMidasFriendPaymentSuccessCallbackResult.cloudID">
|
||||
<summary>
|
||||
敏感数据对应的云 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)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetChatToolInfoSuccessCallbackResult.encryptedData">
|
||||
<member name="F:WeChatWASM.RequestMidasFriendPaymentSuccessCallbackResult.encryptedData">
|
||||
<summary>
|
||||
包括敏感数据在内的完整转发信息的加密数据,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetChatToolInfoSuccessCallbackResult.errMsg">
|
||||
<member name="F:WeChatWASM.RequestMidasFriendPaymentSuccessCallbackResult.errMsg">
|
||||
<summary>
|
||||
错误信息
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetChatToolInfoSuccessCallbackResult.iv">
|
||||
<member name="F:WeChatWASM.RequestMidasFriendPaymentSuccessCallbackResult.iv">
|
||||
<summary>
|
||||
加密算法的初始向量,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html)
|
||||
</summary>
|
||||
@ -5820,6 +5999,21 @@
|
||||
实验参数数组,不填则获取所有实验参数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GameExptInfo.expt_id">
|
||||
<summary>
|
||||
实验ID,标识实验
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GameExptInfo.param_name">
|
||||
<summary>
|
||||
参数名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GameExptInfo.param_value">
|
||||
<summary>
|
||||
参数值
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetGroupEnterInfoOption.allowSingleChat">
|
||||
<summary>
|
||||
需要基础库: `3.7.8`
|
||||
@ -5941,6 +6135,67 @@
|
||||
本机局域网子网掩码,基础库 2.24.0 开始支持
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetLocationOption.altitude">
|
||||
<summary>
|
||||
需要基础库: `1.6.0`
|
||||
传入 true 会返回高度信息,由于获取高度需要较高精确度,会减慢接口返回速度
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetLocationOption.highAccuracyExpireTime">
|
||||
<summary>
|
||||
需要基础库: `2.9.0`
|
||||
高精度定位超时时间(ms),指定时间内返回最高精度,该值3000ms以上高精度定位才有效果
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetLocationOption.isHighAccuracy">
|
||||
<summary>
|
||||
需要基础库: `2.9.0`
|
||||
开启高精度定位
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetLocationOption.type">
|
||||
<summary>
|
||||
wgs84 返回 gps 坐标,gcj02 返回可用于 wx.openLocation 的坐标
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetLocationSuccessCallbackResult.accuracy">
|
||||
<summary>
|
||||
位置的精确度,反应与真实位置之间的接近程度,可以理解成10即与真实位置相差10m,越小越精确
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetLocationSuccessCallbackResult.altitude">
|
||||
<summary>
|
||||
需要基础库: `1.2.0`
|
||||
高度,单位 m
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetLocationSuccessCallbackResult.horizontalAccuracy">
|
||||
<summary>
|
||||
需要基础库: `1.2.0`
|
||||
水平精度,单位 m
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetLocationSuccessCallbackResult.latitude">
|
||||
<summary>
|
||||
纬度,范围为 -90~90,负数表示南纬
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetLocationSuccessCallbackResult.longitude">
|
||||
<summary>
|
||||
经度,范围为 -180~180,负数表示西经
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetLocationSuccessCallbackResult.speed">
|
||||
<summary>
|
||||
速度,单位 m/s
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetLocationSuccessCallbackResult.verticalAccuracy">
|
||||
<summary>
|
||||
需要基础库: `1.2.0`
|
||||
垂直精度,单位 m(Android 无法获取,返回 0)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetNetworkTypeSuccessCallbackResult.hasSystemProxy">
|
||||
<summary>
|
||||
需要基础库: `2.22.1`
|
||||
@ -6056,6 +6311,17 @@
|
||||
- itemSettings 只返回用户勾选过订阅面板中的“总是保持以上选择,不再询问”的订阅消息。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetShareInfoOption.shareTicket">
|
||||
<summary>
|
||||
shareTicket,详见[获取更多转发信息](#)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetShareInfoOption.timeout">
|
||||
<summary>
|
||||
需要基础库: `1.9.90`
|
||||
超时时间,单位 ms
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetShowSplashAdStatusSuccessCallbackResult.code">
|
||||
<summary>
|
||||
封面广告组件展示状态码
|
||||
@ -6602,6 +6868,11 @@
|
||||
用短链打开小程序时当前页面携带的查询字符串。小程序中使用时,应在进入页面时调用 `wx.onCopyUrl` 自定义 `query`,退出页面时调用 `wx.offCopyUrl`,防止影响其它页面。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OnCopyUrlListenerResult.title">
|
||||
<summary>
|
||||
短链中的自定义标题,显示在小程序名称之后,可以不填
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OnDeviceMotionChangeListenerResult.alpha">
|
||||
<summary>
|
||||
当 手机坐标 X/Y 和 地球 X/Y 重合时,绕着 Z 轴转动的夹角为 alpha,范围值为 [0, 2*PI)。逆时针转动为正。
|
||||
@ -6625,6 +6896,21 @@
|
||||
- 'landscapeReverse': 横屏反方向,以 HOME 键在屏幕左侧为反方向;
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OnDirectAdStatusChangeListenerResult.isEndByAbnormal">
|
||||
<summary>
|
||||
当前直玩广告是否由于异常流程而结束(如 下拉/搜索 进入正在直玩广告流程中的游戏)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OnDirectAdStatusChangeListenerResult.isInDirectGameAd">
|
||||
<summary>
|
||||
当前是否处于直接广告中
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OnDirectAdStatusChangeListenerResult.isInMask">
|
||||
<summary>
|
||||
当前是否处于蒙层阶段
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ListenerError.message">
|
||||
<summary>
|
||||
错误信息,包含堆栈
|
||||
@ -7020,7 +7306,7 @@
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OpenChannelsUserProfileOption.finderUserName">
|
||||
<summary>
|
||||
视频号 id
|
||||
视频号id(参考格式为:sphcqO59YEPCvoe;查看路径为:微信客户端->我tab->视频号->右上角.->视频号名字-视频号ID)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OpenChatToolOption.chatType">
|
||||
@ -7340,6 +7626,53 @@
|
||||
自定义维度,基础库 v2.14.0 开始支持可选
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.FacialRecognitionError.errMsg">
|
||||
<summary>
|
||||
错误信息
|
||||
| 错误码 | 错误信息 | 说明 |
|
||||
| - | - | - |
|
||||
| 0 | 人脸识别成功 | |
|
||||
| 2002004 | 人脸识别失败 | |
|
||||
| 2002006 | 用户取消/超时/不同意,导致未完成人脸识别 | |
|
||||
| 2002007 | 本用户7天内人脸识别已通过,通过日期为XX | |
|
||||
| 2002008 | 本日已调起过人脸识别或者本月调用次数已达上限 | |
|
||||
| 2002009 | 无权限发起人脸识别 | |
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.FacialRecognitionError.errCode">
|
||||
<summary>
|
||||
错误码
|
||||
| 错误码 | 错误信息 | 说明 |
|
||||
| - | - | - |
|
||||
| 0 | 人脸识别成功 | |
|
||||
| 2002004 | 人脸识别失败 | |
|
||||
| 2002006 | 用户取消/超时/不同意,导致未完成人脸识别 | |
|
||||
| 2002007 | 本用户7天内人脸识别已通过,通过日期为XX | |
|
||||
| 2002008 | 本日已调起过人脸识别或者本月调用次数已达上限 | |
|
||||
| 2002009 | 无权限发起人脸识别 | |
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestFacialVerifyOption.verifyId">
|
||||
<summary>
|
||||
人脸核身会话唯一标识(小程序后台根据「用户实名信息(姓名+身份证)」调用微信后台[getVerifyId](https://developers.weixin.qq.com/miniprogram/dev/server/API/face/api_getverifyid.html)接口获取)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestFacialVerifyError.errMsg">
|
||||
<summary>
|
||||
错误信息
|
||||
| 错误码 | 错误信息 | 说明 |
|
||||
| - | - | - |
|
||||
| 0 | 人脸识别完成(需要通过[queryVerifyInfo](https://developers.weixin.qq.com/miniprogram/dev/server/API/face/api_queryverifyinfo.html)接口查询人脸核身真实验证结果) | |
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestFacialVerifyError.errCode">
|
||||
<summary>
|
||||
错误码
|
||||
| 错误码 | 错误信息 | 说明 |
|
||||
| - | - | - |
|
||||
| 0 | 人脸识别完成(需要通过[queryVerifyInfo](https://developers.weixin.qq.com/miniprogram/dev/server/API/face/api_queryverifyinfo.html)接口查询人脸核身真实验证结果) | |
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestMidasFriendPaymentOption.buyQuantity">
|
||||
<summary>
|
||||
购买数量。mode=game 时必填。购买数量。详见 [buyQuantity 限制说明](#buyQuantity限制说明)。
|
||||
@ -7725,7 +8058,7 @@
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SetBackgroundFetchTokenOption.token">
|
||||
<summary>
|
||||
自定义的登录态
|
||||
自定义的登录态。上限 1024 字符。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SetClipboardDataOption.data">
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d1f5d9ba947a5cbf0b2b2466da1d2919
|
||||
guid: 8d0fd7078a0800c27bb5a0d4cb97ccec
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
307
Runtime/WX.cs
307
Runtime/WX.cs
@ -107,6 +107,69 @@ namespace WeChatWASM
|
||||
WXSDKManagerHandler.Instance.CheckIsAddedToMyMiniProgram(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.checkIsSupportFacialRecognition(Object object)](https://developers.weixin.qq.com/minigame/dev/api/open-api/face/wx.checkIsSupportFacialRecognition.html)
|
||||
/// 需要基础库: `3.8.12`
|
||||
/// 检查当前设备是否支持人脸识别能力
|
||||
/// **示例代码**
|
||||
/// ```js
|
||||
/// wx.checkIsSupportFacialRecognition({
|
||||
/// success() {
|
||||
/// // 支持人脸识别
|
||||
/// },
|
||||
/// fail() {
|
||||
/// // 不支持人脸识别
|
||||
/// },
|
||||
/// })
|
||||
/// ```
|
||||
/// </summary>
|
||||
public static void CheckIsSupportFacialRecognition(CheckIsSupportFacialRecognitionOption callback)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.CheckIsSupportFacialRecognition(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.checkIsSupportMidasPayment(Object object)](https://developers.weixin.qq.com/minigame/dev/api/midas-payment/wx.checkIsSupportMidasPayment.html)
|
||||
/// 需要基础库: `3.10.3`
|
||||
/// 检查当前环境是否支持虚拟支付。使用前请注意阅读[相关说明](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/virtual-payment/virtual-payment2.html)。
|
||||
/// **平台支持说明**
|
||||
/// - Android、Windows、OHOS 平台:默认支持虚拟支付,接口直接返回支持
|
||||
/// - iOS 平台:需满足以下环境要求才可能支持虚拟支付
|
||||
/// - 操作系统要求:使用 iPhone 或者 iPad,iOS 15 及以上版本
|
||||
/// - 基础库版本要求:3.10.3 及以上
|
||||
/// - 客户端版本要求:8.0.68 及以上
|
||||
/// - 苹果支付不支持使用沙箱环境,仅支持使用现网环境
|
||||
/// **注意事项**
|
||||
/// 若该 API 都不存在,则 iOS 一定不支持虚拟支付,请保持旧版本逻辑。
|
||||
/// **示例代码**
|
||||
/// ```js
|
||||
/// if (wx.checkIsSupportMidasPayment) {
|
||||
/// wx.checkIsSupportMidasPayment({
|
||||
/// success(res) {
|
||||
/// console.log('支持检查结果:', res)
|
||||
/// if (res.data.allow_pay) {
|
||||
/// console.log('当前环境支持支付')
|
||||
/// // 可以继续调用支付相关接口
|
||||
/// } else {
|
||||
/// console.log('当前环境不支持支付')
|
||||
/// // 请自行适配用户提示文案
|
||||
/// }
|
||||
/// },
|
||||
/// fail(err) {
|
||||
/// console.error('检查支持情况失败:', err)
|
||||
/// },
|
||||
/// complete() {
|
||||
/// console.log('检查完成')
|
||||
/// }
|
||||
/// })
|
||||
/// }
|
||||
/// ```
|
||||
/// </summary>
|
||||
public static void CheckIsSupportMidasPayment(CheckIsSupportMidasPaymentOption callback)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.CheckIsSupportMidasPayment(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.checkSession(Object object)](https://developers.weixin.qq.com/minigame/dev/api/open-api/login/wx.checkSession.html)
|
||||
/// 检查登录态 session_key 是否过期。
|
||||
@ -279,7 +342,7 @@ namespace WeChatWASM
|
||||
/// <summary>
|
||||
/// [wx.exitChatTool(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.exitChatTool.html)
|
||||
/// 需要基础库: `3.7.12`
|
||||
/// 退出聊天工具模式
|
||||
/// 退出聊天工具开放能力模式
|
||||
/// </summary>
|
||||
public static void ExitChatTool(ExitChatToolOption callback)
|
||||
{
|
||||
@ -675,6 +738,7 @@ namespace WeChatWASM
|
||||
/// | 8 | 当天(自然日)赞官方贴子数 | 无需传入 | |
|
||||
/// | 9 | 当天(自然日)评论官方贴子数 | 无需传入 | |
|
||||
/// | 10 | 当天(自然日)发表到本圈子话题的贴子数 | 传入话题id,从mp-游戏圈话题管理处获取 | |
|
||||
/// | 11 | 用户最近一次推荐游戏时间 | 无需传入 | 秒级时间戳 | |
|
||||
/// **encryptedData 解密后得到的 GameClubData 的结构**
|
||||
/// | 属性 | 类型 | 说明 |
|
||||
/// | ------- | ------- | -------------------------------------- |
|
||||
@ -691,9 +755,22 @@ namespace WeChatWASM
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.getGameExptInfo(Object object)](https://developers.weixin.qq.com/minigame/dev/api/data-analysis/wx.getGameExptInfo.html)
|
||||
/// [wx.getGameExptInfo(Object options)](https://developers.weixin.qq.com/minigame/dev/api/data-analysis/wx.getGameExptInfo.html)
|
||||
/// 需要基础库: `3.8.8`
|
||||
/// 给定实验参数数组,获取对应的实验参数值
|
||||
/// **示例代码**
|
||||
/// ```js
|
||||
/// wx.getGameExptInfo({
|
||||
/// keyList: ['experiment_key1', 'experiment_key2'],
|
||||
/// success(res) {
|
||||
/// res.list.forEach((expParam) => {
|
||||
/// console.log('实验ID:', expParam.expt_id);
|
||||
/// console.log('参数名:', expParam.param_name);
|
||||
/// console.log('参数值:', expParam.param_value);
|
||||
/// })
|
||||
/// }
|
||||
/// });
|
||||
/// ```
|
||||
/// </summary>
|
||||
public static void GetGameExptInfo(GetGameExptInfoOption callback)
|
||||
{
|
||||
@ -790,6 +867,14 @@ namespace WeChatWASM
|
||||
WXSDKManagerHandler.Instance.GetLocalIPAddress(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.getLocation(Object object)](https://developers.weixin.qq.com/minigame/dev/api/location/wx.getLocation.html)
|
||||
/// </summary>
|
||||
public static void GetLocation(GetLocationOption callback)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.GetLocation(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.getNetworkType(Object object)](https://developers.weixin.qq.com/minigame/dev/api/device/network/wx.getNetworkType.html)
|
||||
/// 获取网络类型
|
||||
@ -916,6 +1001,15 @@ namespace WeChatWASM
|
||||
WXSDKManagerHandler.Instance.GetSetting(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.getShareInfo(Object object)](https://developers.weixin.qq.com/minigame/dev/api/share/wx.getShareInfo.html)
|
||||
/// 需要基础库: `1.1.0`
|
||||
/// </summary>
|
||||
public static void GetShareInfo(GetShareInfoOption callback)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.GetShareInfo(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.getShowSplashAdStatus(Object object)](https://developers.weixin.qq.com/minigame/dev/api/ad/wx.getShowSplashAdStatus.html)
|
||||
/// 需要基础库: `3.7.8`
|
||||
@ -1262,9 +1356,6 @@ namespace WeChatWASM
|
||||
/// 从 2.3.0 版本开始,若用户未点击小程序页面任意位置,则开发者将无法调用此接口自动跳转至其他小程序。
|
||||
/// ##### 需要用户确认跳转
|
||||
/// 从 2.3.0 版本开始,在跳转至其他小程序前,将统一增加弹窗,询问是否跳转,用户确认后才可以跳转其他小程序。如果用户点击取消,则回调 `fail cancel`。
|
||||
/// ##### 无需声明跳转名单,不限跳转数量(众测中)
|
||||
/// 1. 从2020年4月24日起,使用跳转其他小程序功能将无需在全局配置中声明跳转名单,调用此接口时将不再校验所跳转的 AppID 是否在 navigateToMiniProgramAppIdList 中。
|
||||
/// 2. 从2020年4月24日起,跳转其他小程序将不再受数量限制,使用此功能时请注意遵守运营规范。
|
||||
/// **运营规范**
|
||||
/// 平台将坚决打击小程序盒子等互推行为,使用此功能时请严格遵守[《微信小程序平台运营规范》](https://developers.weixin.qq.com/miniprogram/product/#_5-10-%E4%BA%92%E6%8E%A8%E8%A1%8C%E4%B8%BA),若发现小程序违反运营规范将被下架处理。
|
||||
/// **关于调试**
|
||||
@ -1700,6 +1791,125 @@ namespace WeChatWASM
|
||||
WXSDKManagerHandler.Instance.ReportScene(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.requestFacialRecognition(Object object)](https://developers.weixin.qq.com/minigame/dev/api/open-api/account-info/wx.requestFacialRecognition.html)
|
||||
/// 需要基础库: `3.11.2`
|
||||
/// 腾讯游戏人脸识别验证功能是基于健康系统防沉迷体系,用于识别疑似未成年人冒用成年人账号游玩游戏的行为,是防止未成年人沉迷网络游戏的一项重要措施。本接口是为开通虚拟支付功能的小游戏开发者提供的,此接口是基于人脸识别的未成年人身份核验接口。本次识别是根据用户在腾讯健康系统中留存的实名信息进行验证,结果将直接返回至开发者。
|
||||
/// **接口限额**
|
||||
/// - 超出限额后将返回错误码 2002008(频率控制)
|
||||
/// - 1天内全部游戏对一个用户只能调起1次人脸识别
|
||||
/// - 若用户人脸识别通过:7天内不能再被弹出人脸识别
|
||||
/// - 根据小游戏评级每个月限制使用次数,一旦发现恶意滥用接口,会取消使用资格。具体使用次数如下:
|
||||
/// - S级:300次/月
|
||||
/// - A级:100次/月
|
||||
/// - B级:30次/月
|
||||
/// **处理流程**
|
||||
/// <img src="https://mmgame.qpic.cn/image/2034b86e1e8f3541629d4b4d16cf41ff84fd99efe25f4fac181603edd8a29e14/0" width="600" alt="人脸识别流程图" />
|
||||
/// **示例代码**
|
||||
/// ```js
|
||||
/// // 实际业务场景:防沉迷身份验证
|
||||
/// function checkUserIdentity() {
|
||||
/// wx.requestFacialRecognition({
|
||||
/// success(res) {
|
||||
/// // 场景 1:本次人脸识别通过
|
||||
/// // res = { errCode: 0, errMsg: 'ok' }
|
||||
/// console.log('人脸识别成功:', res)
|
||||
/// // 允许继续游戏
|
||||
/// startGame()
|
||||
/// },
|
||||
/// fail(err) {
|
||||
/// console.error('人脸识别失败:', err)
|
||||
/// let tipMessage = ''
|
||||
/// let shouldBlock = false // 是否需要阻断游戏
|
||||
/// // 根据错误码进行不同处理
|
||||
/// switch (err.errCode) {
|
||||
/// case 2002004:
|
||||
/// // 人脸识别失败(需要阻断)
|
||||
/// // err = { errCode: 2002004, errMsg: '人脸识别失败' }
|
||||
/// tipMessage = '识别失败,请稍后重试'
|
||||
/// shouldBlock = true
|
||||
/// break
|
||||
/// case 2002006:
|
||||
/// // 用户取消/超时/不同意,导致未完成人脸识别(需要阻断)
|
||||
/// // err = { errCode: 2002006, errMsg: '用户取消' }
|
||||
/// tipMessage = '您已取消验证,无法继续游戏'
|
||||
/// shouldBlock = true
|
||||
/// break
|
||||
/// case 2002007:
|
||||
/// // 本用户7天内人脸识别已通过(可以继续游戏)
|
||||
/// // err = { errCode: 2002007, errMsg: '本用户7天内人脸识别已通过,通过日期为2024-01-15' }
|
||||
/// tipMessage = '您已完成验证'
|
||||
/// shouldBlock = false
|
||||
/// break
|
||||
/// case 2002008:
|
||||
/// // 频率控制:本日已调起过人脸识别 or 本月调用次数已达上限(可以继续游戏)
|
||||
/// // err = { errCode: 2002008, errMsg: '本日已调起过人脸识别' }
|
||||
/// // 或 err = { errCode: 2002008, errMsg: '本月调用次数已达上限' }
|
||||
/// tipMessage = '今日验证次数已达上限'
|
||||
/// shouldBlock = false
|
||||
/// break
|
||||
/// case 2002009:
|
||||
/// // 无权限发起人脸识别(可以继续游戏)
|
||||
/// // err = { errCode: 2002009, errMsg: '无权限发起人脸识别' }
|
||||
/// tipMessage = '暂无权限使用此功能'
|
||||
/// shouldBlock = false
|
||||
/// break
|
||||
/// default:
|
||||
/// // 系统异常等其他错误(可以继续游戏,避免影响正常用户)
|
||||
/// tipMessage = '系统异常,请稍后重试'
|
||||
/// shouldBlock = false
|
||||
/// }
|
||||
/// if (tipMessage) {
|
||||
/// wx.showModal({
|
||||
/// title: '提示',
|
||||
/// content: tipMessage,
|
||||
/// showCancel: false
|
||||
/// })
|
||||
/// }
|
||||
/// if (shouldBlock) {
|
||||
/// // 仅对识别失败(2002004)和用户取消(2002006)阻断游戏
|
||||
/// restrictGameFeatures()
|
||||
/// } else {
|
||||
/// // 其他情况允许继续游戏
|
||||
/// startGame()
|
||||
/// }
|
||||
/// },
|
||||
/// complete(res) {
|
||||
/// // 无论成功失败均会触发
|
||||
/// console.log('人脸识别流程结束:', res)
|
||||
/// }
|
||||
/// })
|
||||
/// }
|
||||
/// ```
|
||||
/// </summary>
|
||||
public static void RequestFacialRecognition(RequestFacialRecognitionOption callback)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.RequestFacialRecognition(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.requestFacialVerify(Object object)](https://developers.weixin.qq.com/minigame/dev/api/open-api/face/wx.requestFacialVerify.html)
|
||||
/// 需要基础库: `3.8.12`
|
||||
/// 对用户实名信息进行基于生物识别的人脸核身验证
|
||||
/// **示例代码**
|
||||
/// ```js
|
||||
/// wx.requestFacialVerify({
|
||||
/// // 人脸核身会话唯一标识
|
||||
/// verifyId: 'xxx',
|
||||
/// success() {
|
||||
/// // 人脸核身验证成功,需要通知小程序后台根据本次人脸核身会话唯一标识 verifyId 字段调用微信后台 queryVerifyInfo 接口查询人脸核身真实验证结果。
|
||||
/// },
|
||||
/// fail() {
|
||||
/// // 人脸核身验证失败
|
||||
/// },
|
||||
/// })
|
||||
/// ```
|
||||
/// </summary>
|
||||
public static void RequestFacialVerify(RequestFacialVerifyOption callback)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.RequestFacialVerify(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.requestMidasFriendPayment(Object object)](https://developers.weixin.qq.com/minigame/dev/api/midas-payment/wx.requestMidasFriendPayment.html)
|
||||
/// 需要基础库: `2.11.0`
|
||||
@ -2043,6 +2253,8 @@ namespace WeChatWASM
|
||||
/// [wx.setDeviceOrientation(Object object)](https://developers.weixin.qq.com/minigame/dev/api/device/orientation/wx.setDeviceOrientation.html)
|
||||
/// 需要基础库: `2.26.0`
|
||||
/// 切换横竖屏。接口调用成功后会触发 wx.onDeviceOrientationChange 事件
|
||||
/// **注意**
|
||||
/// - PC小程序处于全屏时,无法切换横竖屏。
|
||||
/// </summary>
|
||||
public static void SetDeviceOrientation(SetDeviceOrientationOption callback)
|
||||
{
|
||||
@ -2763,6 +2975,15 @@ namespace WeChatWASM
|
||||
WXSDKManagerHandler.Instance.ReportEvent(eventId, data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.reportMonitor(string name, number value)](https://developers.weixin.qq.com/minigame/dev/api/data-analysis/wx.reportMonitor.html)
|
||||
/// 需要基础库: `2.1.2`
|
||||
/// </summary>
|
||||
public static void ReportMonitor(string name, double value)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.ReportMonitor(name, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.reportPerformance(Number id, Number value, String|Array dimensions)](https://developers.weixin.qq.com/minigame/dev/api/base/performance/wx.reportPerformance.html)
|
||||
/// 需要基础库: `2.10.0`
|
||||
@ -3027,6 +3248,7 @@ namespace WeChatWASM
|
||||
/// 监听搜索到新设备的事件
|
||||
/// **注意**
|
||||
/// - 若在 [wx.onBluetoothDeviceFound](https://developers.weixin.qq.com/minigame/dev/api/device/bluetooth/wx.onBluetoothDeviceFound.html) 回调了某个设备,则此设备会添加到 [wx.getBluetoothDevices](https://developers.weixin.qq.com/minigame/dev/api/device/bluetooth/wx.getBluetoothDevices.html) 接口获取到的数组中。
|
||||
/// - 地址变化这个是鸿蒙系统特性,小程序可以不缓存地址,重新搜索连接。
|
||||
/// **示例代码**
|
||||
/// [在微信开发者工具中查看示例](https://developers.weixin.qq.com/s/pQU51zmz7a3K)
|
||||
/// ```js
|
||||
@ -3121,6 +3343,34 @@ namespace WeChatWASM
|
||||
WXSDKManagerHandler.Instance.OffDeviceOrientationChange(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.onDirectAdStatusChange(function listener)](https://developers.weixin.qq.com/minigame/dev/api/ad/wx.onDirectAdStatusChange.html)
|
||||
/// 需要基础库: `3.11.2`
|
||||
/// 监听监听直玩广告状态变化
|
||||
/// **示例代码**
|
||||
/// ```js
|
||||
/// wx.onDirectAdStatusChange(res => {
|
||||
/// // 会有如下的几种状态值组合
|
||||
/// // a) { isInMask: true, isInDirectGameAd: true } -> 表示当前正在直玩广告 且 未戳破蒙层
|
||||
/// // b) { isInMask: false, isInDirectGameAd: true } -> 表示当前正在直玩广告 且 戳破了蒙层
|
||||
/// // c) { isInMask: false, isInDirectGameAd: false, isEndByAbnormal: false }, -> 表示倒计时结束了,并且选择了继续玩
|
||||
/// // d) { isInMask: false, isInDirectGameAd: false, isEndByAbnormal: true }, -> 表示由于异常流程而结束
|
||||
/// console.log(res.isInMask)
|
||||
/// console.log(res.isInDirectGameAd)
|
||||
/// console.log(res.isEndByAbnormal)
|
||||
/// })
|
||||
/// ```
|
||||
/// </summary>
|
||||
public static void OnDirectAdStatusChange(Action<OnDirectAdStatusChangeListenerResult> result)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.OnDirectAdStatusChange(result);
|
||||
}
|
||||
|
||||
public static void OffDirectAdStatusChange(Action<OnDirectAdStatusChangeListenerResult> result)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.OffDirectAdStatusChange(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.onError(function listener)](https://developers.weixin.qq.com/minigame/dev/api/base/app/app-event/wx.onError.html)
|
||||
/// 监听全局错误事件
|
||||
@ -3495,21 +3745,21 @@ namespace WeChatWASM
|
||||
/// 需要基础库: `2.8.1`
|
||||
/// 监听用户主动截屏事件。用户使用系统截屏按键截屏时触发,只能注册一个监听
|
||||
/// **示例代码**
|
||||
/// 页面要先调用wx.showShareMenu()来允许调用
|
||||
/// ```js
|
||||
/// wx.onUserCaptureScreen(function (res) {
|
||||
/// console.log('用户截屏了')
|
||||
/// return {
|
||||
/// query: "parameter=test", // 通过截屏图片打开小程序的query参数
|
||||
/// promise: new Promise((resolve) => { // 通过promise延时传递小程序的query参数
|
||||
/// setTimeout(() => {
|
||||
/// resolve({
|
||||
/// query: "parameter=test2",
|
||||
/// })
|
||||
/// }, 1000) // 在1秒内对query进行解析
|
||||
/// })
|
||||
/// setTimeout(() => {
|
||||
/// resolve({
|
||||
/// query: "parameter=test2",
|
||||
/// })
|
||||
/// }, 1000) // 在1秒内对query进行解析
|
||||
/// })
|
||||
/// }
|
||||
/// }
|
||||
/// )
|
||||
/// })
|
||||
/// ```
|
||||
/// </summary>
|
||||
public static void OnUserCaptureScreen(Action<OnUserCaptureScreenListenerResult> result)
|
||||
@ -3643,7 +3893,7 @@ namespace WeChatWASM
|
||||
/// <summary>
|
||||
/// [wx.onCopyUrl(function listener)](https://developers.weixin.qq.com/minigame/dev/api/share/wx.onCopyUrl.html)
|
||||
/// 需要基础库: `2.14.3`
|
||||
/// 监听用户点击右上角菜单的「复制链接」按钮时触发的事件。本接口为 Beta 版本,暂只在 Android 平台支持。
|
||||
/// 监听用户点击右上角菜单的「复制链接」按钮时触发的事件。
|
||||
/// </summary>
|
||||
public static void OnCopyUrl(Action<Action<OnCopyUrlListenerResult>> callback)
|
||||
{
|
||||
@ -3831,6 +4081,23 @@ namespace WeChatWASM
|
||||
return WXSDKManagerHandler.GetDeviceInfo();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [Object wx.getDirectAdStatusSync()](https://developers.weixin.qq.com/minigame/dev/api/ad/wx.getDirectAdStatusSync.html)
|
||||
/// 需要基础库: `3.11.2`
|
||||
/// 获取直玩广告组件展示状态。
|
||||
/// **示例代码**
|
||||
/// ```js
|
||||
/// const statusInfo = wx.getDirectAdStatusSync();
|
||||
/// console.log(statusInfo.isInMask) // 当前是否在蒙层阶段
|
||||
/// console.log(statusInfo.isInDirectGameAd) // 当前是否在直玩广告中
|
||||
/// ```
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static DirectAdStatusInfo GetDirectAdStatusSync()
|
||||
{
|
||||
return WXSDKManagerHandler.GetDirectAdStatusSync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [Object wx.getEnterOptionsSync()](https://developers.weixin.qq.com/minigame/dev/api/base/app/life-cycle/wx.getEnterOptionsSync.html)
|
||||
/// 需要基础库: `2.13.2`
|
||||
@ -4045,19 +4312,19 @@ namespace WeChatWASM
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [[ImageData](https://developers.weixin.qq.com/minigame/dev/api/render/image/ImageData.html) wx.createImageData(number width, number height)](https://developers.weixin.qq.com/minigame/dev/api/render/image/wx.createImageData.html)
|
||||
/// [[ImageData](https://developers.weixin.qq.com/minigame/dev/api/render/image/ImageData.html) wx.createImageData(number width, number height, Uint8ClampedArray data)](https://developers.weixin.qq.com/minigame/dev/api/render/image/wx.createImageData.html)
|
||||
/// 需要基础库: `3.4.10`
|
||||
/// 这里有两种使用方法, 一种是指定ImageData的宽和高, 另外一种是使用ImageData, 通过它本身的宽高尺寸来构建新的对象。
|
||||
/// 这里有两种使用方法, 一种是指定ImageData的宽和高, 另外一种使用已有的ImageData的图像二进制数据,来构建新的对象。
|
||||
/// **示例代码**
|
||||
/// ```js
|
||||
/// const imageData1 = wx.createImageData(100, 100)
|
||||
/// const imageData2 = wx.createImageData(imageData1)
|
||||
/// const imageData1 = wx.createImageData(100, 100)
|
||||
/// const imageData2 = wx.createImageData(imageData1.data, 100, 100)
|
||||
/// ```
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static ImageData CreateImageData(double width, double height)
|
||||
public static ImageData CreateImageData(double width, double height, int[] data)
|
||||
{
|
||||
return WXSDKManagerHandler.CreateImageData(width, height);
|
||||
return WXSDKManagerHandler.CreateImageData(width, height, data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -1195,8 +1195,38 @@ namespace WeChatWASM
|
||||
public static WXRankManager GetRankManager() {
|
||||
return WXSDKManagerHandler.Instance.GetRankManager();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region PC高性能小游戏
|
||||
/// <summary>
|
||||
/// 获取 PC 高性能小游戏管理器
|
||||
/// 类似于 VA 方案的 wx.getAndroidHighPerformanceManager()
|
||||
/// 用于在 PC 原生环境下与微信基础库通信
|
||||
/// </summary>
|
||||
/// <returns>PC高性能管理器实例,如果不支持则返回 null</returns>
|
||||
/// <example>
|
||||
/// var pcManager = WX.GetPCHighPerformanceManager();
|
||||
/// if (pcManager != null && pcManager.IsSupported)
|
||||
/// {
|
||||
/// pcManager.ShowToast(new PCHPShowToastOption
|
||||
/// {
|
||||
/// title = "Hello PC!",
|
||||
/// icon = "success",
|
||||
/// duration = 2000
|
||||
/// });
|
||||
/// }
|
||||
/// </example>
|
||||
public static WXPCHighPerformanceManager GetPCHighPerformanceManager()
|
||||
{
|
||||
#if UNITY_STANDALONE_WIN
|
||||
return WXPCHighPerformanceManager.GetInstance();
|
||||
#else
|
||||
Debug.LogWarning("[WX] GetPCHighPerformanceManager 仅在 Windows 平台可用");
|
||||
return null;
|
||||
#endif
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@ -1,9 +1,143 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Runtime.InteropServices;
|
||||
using UnityEngine;
|
||||
using LitJson;
|
||||
|
||||
namespace WeChatWASM
|
||||
{
|
||||
#region Message Protocol Models
|
||||
|
||||
/// <summary>
|
||||
/// PC高性能方案通信协议 - 请求消息
|
||||
/// C# -> DLL -> 内核 -> 基础库
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class PCHPRequestMessage
|
||||
{
|
||||
/// <summary>
|
||||
/// 消息类型: "request" | "event_register" | "event_unregister"
|
||||
/// </summary>
|
||||
public string type;
|
||||
|
||||
/// <summary>
|
||||
/// 请求ID,用于匹配回调
|
||||
/// </summary>
|
||||
public string requestId;
|
||||
|
||||
/// <summary>
|
||||
/// API名称,如 "showToast", "login" 等
|
||||
/// </summary>
|
||||
public string api;
|
||||
|
||||
/// <summary>
|
||||
/// API参数,JSON格式
|
||||
/// </summary>
|
||||
public string data;
|
||||
|
||||
/// <summary>
|
||||
/// 时间戳
|
||||
/// </summary>
|
||||
public long timestamp;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// PC高性能方案通信协议 - 响应消息
|
||||
/// 基础库 -> 内核 -> DLL -> C#
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class PCHPResponseMessage
|
||||
{
|
||||
/// <summary>
|
||||
/// 消息类型: "response" | "event"
|
||||
/// </summary>
|
||||
public string type;
|
||||
|
||||
/// <summary>
|
||||
/// 请求ID,与请求消息匹配
|
||||
/// </summary>
|
||||
public string requestId;
|
||||
|
||||
/// <summary>
|
||||
/// 回调类型: "success" | "fail" | "complete"
|
||||
/// </summary>
|
||||
public string callbackType;
|
||||
|
||||
/// <summary>
|
||||
/// API名称(事件类型时使用)
|
||||
/// </summary>
|
||||
public string api;
|
||||
|
||||
/// <summary>
|
||||
/// 响应数据,JSON格式
|
||||
/// </summary>
|
||||
public string data;
|
||||
|
||||
/// <summary>
|
||||
/// 错误信息(失败时)
|
||||
/// </summary>
|
||||
public string errMsg;
|
||||
|
||||
/// <summary>
|
||||
/// 时间戳
|
||||
/// </summary>
|
||||
public long timestamp;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 通用回调结果
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class PCHPGeneralCallbackResult
|
||||
{
|
||||
public string errMsg;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ShowToast 参数
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class PCHPShowToastOption
|
||||
{
|
||||
public string title;
|
||||
public string icon;
|
||||
public string image;
|
||||
public int duration;
|
||||
public bool mask;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ShowModal 参数
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class PCHPShowModalOption
|
||||
{
|
||||
public string title;
|
||||
public string content;
|
||||
public bool showCancel;
|
||||
public string cancelText;
|
||||
public string cancelColor;
|
||||
public string confirmText;
|
||||
public string confirmColor;
|
||||
public bool editable;
|
||||
public string placeholderText;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ShowModal 成功回调结果
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class PCHPShowModalSuccessCallbackResult
|
||||
{
|
||||
public bool confirm;
|
||||
public bool cancel;
|
||||
public string content;
|
||||
public string errMsg;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// PC高性能小游戏初始化脚本
|
||||
/// 负责与宿主程序的 direct_applet_sdk.dll 进行交互
|
||||
@ -66,9 +200,37 @@ namespace WeChatWASM
|
||||
|
||||
#endregion
|
||||
|
||||
#region Callback Management
|
||||
|
||||
/// <summary>
|
||||
/// 回调信息封装
|
||||
/// </summary>
|
||||
private class CallbackInfo
|
||||
{
|
||||
public Action<string> OnSuccess;
|
||||
public Action<string> OnFail;
|
||||
public Action<string> OnComplete;
|
||||
public string ApiName;
|
||||
public long Timestamp;
|
||||
}
|
||||
|
||||
// 待处理的回调字典 <requestId, CallbackInfo>
|
||||
private readonly Dictionary<string, CallbackInfo> _pendingCallbacks = new Dictionary<string, CallbackInfo>();
|
||||
|
||||
// 事件监听器字典 <eventName, List<Action<string>>>
|
||||
private readonly Dictionary<string, List<Action<string>>> _eventListeners = new Dictionary<string, List<Action<string>>>();
|
||||
|
||||
// 请求ID计数器
|
||||
private int _requestIdCounter = 0;
|
||||
|
||||
// 线程安全的消息队列,用于主线程处理
|
||||
private readonly ConcurrentQueue<PCHPResponseMessage> _messageQueue = new ConcurrentQueue<PCHPResponseMessage>();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Events
|
||||
|
||||
// 收到异步消息时触发的事件
|
||||
// 收到异步消息时触发的事件(原始字节)
|
||||
public event Action<byte[]> OnMessageReceived;
|
||||
|
||||
#endregion
|
||||
@ -109,6 +271,12 @@ namespace WeChatWASM
|
||||
Initialize();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
// 在主线程中处理消息队列
|
||||
ProcessMessageQueue();
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
if (instance == this)
|
||||
@ -125,7 +293,7 @@ namespace WeChatWASM
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
#region Public Methods - SDK Lifecycle
|
||||
|
||||
/// <summary>
|
||||
/// 初始化SDK并建立连接
|
||||
@ -177,6 +345,7 @@ namespace WeChatWASM
|
||||
}
|
||||
Debug.Log($"获取窗口句柄成功: 0x{WindowHandle.ToInt64():X}");
|
||||
|
||||
// 5. 通知内核获取窗口句柄
|
||||
Debug.Log("[WXPCHPInitScript] Step 5: 调用 InitGameWindow");
|
||||
if (!InitGameWindow((ulong)WindowHandle.ToInt64()))
|
||||
{
|
||||
@ -207,71 +376,216 @@ namespace WeChatWASM
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 显示信息弹窗(仅 Windows)
|
||||
/// </summary>
|
||||
private void ShowInfo(string message)
|
||||
{
|
||||
Debug.Log($"[WXPCHPInitScript] {message}");
|
||||
#if UNITY_STANDALONE_WIN
|
||||
try
|
||||
{
|
||||
// MB_OK | MB_ICONINFORMATION = 0x40
|
||||
MessageBox(IntPtr.Zero, message, "WXPCHPInitScript Info", 0x40);
|
||||
}
|
||||
catch (System.Exception e)
|
||||
{
|
||||
Debug.LogWarning($"[WXPCHPInitScript] MessageBox 调用失败: {e.Message}");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Public Methods - WX API Calls
|
||||
|
||||
/// <summary>
|
||||
/// 显示错误弹窗(仅 Windows)
|
||||
/// 调用微信API(通用方法)
|
||||
/// </summary>
|
||||
private void ShowError(string message)
|
||||
{
|
||||
Debug.LogError($"[WXPCHPInitScript] {message}");
|
||||
#if UNITY_STANDALONE_WIN
|
||||
try
|
||||
{
|
||||
// MB_OK | MB_ICONERROR = 0x10
|
||||
MessageBox(IntPtr.Zero, message, "WXPCHPInitScript Error", 0x10);
|
||||
}
|
||||
catch (System.Exception e)
|
||||
{
|
||||
Debug.LogWarning($"[WXPCHPInitScript] MessageBox 调用失败: {e.Message}");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 发送异步消息到宿主
|
||||
/// </summary>
|
||||
/// <param name="message">消息内容</param>
|
||||
/// <returns>是否发送成功</returns>
|
||||
public bool SendMessage(string message)
|
||||
/// <param name="apiName">API名称,如 "showToast"</param>
|
||||
/// <param name="data">API参数对象</param>
|
||||
/// <param name="onSuccess">成功回调</param>
|
||||
/// <param name="onFail">失败回调</param>
|
||||
/// <param name="onComplete">完成回调</param>
|
||||
/// <returns>请求ID</returns>
|
||||
public string CallWXAPI(string apiName, object data, Action<string> onSuccess = null, Action<string> onFail = null, Action<string> onComplete = null)
|
||||
{
|
||||
if (!IsInitialized || !IsConnected)
|
||||
{
|
||||
Debug.LogWarning("[WXPCHPInitScript] SDK未初始化或未连接");
|
||||
return false;
|
||||
Debug.LogWarning($"[WXPCHPInitScript] SDK未初始化或未连接,无法调用 {apiName}");
|
||||
onFail?.Invoke(JsonMapper.ToJson(new PCHPGeneralCallbackResult { errMsg = "SDK not initialized" }));
|
||||
onComplete?.Invoke(JsonMapper.ToJson(new PCHPGeneralCallbackResult { errMsg = "SDK not initialized" }));
|
||||
return null;
|
||||
}
|
||||
|
||||
try
|
||||
string requestId = GenerateRequestId();
|
||||
string dataJson = data != null ? JsonMapper.ToJson(data) : "{}";
|
||||
|
||||
// 注册回调
|
||||
var callbackInfo = new CallbackInfo
|
||||
{
|
||||
byte[] data = System.Text.Encoding.UTF8.GetBytes(message);
|
||||
return SendMessage(data);
|
||||
}
|
||||
catch (Exception e)
|
||||
OnSuccess = onSuccess,
|
||||
OnFail = onFail,
|
||||
OnComplete = onComplete,
|
||||
ApiName = apiName,
|
||||
Timestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()
|
||||
};
|
||||
_pendingCallbacks[requestId] = callbackInfo;
|
||||
|
||||
// 构建请求消息
|
||||
var request = new PCHPRequestMessage
|
||||
{
|
||||
Debug.LogError($"[WXPCHPInitScript] 发送消息异常: {e.Message}");
|
||||
return false;
|
||||
type = "request",
|
||||
requestId = requestId,
|
||||
api = apiName,
|
||||
data = dataJson,
|
||||
timestamp = callbackInfo.Timestamp
|
||||
};
|
||||
|
||||
string requestJson = JsonMapper.ToJson(request);
|
||||
Debug.Log($"[WXPCHPInitScript] 发送API请求: {apiName}, requestId: {requestId}");
|
||||
|
||||
if (!SendMessageInternal(requestJson))
|
||||
{
|
||||
_pendingCallbacks.Remove(requestId);
|
||||
onFail?.Invoke(JsonMapper.ToJson(new PCHPGeneralCallbackResult { errMsg = "Failed to send message" }));
|
||||
onComplete?.Invoke(JsonMapper.ToJson(new PCHPGeneralCallbackResult { errMsg = "Failed to send message" }));
|
||||
return null;
|
||||
}
|
||||
|
||||
return requestId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 发送异步消息到宿主
|
||||
/// 显示消息提示框
|
||||
/// </summary>
|
||||
public void ShowToast(PCHPShowToastOption option, Action<PCHPGeneralCallbackResult> success = null, Action<PCHPGeneralCallbackResult> fail = null, Action<PCHPGeneralCallbackResult> complete = null)
|
||||
{
|
||||
CallWXAPI("showToast", option,
|
||||
res => success?.Invoke(JsonMapper.ToObject<PCHPGeneralCallbackResult>(res)),
|
||||
res => fail?.Invoke(JsonMapper.ToObject<PCHPGeneralCallbackResult>(res)),
|
||||
res => complete?.Invoke(JsonMapper.ToObject<PCHPGeneralCallbackResult>(res))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 隐藏消息提示框
|
||||
/// </summary>
|
||||
public void HideToast(Action<PCHPGeneralCallbackResult> success = null, Action<PCHPGeneralCallbackResult> fail = null, Action<PCHPGeneralCallbackResult> complete = null)
|
||||
{
|
||||
CallWXAPI("hideToast", null,
|
||||
res => success?.Invoke(JsonMapper.ToObject<PCHPGeneralCallbackResult>(res)),
|
||||
res => fail?.Invoke(JsonMapper.ToObject<PCHPGeneralCallbackResult>(res)),
|
||||
res => complete?.Invoke(JsonMapper.ToObject<PCHPGeneralCallbackResult>(res))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 显示模态对话框
|
||||
/// </summary>
|
||||
public void ShowModal(PCHPShowModalOption option, Action<PCHPShowModalSuccessCallbackResult> success = null, Action<PCHPGeneralCallbackResult> fail = null, Action<PCHPGeneralCallbackResult> complete = null)
|
||||
{
|
||||
CallWXAPI("showModal", option,
|
||||
res => success?.Invoke(JsonMapper.ToObject<PCHPShowModalSuccessCallbackResult>(res)),
|
||||
res => fail?.Invoke(JsonMapper.ToObject<PCHPGeneralCallbackResult>(res)),
|
||||
res => complete?.Invoke(JsonMapper.ToObject<PCHPGeneralCallbackResult>(res))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 显示 loading 提示框
|
||||
/// </summary>
|
||||
public void ShowLoading(string title, bool mask = false, Action<PCHPGeneralCallbackResult> success = null, Action<PCHPGeneralCallbackResult> fail = null, Action<PCHPGeneralCallbackResult> complete = null)
|
||||
{
|
||||
CallWXAPI("showLoading", new { title, mask },
|
||||
res => success?.Invoke(JsonMapper.ToObject<PCHPGeneralCallbackResult>(res)),
|
||||
res => fail?.Invoke(JsonMapper.ToObject<PCHPGeneralCallbackResult>(res)),
|
||||
res => complete?.Invoke(JsonMapper.ToObject<PCHPGeneralCallbackResult>(res))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 隐藏 loading 提示框
|
||||
/// </summary>
|
||||
public void HideLoading(Action<PCHPGeneralCallbackResult> success = null, Action<PCHPGeneralCallbackResult> fail = null, Action<PCHPGeneralCallbackResult> complete = null)
|
||||
{
|
||||
CallWXAPI("hideLoading", null,
|
||||
res => success?.Invoke(JsonMapper.ToObject<PCHPGeneralCallbackResult>(res)),
|
||||
res => fail?.Invoke(JsonMapper.ToObject<PCHPGeneralCallbackResult>(res)),
|
||||
res => complete?.Invoke(JsonMapper.ToObject<PCHPGeneralCallbackResult>(res))
|
||||
);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods - Event Listeners
|
||||
|
||||
/// <summary>
|
||||
/// 注册事件监听器
|
||||
/// </summary>
|
||||
/// <param name="eventName">事件名称,如 "onShow", "onHide"</param>
|
||||
/// <param name="callback">回调函数</param>
|
||||
public void RegisterEventListener(string eventName, Action<string> callback)
|
||||
{
|
||||
if (!_eventListeners.ContainsKey(eventName))
|
||||
{
|
||||
_eventListeners[eventName] = new List<Action<string>>();
|
||||
|
||||
// 发送事件注册消息到基础库
|
||||
var request = new PCHPRequestMessage
|
||||
{
|
||||
type = "event_register",
|
||||
requestId = GenerateRequestId(),
|
||||
api = eventName,
|
||||
data = "{}",
|
||||
timestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()
|
||||
};
|
||||
SendMessageInternal(JsonMapper.ToJson(request));
|
||||
}
|
||||
|
||||
_eventListeners[eventName].Add(callback);
|
||||
Debug.Log($"[WXPCHPInitScript] 注册事件监听: {eventName}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 移除事件监听器
|
||||
/// </summary>
|
||||
/// <param name="eventName">事件名称</param>
|
||||
/// <param name="callback">要移除的回调函数,为null则移除所有</param>
|
||||
public void UnregisterEventListener(string eventName, Action<string> callback = null)
|
||||
{
|
||||
if (!_eventListeners.ContainsKey(eventName))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (callback == null)
|
||||
{
|
||||
_eventListeners.Remove(eventName);
|
||||
}
|
||||
else
|
||||
{
|
||||
_eventListeners[eventName].Remove(callback);
|
||||
if (_eventListeners[eventName].Count == 0)
|
||||
{
|
||||
_eventListeners.Remove(eventName);
|
||||
}
|
||||
}
|
||||
|
||||
// 如果没有监听器了,通知基础库取消注册
|
||||
if (!_eventListeners.ContainsKey(eventName))
|
||||
{
|
||||
var request = new PCHPRequestMessage
|
||||
{
|
||||
type = "event_unregister",
|
||||
requestId = GenerateRequestId(),
|
||||
api = eventName,
|
||||
data = "{}",
|
||||
timestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()
|
||||
};
|
||||
SendMessageInternal(JsonMapper.ToJson(request));
|
||||
}
|
||||
|
||||
Debug.Log($"[WXPCHPInitScript] 移除事件监听: {eventName}");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods - Raw Message
|
||||
|
||||
/// <summary>
|
||||
/// 发送原始消息字符串
|
||||
/// </summary>
|
||||
/// <param name="message">消息内容</param>
|
||||
/// <returns>是否发送成功</returns>
|
||||
public bool SendRawMessage(string message)
|
||||
{
|
||||
return SendMessageInternal(message);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 发送原始消息字节数组
|
||||
/// </summary>
|
||||
/// <param name="data">消息数据</param>
|
||||
/// <returns>是否发送成功</returns>
|
||||
@ -313,6 +627,75 @@ namespace WeChatWASM
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
/// 生成唯一请求ID
|
||||
/// </summary>
|
||||
private string GenerateRequestId()
|
||||
{
|
||||
return $"pchp_{++_requestIdCounter}_{DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 内部发送消息方法
|
||||
/// </summary>
|
||||
private bool SendMessageInternal(string message)
|
||||
{
|
||||
if (!IsInitialized || !IsConnected)
|
||||
{
|
||||
Debug.LogWarning("[WXPCHPInitScript] SDK未初始化或未连接");
|
||||
return false;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
byte[] data = System.Text.Encoding.UTF8.GetBytes(message);
|
||||
return SendMessage(data);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogError($"[WXPCHPInitScript] 发送消息异常: {e.Message}");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 显示信息弹窗(仅 Windows)
|
||||
/// </summary>
|
||||
private void ShowInfo(string message)
|
||||
{
|
||||
Debug.Log($"[WXPCHPInitScript] {message}");
|
||||
#if UNITY_STANDALONE_WIN
|
||||
try
|
||||
{
|
||||
// MB_OK | MB_ICONINFORMATION = 0x40
|
||||
MessageBox(IntPtr.Zero, message, "WXPCHPInitScript Info", 0x40);
|
||||
}
|
||||
catch (System.Exception e)
|
||||
{
|
||||
Debug.LogWarning($"[WXPCHPInitScript] MessageBox 调用失败: {e.Message}");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 显示错误弹窗(仅 Windows)
|
||||
/// </summary>
|
||||
private void ShowError(string message)
|
||||
{
|
||||
Debug.LogError($"[WXPCHPInitScript] {message}");
|
||||
#if UNITY_STANDALONE_WIN
|
||||
try
|
||||
{
|
||||
// MB_OK | MB_ICONERROR = 0x10
|
||||
MessageBox(IntPtr.Zero, message, "WXPCHPInitScript Error", 0x10);
|
||||
}
|
||||
catch (System.Exception e)
|
||||
{
|
||||
Debug.LogWarning($"[WXPCHPInitScript] MessageBox 调用失败: {e.Message}");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 清理SDK资源
|
||||
/// </summary>
|
||||
@ -325,6 +708,10 @@ namespace WeChatWASM
|
||||
|
||||
try
|
||||
{
|
||||
// 清理待处理回调
|
||||
_pendingCallbacks.Clear();
|
||||
_eventListeners.Clear();
|
||||
|
||||
Cleanup();
|
||||
Debug.Log("[WXPCHPInitScript] SDK清理完成");
|
||||
}
|
||||
@ -340,7 +727,79 @@ namespace WeChatWASM
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 异步消息处理回调
|
||||
/// 在主线程中处理消息队列
|
||||
/// </summary>
|
||||
private void ProcessMessageQueue()
|
||||
{
|
||||
while (_messageQueue.TryDequeue(out var response))
|
||||
{
|
||||
try
|
||||
{
|
||||
ProcessResponse(response);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogError($"[WXPCHPInitScript] 处理响应消息异常: {e.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 处理响应消息
|
||||
/// </summary>
|
||||
private void ProcessResponse(PCHPResponseMessage response)
|
||||
{
|
||||
if (response.type == "response")
|
||||
{
|
||||
// 处理API回调
|
||||
if (_pendingCallbacks.TryGetValue(response.requestId, out var callbackInfo))
|
||||
{
|
||||
Debug.Log($"[WXPCHPInitScript] 收到API响应: {callbackInfo.ApiName}, callbackType: {response.callbackType}");
|
||||
|
||||
switch (response.callbackType)
|
||||
{
|
||||
case "success":
|
||||
callbackInfo.OnSuccess?.Invoke(response.data ?? "{}");
|
||||
break;
|
||||
case "fail":
|
||||
callbackInfo.OnFail?.Invoke(response.data ?? $"{{\"errMsg\":\"{response.errMsg}\"}}");
|
||||
break;
|
||||
case "complete":
|
||||
callbackInfo.OnComplete?.Invoke(response.data ?? "{}");
|
||||
// complete 后移除回调
|
||||
_pendingCallbacks.Remove(response.requestId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning($"[WXPCHPInitScript] 未找到对应的回调: requestId={response.requestId}");
|
||||
}
|
||||
}
|
||||
else if (response.type == "event")
|
||||
{
|
||||
// 处理事件通知
|
||||
string eventName = response.api;
|
||||
if (_eventListeners.TryGetValue(eventName, out var listeners))
|
||||
{
|
||||
Debug.Log($"[WXPCHPInitScript] 收到事件: {eventName}");
|
||||
foreach (var listener in listeners.ToArray())
|
||||
{
|
||||
try
|
||||
{
|
||||
listener?.Invoke(response.data ?? "{}");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogError($"[WXPCHPInitScript] 事件回调异常: {eventName}, {e.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 异步消息处理回调(从DLL回调,可能在非主线程)
|
||||
/// </summary>
|
||||
[AOT.MonoPInvokeCallback(typeof(AsyncMsgHandlerDelegate))]
|
||||
private static void HandleAsyncMessage(IntPtr data, int len)
|
||||
@ -355,15 +814,29 @@ namespace WeChatWASM
|
||||
byte[] buffer = new byte[len];
|
||||
Marshal.Copy(data, buffer, 0, len);
|
||||
|
||||
// 在主线程中触发事件
|
||||
if (instance != null)
|
||||
{
|
||||
// 直接调用,如果需要线程安全可以使用Unity的主线程调度
|
||||
// 触发原始消息事件
|
||||
instance.OnMessageReceived?.Invoke(buffer);
|
||||
|
||||
// 打印收到的消息(用于调试)
|
||||
// 解析消息
|
||||
string message = System.Text.Encoding.UTF8.GetString(buffer);
|
||||
Debug.Log($"[WXPCHPInitScript] 收到消息: {message}");
|
||||
Debug.Log($"[WXPCHPInitScript] 收到原始消息: {message}");
|
||||
|
||||
try
|
||||
{
|
||||
// 尝试解析为响应消息
|
||||
var response = JsonMapper.ToObject<PCHPResponseMessage>(message);
|
||||
if (response != null && !string.IsNullOrEmpty(response.type))
|
||||
{
|
||||
// 加入消息队列,在主线程中处理
|
||||
instance._messageQueue.Enqueue(response);
|
||||
}
|
||||
}
|
||||
catch (Exception parseEx)
|
||||
{
|
||||
Debug.LogWarning($"[WXPCHPInitScript] 消息解析失败,可能是非标准格式: {parseEx.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
@ -374,4 +847,113 @@ namespace WeChatWASM
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// PC高性能小游戏管理器
|
||||
/// 提供类似 wx.getPCHighPerformanceManager() 的接口
|
||||
/// </summary>
|
||||
public class WXPCHighPerformanceManager
|
||||
{
|
||||
private static WXPCHighPerformanceManager _instance;
|
||||
private WXPCHPInitScript _initScript;
|
||||
|
||||
/// <summary>
|
||||
/// 获取 PC 高性能管理器实例
|
||||
/// </summary>
|
||||
public static WXPCHighPerformanceManager GetInstance()
|
||||
{
|
||||
if (_instance == null)
|
||||
{
|
||||
_instance = new WXPCHighPerformanceManager();
|
||||
}
|
||||
return _instance;
|
||||
}
|
||||
|
||||
private WXPCHighPerformanceManager()
|
||||
{
|
||||
_initScript = WXPCHPInitScript.Instance;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 是否支持PC高性能模式
|
||||
/// </summary>
|
||||
public bool IsSupported => _initScript != null && _initScript.IsInitialized && _initScript.IsConnected;
|
||||
|
||||
/// <summary>
|
||||
/// 调用微信API
|
||||
/// </summary>
|
||||
public string CallWXAPI(string apiName, object data, Action<string> onSuccess = null, Action<string> onFail = null, Action<string> onComplete = null)
|
||||
{
|
||||
if (_initScript == null)
|
||||
{
|
||||
Debug.LogError("[WXPCHighPerformanceManager] InitScript 未初始化");
|
||||
return null;
|
||||
}
|
||||
return _initScript.CallWXAPI(apiName, data, onSuccess, onFail, onComplete);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 显示 Toast
|
||||
/// </summary>
|
||||
public void ShowToast(PCHPShowToastOption option, Action<PCHPGeneralCallbackResult> success = null, Action<PCHPGeneralCallbackResult> fail = null, Action<PCHPGeneralCallbackResult> complete = null)
|
||||
{
|
||||
_initScript?.ShowToast(option, success, fail, complete);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 隐藏 Toast
|
||||
/// </summary>
|
||||
public void HideToast(Action<PCHPGeneralCallbackResult> success = null, Action<PCHPGeneralCallbackResult> fail = null, Action<PCHPGeneralCallbackResult> complete = null)
|
||||
{
|
||||
_initScript?.HideToast(success, fail, complete);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 显示模态对话框
|
||||
/// </summary>
|
||||
public void ShowModal(PCHPShowModalOption option, Action<PCHPShowModalSuccessCallbackResult> success = null, Action<PCHPGeneralCallbackResult> fail = null, Action<PCHPGeneralCallbackResult> complete = null)
|
||||
{
|
||||
_initScript?.ShowModal(option, success, fail, complete);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 显示 Loading
|
||||
/// </summary>
|
||||
public void ShowLoading(string title, bool mask = false, Action<PCHPGeneralCallbackResult> success = null, Action<PCHPGeneralCallbackResult> fail = null, Action<PCHPGeneralCallbackResult> complete = null)
|
||||
{
|
||||
_initScript?.ShowLoading(title, mask, success, fail, complete);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 隐藏 Loading
|
||||
/// </summary>
|
||||
public void HideLoading(Action<PCHPGeneralCallbackResult> success = null, Action<PCHPGeneralCallbackResult> fail = null, Action<PCHPGeneralCallbackResult> complete = null)
|
||||
{
|
||||
_initScript?.HideLoading(success, fail, complete);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 注册事件监听
|
||||
/// </summary>
|
||||
public void On(string eventName, Action<string> callback)
|
||||
{
|
||||
_initScript?.RegisterEventListener(eventName, callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 移除事件监听
|
||||
/// </summary>
|
||||
public void Off(string eventName, Action<string> callback = null)
|
||||
{
|
||||
_initScript?.UnregisterEventListener(eventName, callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 发送原始消息
|
||||
/// </summary>
|
||||
public bool SendRawMessage(string message)
|
||||
{
|
||||
return _initScript?.SendRawMessage(message) ?? false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b17e781b27068bc4c4c35e83a27d5752
|
||||
guid: 65b48177033749bf973a8af5bfb6b257
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 98999f6ea00bfb3b84bf9c2835a6eef2
|
||||
guid: 843fbfe6b1059f2e27b97fd3cd84068a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5fe8e4698db6787ef27f06eeda650147
|
||||
guid: 3a331d20de788eec8dabbf9791362c59
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b323d5a6d73630f4b4ecda839651033d
|
||||
guid: bfde866bbf107ed06f04e258e84c744d
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1d5b6db6afe4b8afb6245b6f23739d2f
|
||||
guid: 347869c3146de4a6ecf43dd0804345db
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: df45bfeff203d16da5c5f1e8452090f6
|
||||
guid: 7da3cbf992c22b77755aaf23da134e12
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1ce7441f792f130992db545a10e2c3d5
|
||||
guid: 5885d27249d33dbb02bdc51835accbd3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 78da3c9c505427840dd81abe46c7069e
|
||||
guid: 450e3be1a2c1bb87f7ccdf4154150a4b
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2e91a6a5b83bcca43ad4b4033696e0c2
|
||||
guid: 4397f20bee3078845e45a7db660f53eb
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 464a894d6d01c7c459f527a804724d78
|
||||
guid: 0b7c80b1c05de84242be07cddaed8422
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0cc332e3839b1b2167b33323709aa48c
|
||||
guid: 2f40b9548f493d836771a5775541e1a3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 638dc490461c5dca0fce313ac3f4e09a
|
||||
guid: 490b863bed2b95d5cdc2896e18199bec
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8725ad7c5b52afb7d06666216749ec81
|
||||
guid: e7332ebf5091adef1944cf47ce73746e
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 78bec9c75ab7394f412793b8710c08f2
|
||||
guid: 2ddc85469844d290e788ef9b09431462
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1b5064b4615296f4a4ab734ef9c07e40
|
||||
guid: 79ff0274b9caac0a97550672a72de7bf
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 94194295cae6ce6b0015d68033dcf677
|
||||
guid: ed4858d477136fd2b5709d0ebde8485e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 06d1b4b5b92d23a7994106d0f3da5508
|
||||
guid: 7488f39b62a2a03ba777eff5073af2d1
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 63e7cd23cb3265f5d6551f9f183f8302
|
||||
guid: e19847ba2eef99fed68a5146bca054b7
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0cebc9a8b40658b0078d04a51d100c18
|
||||
guid: b1f63dbdfc20b1ab98d05683ac1a1219
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5672270ee592fd4379329c89b0d91b9b
|
||||
guid: f6185728b6b82009b9ff0f01da6a6315
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9ebbbb540f6c2470cb8b01ebe540a377
|
||||
guid: c32fea8033f212320254facc65a5e2e2
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 73be2fffc3b35894a241641e57bc878c
|
||||
guid: a3800933f83c029883820dbeed8f7558
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b3b91618191090763bea9efe8040bc77
|
||||
guid: 4eafb26d811d8119fd2e9f88bc3ad87e
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 45ce489fa2bb6fae3bc6ad07a364369a
|
||||
guid: 320a50d4772628dbaabd7bebf53f5f0a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2f7bd879fa9d6be62fc72b4c07584004
|
||||
guid: a3ea47f0b40fad0208b11434d38a367a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6a4a6e7860a190511c9fa32b7e18699b
|
||||
guid: f54839918a2ab6fd043b8fecf2cf1b17
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8e0fb83cb1d90213a0bb107535d21e1b
|
||||
guid: 607c7b96d82e1cb35c36b0bd8c0c0ae8
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cb0a08a572c8505b12f947e1038ba40d
|
||||
guid: cec0be8faa7b2a2cb102f8baf478a30d
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ae3dda314c57b099950394cd6befc454
|
||||
guid: 62340a355d78d94b4d9d2763c9b6120c
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2f1f6ee4f38d4deaf57bcd15bd4986c8
|
||||
guid: 349cc2da08ffa71a4c5efb57d7c71cd5
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7219be5bb7495030d1beaec210f6758d
|
||||
guid: a9f3af7171e7e12802fe9897882f993f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a0b6b64730459c67e5aea448be816122
|
||||
guid: 516b1231faabbc608a1ea2e0abb162ed
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2977e3d9c2726bdcff3a8002e03cce3b
|
||||
guid: bdc9f53aba5520ee4e81476ff79f68da
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c539cdc1283255b80e4b83afce67978c
|
||||
guid: d89549a38f5278f76daa90136ef9d1e7
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 185d3db97711a9f76c19bad6c379b125
|
||||
guid: 01df3344842d117544dc9f89495815e2
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 937b3406a62f7b46ec77d1c5e01e11d7
|
||||
guid: 887066bddb6191c4ac470be64bb06788
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6c6177df2dbcbec824067b91d6154593
|
||||
guid: 0ad8f981d4af2e77d743ba1a40f650b4
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 56d9988f9babae10f26197828c42a63a
|
||||
guid: 04edb092809059594ba37d3528ad09a9
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -33,6 +33,7 @@ export const ResType = {
|
||||
phoneCalendarAuthorized: 'string',
|
||||
},
|
||||
AppBaseInfo: {
|
||||
PCKernelVersion: 'string',
|
||||
SDKVersion: 'string',
|
||||
enableDebug: 'bool',
|
||||
fontSizeScaleFactor: 'number',
|
||||
@ -61,6 +62,10 @@ export const ResType = {
|
||||
platform: 'string',
|
||||
system: 'string',
|
||||
},
|
||||
DirectAdStatusInfo: {
|
||||
isInDirectGameAd: 'bool',
|
||||
isInMask: 'bool',
|
||||
},
|
||||
EnterOptionsGame: {
|
||||
apiCategory: 'string',
|
||||
query: 'object',
|
||||
@ -79,12 +84,16 @@ export const ResType = {
|
||||
feedId: 'string',
|
||||
},
|
||||
LaunchOptionsGame: {
|
||||
hostExtraData: 'HostExtraData',
|
||||
query: 'object',
|
||||
referrerInfo: 'EnterOptionsGameReferrerInfo',
|
||||
scene: 'number',
|
||||
chatType: 'number',
|
||||
shareTicket: 'string',
|
||||
},
|
||||
HostExtraData: {
|
||||
host_scene: 'string',
|
||||
},
|
||||
ClientRect: {
|
||||
bottom: 'number',
|
||||
height: 'number',
|
||||
@ -94,13 +103,50 @@ export const ResType = {
|
||||
width: 'number',
|
||||
},
|
||||
OfficialComponentsInfo: {
|
||||
challengeRewardsComponentInfo: 'ChallengeRewardsComponentInfo',
|
||||
notificationComponentInfo: 'OfficialComponentInfo',
|
||||
rewardsComponentInfo: 'RewardsComponentInfo',
|
||||
},
|
||||
ChallengeRewardsComponentInfo: {
|
||||
name: 'string',
|
||||
receiveDetail: 'ChallengeReceiveDetail',
|
||||
},
|
||||
ChallengeReceiveDetail: {
|
||||
awardResult: 'number',
|
||||
receivedRareReward: 'bool',
|
||||
userSourceList: 'UserSource[]',
|
||||
},
|
||||
UserSource: {
|
||||
sourceType: 'number',
|
||||
source: 'SourceInfo',
|
||||
sourceNum: 'number',
|
||||
},
|
||||
SourceInfo: {
|
||||
propList: 'PropInfo[]',
|
||||
type: 'number',
|
||||
sourceName: 'string',
|
||||
},
|
||||
PropInfo: {
|
||||
propName: 'string',
|
||||
propNum: 'number',
|
||||
},
|
||||
OfficialComponentInfo: {
|
||||
boundingClientRect: 'ClientRect',
|
||||
isVisible: 'bool',
|
||||
name: 'string',
|
||||
},
|
||||
RewardsComponentInfo: {
|
||||
canReceiveFriendGiftCount: 'number',
|
||||
canReceiveGiftCount: 'number',
|
||||
name: 'string',
|
||||
receiveDetail: 'ReceiveDetail',
|
||||
},
|
||||
ReceiveDetail: {
|
||||
desc: 'string',
|
||||
icon: 'string',
|
||||
name: 'string',
|
||||
type: 'string',
|
||||
},
|
||||
GetStorageInfoSyncOption: {
|
||||
currentSize: 'number',
|
||||
keys: 'string[]',
|
||||
@ -284,6 +330,18 @@ export const ResType = {
|
||||
added: 'bool',
|
||||
errMsg: 'string',
|
||||
},
|
||||
CheckIsSupportMidasPaymentFailCallbackErr: {
|
||||
errMsg: 'string',
|
||||
},
|
||||
CheckIsSupportMidasPaymentSuccessCallbackResult: {
|
||||
data: 'CheckIsSupportMidasPaymentSuccessCallbackDataResult',
|
||||
errMsg: 'string',
|
||||
},
|
||||
CheckIsSupportMidasPaymentSuccessCallbackDataResult: {
|
||||
allow_pay: 'bool',
|
||||
err_code: 'number',
|
||||
err_msg: 'string',
|
||||
},
|
||||
ChooseImageSuccessCallbackResult: {
|
||||
tempFilePaths: 'string[]',
|
||||
tempFiles: 'ImageFile[]',
|
||||
@ -531,7 +589,7 @@ export const ResType = {
|
||||
status: 'number',
|
||||
errMsg: 'string',
|
||||
},
|
||||
GetChatToolInfoSuccessCallbackResult: {
|
||||
RequestMidasFriendPaymentSuccessCallbackResult: {
|
||||
cloudID: 'string',
|
||||
encryptedData: 'string',
|
||||
errMsg: 'string',
|
||||
@ -575,9 +633,14 @@ export const ResType = {
|
||||
errMsg: 'string',
|
||||
},
|
||||
GetGameExptInfoSuccessCallbackResult: {
|
||||
list: 'object',
|
||||
list: 'GameExptInfo[]',
|
||||
errMsg: 'string',
|
||||
},
|
||||
GameExptInfo: {
|
||||
expt_id: 'number',
|
||||
param_name: 'string',
|
||||
param_value: 'string',
|
||||
},
|
||||
GetGroupEnterInfoError: {
|
||||
errMsg: 'string',
|
||||
errCode: 'number',
|
||||
@ -611,6 +674,16 @@ export const ResType = {
|
||||
localip: 'string',
|
||||
netmask: 'string',
|
||||
},
|
||||
GetLocationSuccessCallbackResult: {
|
||||
accuracy: 'number',
|
||||
altitude: 'number',
|
||||
horizontalAccuracy: 'number',
|
||||
latitude: 'number',
|
||||
longitude: 'number',
|
||||
speed: 'number',
|
||||
verticalAccuracy: 'number',
|
||||
errMsg: 'string',
|
||||
},
|
||||
GetNetworkTypeSuccessCallbackResult: {
|
||||
hasSystemProxy: 'bool',
|
||||
networkType: 'string',
|
||||
@ -764,6 +837,7 @@ export const ResType = {
|
||||
},
|
||||
OnCopyUrlListenerResult: {
|
||||
query: 'string',
|
||||
title: 'string',
|
||||
},
|
||||
OnDeviceMotionChangeListenerResult: {
|
||||
alpha: 'number',
|
||||
@ -773,6 +847,11 @@ export const ResType = {
|
||||
OnDeviceOrientationChangeListenerResult: {
|
||||
value: 'string',
|
||||
},
|
||||
OnDirectAdStatusChangeListenerResult: {
|
||||
isEndByAbnormal: 'bool',
|
||||
isInDirectGameAd: 'bool',
|
||||
isInMask: 'bool',
|
||||
},
|
||||
ListenerError: {
|
||||
message: 'string',
|
||||
},
|
||||
@ -927,6 +1006,14 @@ export const ResType = {
|
||||
eventType: 'number',
|
||||
branchDim: 'string',
|
||||
},
|
||||
FacialRecognitionError: {
|
||||
errMsg: 'string',
|
||||
errCode: 'number',
|
||||
},
|
||||
RequestFacialVerifyError: {
|
||||
errMsg: 'string',
|
||||
errCode: 'number',
|
||||
},
|
||||
MidasFriendPaymentError: {
|
||||
errMsg: 'string',
|
||||
errCode: 'number',
|
||||
@ -961,7 +1048,7 @@ export const ResType = {
|
||||
errMsg: 'string',
|
||||
},
|
||||
RequestSubscribeMessageSuccessCallbackResult: {
|
||||
anyKeyWord: 'string',
|
||||
anyKeyWord: 'object',
|
||||
errMsg: 'string',
|
||||
},
|
||||
RequestSubscribeSystemMessageSuccessCallbackResult: {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 29bb396fede385355f8cc12d4208b2c8
|
||||
guid: 6f6259f33f1b541c85b7d7946f51394b
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 364efc7b0c004ed1a73c653dc90d6102
|
||||
guid: c2387ee856f9dd44cb5f6e0a36df4a2e
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9defc76ebce86c764b49b61c08daa4d5
|
||||
guid: a8a298572b2b5b89e51cf5b405126697
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e695a0b96c72685c921b30273ffafb44
|
||||
guid: 5f4279e78ef543922006aabd67ccf8cc
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1a49c91d62d4afe06ebacae406ba4589
|
||||
guid: 546f5a51f5e6dda4e1b35d6ce7fabb88
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c13d3f68318fa2422d11bd0fdcb98f7b
|
||||
guid: caa427d56f8ca697d1d20cfc0b51103f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e2804651416f856c1c736d0aee469272
|
||||
guid: 144dec272c960881492cb5df90c9e166
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2f33c2f07d49e6d746360eed7ddb8584
|
||||
guid: b7e9e51efa212fa77db59f80e60d1a1b
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 70b56bc209bb306d0a0e40c7ab3189ec
|
||||
guid: 46eadddce09ad54d2091cffdf4dad10a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bfb25047b539317dbe9e69a5ac129033
|
||||
guid: cc6370f1ed29a348e1cba44ece5e51d2
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a99e9d9410edf4aeb82e0600ebb5febd
|
||||
guid: f52cb03fdde5111d9762604c2ca4d923
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a2fabb3becfd53671192a74b65ca3ceb
|
||||
guid: baeba0b9c6b8caec08cd7c3164ef640d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3e2cc28a570e41c87aa57b8a9ba7537a
|
||||
guid: 2bd5ad553815ba0d3637aebb7c6be1a0
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: da46eea5b3cffd47f66b3f8bfcb25481
|
||||
guid: 0d040182742c87af858c3859104a82d8
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 451ed408191ecd3d62cca654e769e333
|
||||
guid: 1496bd4d947f22b61098eef85a748ef6
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b38e0edd1915379960425931dfcba439
|
||||
guid: 50500121fb9eb14f5f9cc32c7c0d00da
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5793663b55b21fc1253bffce24460e0f
|
||||
guid: aa39589460c02bc26f5fed5a74e3c81e
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4b987bd2a2d9dd1e989dd304f1e93817
|
||||
guid: ce2f7bac749efebdaa7a7e771c61fa47
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9686645b3ba4c7544f887d13c7c3f4c7
|
||||
guid: 2d7379a8307370c1167067746380ec07
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 304ffa1f24948f7b60120d0fc2a412f3
|
||||
guid: 242b35c86b70af4261b049a078733e8e
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fc26402daa11fb5a72967c40754f9856
|
||||
guid: 870ae9e8c565d9c6e06ec9dcfd380513
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ad3b93ce4bb288d29bb726ad199f7365
|
||||
guid: deffaef26bea65f2ac3fc02c1597a57c
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 552d22574939bf4fd398392626f601c0
|
||||
guid: a968fe5a9e0142eaa5eda3c190ac9606
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 294b49f731df8f648e7fd7220ef39ba2
|
||||
guid: 4d1ced21bcaa2b67894f4b59cf4415d8
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dc31f1907a6e0f7096d8be1e2e862df3
|
||||
guid: 56715fae853f18984b628a43b9019d9c
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3297c469eb1a3f35e8bc0ab17d1f0f43
|
||||
guid: af24ca132eb5afee4be544200581c4b2
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 22cdd3133b5282c082ddfbe9cc897e3f
|
||||
guid: 13800b8477fa33a8a4212dd1db46775a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bb06dcb377cb00c217c382e7e3e66b4e
|
||||
guid: 38772387b1d73a5d4651a224d131ea93
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b73baa6e751b06320bc3609b46d8fbd7
|
||||
guid: d20901b8d0ccc850d56aab6eaebe6a9a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: edf4fceecc870c5fe08dccaeb2ac993c
|
||||
guid: cf26d78f3dfbf702767b11bf0dcf7503
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a0061df1f485e5d9d4cd6849350dcdb1
|
||||
guid: 452a9cf9f66ca776ecc0f268a7af400d
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a3d93fda6e19dfe28779cdc9542a88ce
|
||||
guid: 4157471149be05f0a56fa7a181aa7d1c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 376549e321315e792215a612bbc11a55
|
||||
guid: 2d6b2f41ea75464e0b70cb3df7d84d67
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6b9b9c9f7008142b707dff36eeb68311
|
||||
guid: 2753eae06b4aa37cd239621f8ad8d6bf
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user