mirror of
https://github.com/wechat-miniprogram/minigame-tuanjie-transform-sdk.git
synced 2026-04-21 17:25:54 +08:00
Auto-publish release WXSDK.
This commit is contained in:
parent
e6be0c0834
commit
2f51b4b612
12
CHANGELOG.md
12
CHANGELOG.md
@ -6,6 +6,18 @@ Removed - 删除功能/接口
|
||||
Fixed - 修复问题
|
||||
Others - 其他
|
||||
-->
|
||||
## 2024-12-25 【预发布】
|
||||
PackageManager(git URL): https://github.com/wechat-miniprogram/minigame-tuanjie-transform-sdk.git#pre-v0.1.24
|
||||
### Feature
|
||||
* 普通: OffShareMessageToFriend支持
|
||||
### Fixed
|
||||
* 普通: reserveChannelsLive补充回调参数
|
||||
* 普通: 低基础库版本报错修复
|
||||
* 普通: BannerAd.OnResize回调报错修复
|
||||
* 普通: requestMidasPaymentGameItem修复
|
||||
* 普通: WriteSync接口无法正常返回已写入的字节数
|
||||
* 普通: ReadSync接口无法正常调用
|
||||
|
||||
## 2024-12-18 【重要更新】
|
||||
### Feature
|
||||
* 普通: 开放数据域支持screenCanvas
|
||||
|
||||
@ -119,6 +119,7 @@ namespace WeChatWASM
|
||||
CheckBuildTarget();
|
||||
Init();
|
||||
ProcessWxPerfBinaries();
|
||||
MakeEnvForLuaAdaptor();
|
||||
// JSLib
|
||||
SettingWXTextureMinJSLib();
|
||||
UpdateGraphicAPI();
|
||||
@ -318,7 +319,7 @@ namespace WeChatWASM
|
||||
|
||||
{
|
||||
// wx_perf_2021.a
|
||||
bool bShouldEnablePerf2021Plugin = config.CompileOptions.enablePerfAnalysis && IsCompatibleWithUnity202103To202203();
|
||||
bool bShouldEnablePerf2021Plugin = config.CompileOptions.enablePerfAnalysis && IsCompatibleWithUnity202102To202203();
|
||||
|
||||
var wxPerf2021Importer = AssetImporter.GetAtPath(wxPerfPlugins[2]) as PluginImporter;
|
||||
#if PLATFORM_WEIXINMINIGAME
|
||||
@ -331,6 +332,127 @@ namespace WeChatWASM
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
|
||||
/**
|
||||
* Lua Adaptor Settings.
|
||||
*/
|
||||
|
||||
private static bool GetRequiredLuaHeaderFiles(out Dictionary<string, string> luaPaths)
|
||||
{
|
||||
luaPaths = new Dictionary<string, string>()
|
||||
{
|
||||
{"lua.h", null},
|
||||
{"lobject.h", null},
|
||||
{"lstate.h", null},
|
||||
{"lfunc.h", null},
|
||||
{"lapi.h", null},
|
||||
{"lstring.h", null},
|
||||
{"ltable.h", null},
|
||||
{"lauxlib.h", null},
|
||||
};
|
||||
|
||||
string rootPath = Directory.GetParent(Application.dataPath).ToString();
|
||||
string[] paths = Directory.GetFiles(rootPath, "*.h", SearchOption.AllDirectories);
|
||||
foreach (var path in paths)
|
||||
{
|
||||
string filename = Path.GetFileName(path);
|
||||
if (luaPaths.ContainsKey(Path.GetFileName(path)))
|
||||
{
|
||||
luaPaths[filename] = path;
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var expectFile in luaPaths)
|
||||
{
|
||||
if (expectFile.Value == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private static string GetLuaAdaptorPath(string filename)
|
||||
{
|
||||
string DS = WXAssetsTextTools.DS;
|
||||
if (UnityUtil.GetSDKMode() == UnityUtil.SDKMode.Package)
|
||||
{
|
||||
return $"Packages{DS}com.qq.weixin.minigame{DS}Runtime{DS}Plugins{DS}LuaAdaptor{DS}{filename}";
|
||||
}
|
||||
|
||||
return $"Assets{DS}WX-WASM-SDK-V2{DS}Runtime{DS}Plugins{DS}LuaAdaptor{DS}{filename}";
|
||||
}
|
||||
|
||||
private static void MakeLuaImport(Dictionary<string, string> luaPaths)
|
||||
{
|
||||
string luaAdaptorImportHeaderPath = GetLuaAdaptorPath("lua_adaptor_import.h");
|
||||
if (!File.Exists(luaAdaptorImportHeaderPath))
|
||||
{
|
||||
Debug.LogError("Lua Adaptor File Not Found: " + luaAdaptorImportHeaderPath);
|
||||
return;
|
||||
}
|
||||
|
||||
string includeLuaContent = "//EMSCRIPTEN_ENV_LUA_IMPORT_LOGIC_START";
|
||||
foreach (var luaPath in luaPaths)
|
||||
{
|
||||
includeLuaContent += $"\n#include \"{luaPath.Value.Replace("\\", "\\\\")}\"";
|
||||
}
|
||||
includeLuaContent += "\n//EMSCRIPTEN_ENV_LUA_IMPORT_LOGIC_END";
|
||||
|
||||
string importHeaderContent = File.ReadAllText(luaAdaptorImportHeaderPath);
|
||||
importHeaderContent = Regex.Replace(
|
||||
importHeaderContent,
|
||||
"//EMSCRIPTEN_ENV_LUA_IMPORT_LOGIC_START([\\s\\S]*?)//EMSCRIPTEN_ENV_LUA_IMPORT_LOGIC_END",
|
||||
includeLuaContent
|
||||
);
|
||||
|
||||
File.WriteAllText(luaAdaptorImportHeaderPath, importHeaderContent);
|
||||
}
|
||||
|
||||
private static void ManageLuaAdaptorBuildOptions(bool shouldBuild) {
|
||||
string[] maybeBuildFiles = new string[]
|
||||
{
|
||||
"lua_adaptor_501.c",
|
||||
"lua_adaptor_503.c",
|
||||
"lua_adaptor_comm.c",
|
||||
"lua_adaptor_import.h",
|
||||
};
|
||||
|
||||
foreach (var maybeBuildFile in maybeBuildFiles)
|
||||
{
|
||||
string path = GetLuaAdaptorPath(maybeBuildFile);
|
||||
if (!File.Exists(path) && shouldBuild)
|
||||
{
|
||||
Debug.LogError("Lua Adaptor File Not Found: " + maybeBuildFile);
|
||||
continue;
|
||||
}
|
||||
|
||||
var wxPerfJSBridgeImporter = AssetImporter.GetAtPath(path) as PluginImporter;
|
||||
if (wxPerfJSBridgeImporter == null)
|
||||
{
|
||||
Debug.LogError("Lua Adaptor Importer Not Found: " + maybeBuildFile);
|
||||
continue;
|
||||
}
|
||||
#if PLATFORM_WEIXINMINIGAME
|
||||
wxPerfJSBridgeImporter.SetCompatibleWithPlatform(BuildTarget.WeixinMiniGame, shouldBuild);
|
||||
#else
|
||||
wxPerfJSBridgeImporter.SetCompatibleWithPlatform(BuildTarget.WebGL, shouldBuild);
|
||||
#endif
|
||||
SetPluginCompatibilityByModifyingMetadataFile(path, shouldBuild);
|
||||
}
|
||||
}
|
||||
|
||||
private static void MakeEnvForLuaAdaptor()
|
||||
{
|
||||
bool hasLuaEnv = GetRequiredLuaHeaderFiles(out var luaPaths);
|
||||
if (hasLuaEnv)
|
||||
{
|
||||
MakeLuaImport(luaPaths);
|
||||
}
|
||||
|
||||
ManageLuaAdaptorBuildOptions(hasLuaEnv && config.CompileOptions.enablePerfAnalysis);
|
||||
}
|
||||
|
||||
private static bool IsCompatibleWithUnity202203OrNewer()
|
||||
{
|
||||
#if UNITY_2022_3_OR_NEWER
|
||||
@ -340,11 +462,11 @@ namespace WeChatWASM
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool IsCompatibleWithUnity202103To202203()
|
||||
static bool IsCompatibleWithUnity202102To202203()
|
||||
{
|
||||
#if UNITY_2022_3_OR_NEWER
|
||||
return false;
|
||||
#elif !UNITY_2021_3_OR_NEWER
|
||||
#elif !UNITY_2021_2_OR_NEWER
|
||||
return false;
|
||||
#else
|
||||
return true;
|
||||
@ -642,7 +764,7 @@ namespace WeChatWASM
|
||||
|
||||
var header = "var OriginalAudioContext = window.AudioContext || window.webkitAudioContext;window.AudioContext = function() {if (this instanceof window.AudioContext) {return wx.createWebAudioContext();} else {return new OriginalAudioContext();}};";
|
||||
|
||||
if (config.CompileOptions.DevelopBuild)
|
||||
if (config.CompileOptions.DevelopBuild && config.CompileOptions.enablePerfAnalysis)
|
||||
{
|
||||
header = header + RenderAnalysisRules.header;
|
||||
for (i = 0; i < RenderAnalysisRules.rules.Length; i++)
|
||||
@ -680,17 +802,18 @@ namespace WeChatWASM
|
||||
if (WXExtEnvDef.GETDEF("UNITY_2021_2_OR_NEWER"))
|
||||
{
|
||||
// PlayerSettings.WeixinMiniGame.emscriptenArgs += " -s EXPORTED_FUNCTIONS=_main,_sbrk,_emscripten_stack_get_base,_emscripten_stack_get_end";
|
||||
PlayerSettings.WeixinMiniGame.emscriptenArgs += " -s EXPORTED_FUNCTIONS=_sbrk,_emscripten_stack_get_base,_emscripten_stack_get_end -s ERROR_ON_UNDEFINED_SYMBOLS=0";
|
||||
PlayerSettings.WeixinMiniGame.emscriptenArgs += " -s EXPORTED_FUNCTIONS=_main,_sbrk,_emscripten_stack_get_base,_emscripten_stack_get_end -s ERROR_ON_UNDEFINED_SYMBOLS=0";
|
||||
}
|
||||
|
||||
#else
|
||||
PlayerSettings.WebGL.emscriptenArgs = string.Empty;
|
||||
if (WXExtEnvDef.GETDEF("UNITY_2021_2_OR_NEWER"))
|
||||
{
|
||||
PlayerSettings.WebGL.emscriptenArgs += " -s EXPORTED_FUNCTIONS=_sbrk,_emscripten_stack_get_base,_emscripten_stack_get_end -s ERROR_ON_UNDEFINED_SYMBOLS=0";
|
||||
#if UNITY_2021_2_5
|
||||
PlayerSettings.WebGL.emscriptenArgs += ",_main";
|
||||
PlayerSettings.WebGL.emscriptenArgs += " -s EXPORTED_FUNCTIONS=_sbrk,_emscripten_stack_get_base,_emscripten_stack_get_end";
|
||||
#if UNITY_2021_2_5 || UNITY_6000_0_OR_NEWER
|
||||
PlayerSettings.WebGL.emscriptenArgs += ",_main";
|
||||
#endif
|
||||
PlayerSettings.WebGL.emscriptenArgs += " -s ERROR_ON_UNDEFINED_SYMBOLS=0";
|
||||
}
|
||||
#endif
|
||||
PlayerSettings.runInBackground = false;
|
||||
@ -752,6 +875,14 @@ namespace WeChatWASM
|
||||
PlayerSettings.WebGL.emscriptenArgs += " --profiling-funcs ";
|
||||
}
|
||||
|
||||
#if UNITY_6000_0_OR_NEWER
|
||||
if (config.CompileOptions.enableWasm2023) {
|
||||
PlayerSettings.WebGL.wasm2023 = true;
|
||||
} else {
|
||||
PlayerSettings.WebGL.wasm2023 = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if UNITY_2021_2_OR_NEWER
|
||||
#if UNITY_2022_1_OR_NEWER
|
||||
// 默认更改为OptimizeSize,减少代码包体积
|
||||
|
||||
@ -202,6 +202,10 @@ namespace WeChatWASM
|
||||
this.formCheckbox("enableProfileStats", "显示性能面板");
|
||||
this.formCheckbox("enableRenderAnalysis", "显示渲染日志(dev only)");
|
||||
this.formCheckbox("brotliMT", "brotli多线程压缩(?)", "开启多线程压缩可以提高出包速度,但会降低压缩率。如若不使用wasm代码分包请勿用多线程出包上线");
|
||||
#if UNITY_6000_0_OR_NEWER
|
||||
this.formCheckbox("enableWasm2023", "WebAssembly 2023(?)", "WebAssembly 2023包括对WebAssembly.Table和BigInt的支持。(Android (Android 10 or later recommended), iOS (iOS 15 or later recommended))");
|
||||
#endif
|
||||
|
||||
if (m_EnablePerfTool)
|
||||
{
|
||||
this.formCheckbox("enablePerfAnalysis", "集成性能分析工具", "将性能分析工具集成入Development Build包中", false, null, OnPerfAnalysisFeatureToggleChanged);
|
||||
@ -470,6 +474,7 @@ namespace WeChatWASM
|
||||
this.setData("enableProfileStats", config.CompileOptions.enableProfileStats);
|
||||
this.setData("enableRenderAnalysis", config.CompileOptions.enableRenderAnalysis);
|
||||
this.setData("brotliMT", config.CompileOptions.brotliMT);
|
||||
this.setData("enableWasm2023", config.CompileOptions.enableWasm2023);
|
||||
this.setData("enablePerfAnalysis", config.CompileOptions.enablePerfAnalysis);
|
||||
this.setData("autoUploadFirstBundle", true);
|
||||
|
||||
@ -542,6 +547,9 @@ namespace WeChatWASM
|
||||
config.CompileOptions.enableProfileStats = this.getDataCheckbox("enableProfileStats");
|
||||
config.CompileOptions.enableRenderAnalysis = this.getDataCheckbox("enableRenderAnalysis");
|
||||
config.CompileOptions.brotliMT = this.getDataCheckbox("brotliMT");
|
||||
#if UNITY_6000_0_OR_NEWER
|
||||
config.CompileOptions.enableWasm2023 = this.getDataCheckbox("enableWasm2023");
|
||||
#endif
|
||||
config.CompileOptions.enablePerfAnalysis = this.getDataCheckbox("enablePerfAnalysis");
|
||||
|
||||
// font options
|
||||
@ -720,7 +728,20 @@ namespace WeChatWASM
|
||||
{
|
||||
const string MACRO_ENABLE_WX_PERF_FEATURE = "ENABLE_WX_PERF_FEATURE";
|
||||
string defineSymbols = PlayerSettings.GetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup);
|
||||
if (this.getDataCheckbox("enablePerfAnalysis") && this.getDataCheckbox("developBuild"))
|
||||
|
||||
bool shouldAddSymbol = this.getDataCheckbox("enablePerfAnalysis") && this.getDataCheckbox("developBuild");
|
||||
|
||||
#if !UNITY_2021_2_OR_NEWER || UNITY_2023_2_OR_NEWER
|
||||
if(shouldAddSymbol)
|
||||
{
|
||||
shouldAddSymbol = false;
|
||||
EditorUtility.DisplayDialog("警告", $"当前Unity版本({Application.unityVersion})不在性能分析工具适配范围内(2021.2-2023.1), 性能分析工具将被禁用。", "确定");
|
||||
config.CompileOptions.enablePerfAnalysis = false;
|
||||
this.setData("enablePerfAnalysis", false);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (shouldAddSymbol)
|
||||
{
|
||||
if (defineSymbols.IndexOf(MACRO_ENABLE_WX_PERF_FEATURE) == -1)
|
||||
{
|
||||
|
||||
@ -72,6 +72,11 @@ namespace WeChatWASM
|
||||
#else
|
||||
WXExtEnvDef.SETDEF("UNITY_2022", false);
|
||||
#endif
|
||||
#if UNITY_6000
|
||||
WXExtEnvDef.SETDEF("UNITY_6000", true);
|
||||
#else
|
||||
WXExtEnvDef.SETDEF("UNITY_6000", false);
|
||||
#endif
|
||||
#if UNITY_2022_2_OR_NEWER
|
||||
WXExtEnvDef.SETDEF("UNITY_2022_2_OR_NEWER", true);
|
||||
#else
|
||||
@ -92,6 +97,11 @@ namespace WeChatWASM
|
||||
#else
|
||||
WXExtEnvDef.SETDEF("TUANJIE_2022_3_OR_NEWER", false);
|
||||
#endif
|
||||
#if UNITY_6000_0_OR_NEWER
|
||||
WXExtEnvDef.SETDEF("UNITY_6000_0_OR_NEWER", true);
|
||||
#else
|
||||
WXExtEnvDef.SETDEF("UNITY_6000_0_OR_NEWER", false);
|
||||
#endif
|
||||
#if PLATFORM_WEIXINMINIGAME
|
||||
WXExtEnvDef.SETDEF("PLATFORM_WEIXINMINIGAME", true);
|
||||
#else
|
||||
|
||||
@ -2,7 +2,7 @@ namespace WeChatWASM
|
||||
{
|
||||
public class WXPluginVersion
|
||||
{
|
||||
public static string pluginVersion = "202412230248"; // 这一行不要改他,导出的时候会自动替换
|
||||
public static string pluginVersion = "202501071257"; // 这一行不要改他,导出的时候会自动替换
|
||||
}
|
||||
|
||||
public class WXPluginConf
|
||||
|
||||
Binary file not shown.
@ -638,6 +638,11 @@
|
||||
是否使用brotli多线程压缩
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.CompileOptions.enableWasm2023">
|
||||
<summary>
|
||||
是否开启 WebAssembly2023特性
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.FontOptions.CJK_Unified_Ideographs">
|
||||
<summary>
|
||||
基本汉字 [0x4e00, 0x9fff] https://www.unicode.org/charts/PDF/U4E00.pdf
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ba615cd5260ee5164977f0370e5a48ce
|
||||
guid: b2b552cdfb3043dcf333ddd380f1b5be
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 369971e5d9cddbe4b807891309e177b3
|
||||
guid: 8c4a9d1a32668797e0daa1772da0277b
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
141
Runtime/Plugins/LuaAdaptor/lua_adaptor_501.c
Normal file
141
Runtime/Plugins/LuaAdaptor/lua_adaptor_501.c
Normal file
@ -0,0 +1,141 @@
|
||||
#include "lua_adaptor_import.h"
|
||||
|
||||
#if LUA_VERSION_NUM == 501
|
||||
static TValue* lua_index2addr(lua_State* L, int idx)
|
||||
{
|
||||
CallInfo* ci = L->ci;
|
||||
if (idx > 0)
|
||||
{
|
||||
TValue* o = ci->func + idx;
|
||||
// api_check(L, idx <= ci->top - (ci->func + 1), "unacceptable index");
|
||||
if (o >= L->top) return NONVALIDVALUE;
|
||||
else return o;
|
||||
}
|
||||
else if (!ispseudo(idx))
|
||||
{
|
||||
/* negative index */
|
||||
// api_check(L, idx != 0 && -idx <= L->top - (ci->func + 1), "invalid index");
|
||||
return L->top + idx;
|
||||
}
|
||||
else if (idx == LUA_REGISTRYINDEX)
|
||||
return &G(L)->l_registry;
|
||||
else
|
||||
{
|
||||
/* upvalues */
|
||||
idx = LUA_REGISTRYINDEX - idx;
|
||||
// api_check(L, idx <= MAXUPVAL + 1, "upvalue index too large");
|
||||
if (iscfunction(ci->func))
|
||||
return NONVALIDVALUE;
|
||||
else
|
||||
{
|
||||
CClosure* func = &ci->func->value.gc->cl.c;
|
||||
return (idx <= func->nupvalues) ? &func->upvalue[idx - 1] : NONVALIDVALUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
size_t lua_sizeof(lua_State* L, int idx){
|
||||
const char* tn = lua_typename(L, lua_type(L, -1));
|
||||
TValue* o = lua_index2addr(L, idx);
|
||||
if (!o)
|
||||
return 0;
|
||||
|
||||
switch (ttype(o))
|
||||
{
|
||||
|
||||
case LUA_TTABLE:
|
||||
{
|
||||
luaL_checkstack(L, LUA_MINSTACK, NULL);
|
||||
Table* h = hvalue(o);
|
||||
if (h == NULL) {
|
||||
return 0;
|
||||
}
|
||||
return (sizeof(Table) + sizeof(TValue) * h->sizearray +
|
||||
sizeof(Node) * (sizenode(h)));
|
||||
}
|
||||
case LUA_TFUNCTION:
|
||||
{
|
||||
if (iscfunction(o)) {
|
||||
return sizeCclosure(o->value.gc->cl.c.nupvalues);
|
||||
} else {
|
||||
return sizeLclosure(o->value.gc->cl.l.nupvalues);
|
||||
}
|
||||
}
|
||||
case LUA_TTHREAD:
|
||||
{
|
||||
lua_State* th = thvalue(o);
|
||||
|
||||
return (sizeof(lua_State) + sizeof(TValue) * th->stacksize +
|
||||
sizeof(CallInfo) * th->size_ci);
|
||||
}
|
||||
case LUA_TPROTO:
|
||||
{
|
||||
Proto* p = (Proto*)pvalue(o);
|
||||
return (sizeof(Proto) +
|
||||
sizeof(Instruction) * p->sizecode +
|
||||
sizeof(Proto*) * p->sizep +
|
||||
sizeof(TValue) * p->sizek +
|
||||
sizeof(int) * p->sizelineinfo +
|
||||
sizeof(LocVar) * p->sizelocvars +
|
||||
sizeof(TString*) * p->sizeupvalues);
|
||||
}
|
||||
|
||||
case LUA_TUSERDATA:
|
||||
{
|
||||
return sizeudata(uvalue(o));
|
||||
}
|
||||
case LUA_TSTRING:
|
||||
{
|
||||
TString* ts = &o->value.gc->ts;
|
||||
return sizeof(TString) + sizeof(char) * ts->tsv.len + 1;
|
||||
}
|
||||
case LUA_TNUMBER:
|
||||
{
|
||||
return sizeof(lua_Number);
|
||||
}
|
||||
case LUA_TBOOLEAN:
|
||||
{
|
||||
return sizeof(int);
|
||||
}
|
||||
case LUA_TLIGHTUSERDATA:
|
||||
{
|
||||
return sizeof(void*);
|
||||
}
|
||||
default: return (size_t)(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
uintptr_t lua_getaddr(lua_State* L, int idx) {
|
||||
TValue* o = lua_index2addr(L, idx);
|
||||
if (!o)
|
||||
return (uintptr_t)(lua_topointer(L, -1));
|
||||
|
||||
switch (ttype(o))
|
||||
{
|
||||
case LUA_TPROTO:
|
||||
{
|
||||
return (uintptr_t)(pvalue(o));
|
||||
}
|
||||
case LUA_TSTRING:
|
||||
{
|
||||
return (uintptr_t)(getstr(o));
|
||||
}
|
||||
case LUA_TTABLE:
|
||||
case LUA_TFUNCTION:
|
||||
case LUA_TTHREAD:
|
||||
case LUA_TUSERDATA:
|
||||
case LUA_TLIGHTUSERDATA:
|
||||
default: {
|
||||
return (uintptr_t)(lua_topointer(L, -1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int (lua_getuservalue) (lua_State *L, int idx) {
|
||||
lua_pushnil(L);
|
||||
}
|
||||
|
||||
#endif
|
||||
74
Runtime/Plugins/LuaAdaptor/lua_adaptor_501.c.meta
Normal file
74
Runtime/Plugins/LuaAdaptor/lua_adaptor_501.c.meta
Normal file
@ -0,0 +1,74 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 596142b9479e1ab4caaf44c77d5a7d8f
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 1
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
: Any
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
Exclude Editor: 1
|
||||
Exclude Linux64: 1
|
||||
Exclude OSXUniversal: 1
|
||||
Exclude WebGL: 1
|
||||
Exclude Win: 1
|
||||
Exclude Win64: 1
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
DefaultValueInitialized: true
|
||||
OS: AnyOS
|
||||
- first:
|
||||
Standalone: Linux64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
Standalone: OSXUniversal
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
Standalone: Win
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
Standalone: Win64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
WebGL: WebGL
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
WeixinMiniGame: WeixinMiniGame
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
161
Runtime/Plugins/LuaAdaptor/lua_adaptor_503.c
Normal file
161
Runtime/Plugins/LuaAdaptor/lua_adaptor_503.c
Normal file
@ -0,0 +1,161 @@
|
||||
#include "lua_adaptor_import.h"
|
||||
|
||||
#if LUA_VERSION_NUM == 503
|
||||
|
||||
#define GETTVALUE(v) v
|
||||
#define tvtype(o) ttnov(o)
|
||||
#define LUA_PROTO LUA_TPROTO
|
||||
#define LUA_UPVAL LUA_TUPVAL
|
||||
#define LUA_TABLE LUA_TTABLE
|
||||
#define LUA_THREAD LUA_TTHREAD
|
||||
#define LUA_USERDATA LUA_TUSERDATA
|
||||
#define LUA_LIGHTUSERDATA LUA_TLIGHTUSERDATA
|
||||
#define LUA_SHRSTR LUA_TSHRSTR
|
||||
#define LUA_LNGSTR LUA_TLNGSTR
|
||||
#define LUA_LCL LUA_TLCL
|
||||
#define LUA_CCL LUA_TCCL
|
||||
#define LUA_LCF LUA_TLCF
|
||||
#define LUA_IS_LUA_C_FUNCTION(f) (ttislcf(f))
|
||||
#define LUA_C_CLUSTER_VALUE(f) (clCvalue(f))
|
||||
|
||||
static TValue* lua_index2addr(lua_State* L, int idx)
|
||||
{
|
||||
CallInfo* ci = L->ci;
|
||||
if (idx > 0)
|
||||
{
|
||||
TValue* o = GETTVALUE(ci->func + idx);
|
||||
api_check(L, idx <= ci->top - (ci->func + 1), "unacceptable index");
|
||||
if (o >= GETTVALUE(L->top)) return NONVALIDVALUE;
|
||||
else return o;
|
||||
}
|
||||
else if (!ispseudo(idx))
|
||||
{
|
||||
/* negative index */
|
||||
api_check(L, idx != 0 && -idx <= L->top - (ci->func + 1), "invalid index");
|
||||
return GETTVALUE(L->top + idx);
|
||||
}
|
||||
else if (idx == LUA_REGISTRYINDEX)
|
||||
return &G(L)->l_registry;
|
||||
else
|
||||
{
|
||||
/* upvalues */
|
||||
idx = LUA_REGISTRYINDEX - idx;
|
||||
api_check(L, idx <= MAXUPVAL + 1, "upvalue index too large");
|
||||
if (LUA_IS_LUA_C_FUNCTION(GETTVALUE(ci->func)))
|
||||
return NONVALIDVALUE;
|
||||
else
|
||||
{
|
||||
CClosure* func = LUA_C_CLUSTER_VALUE(GETTVALUE(ci->func));
|
||||
return (idx <= func->nupvalues) ? &func->upvalue[idx - 1] : NONVALIDVALUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uintptr_t lua_getaddr(lua_State* L, int idx) {
|
||||
TValue* o = lua_index2addr(L, idx);
|
||||
if (!o)
|
||||
return (uintptr_t)(lua_topointer(L, -1));
|
||||
|
||||
switch (tvtype(o))
|
||||
{
|
||||
case LUA_TPROTO:
|
||||
{
|
||||
return (uintptr_t)(pvalue(o));
|
||||
}
|
||||
case LUA_SHRSTR:
|
||||
case LUA_LNGSTR:
|
||||
{
|
||||
return (uintptr_t)(tsvalue(o));
|
||||
}
|
||||
case LUA_TTABLE:
|
||||
case LUA_LCL:
|
||||
case LUA_CCL:
|
||||
case LUA_LCF:
|
||||
case LUA_TTHREAD:
|
||||
case LUA_TUSERDATA:
|
||||
case LUA_TLIGHTUSERDATA:
|
||||
default: {
|
||||
return (uintptr_t)(lua_topointer(L, -1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
size_t lua_sizeof(lua_State* L, int idx){
|
||||
const char* tn = lua_typename(L, lua_type(L, -1));
|
||||
TValue* o = lua_index2addr(L, idx);
|
||||
if (!o)
|
||||
return 0;
|
||||
|
||||
switch (tvtype(o))
|
||||
{
|
||||
|
||||
case LUA_TABLE:
|
||||
{
|
||||
luaL_checkstack(L, LUA_MINSTACK, NULL);
|
||||
Table* h = hvalue(o);
|
||||
if (h == NULL) {
|
||||
return 0;
|
||||
}
|
||||
return (sizeof(Table) + sizeof(TValue) * h->sizearray +
|
||||
sizeof(Node) * (isdummy(h) ? 0 : sizenode(h)));
|
||||
}
|
||||
case LUA_LCL:
|
||||
{
|
||||
LClosure* cl = clLvalue(o);
|
||||
return sizeLclosure(cl->nupvalues);
|
||||
}
|
||||
case LUA_CCL:
|
||||
{
|
||||
CClosure* cl = clCvalue(o);
|
||||
return sizeCclosure(cl->nupvalues);
|
||||
}
|
||||
case LUA_TTHREAD:
|
||||
{
|
||||
lua_State* th = thvalue(o);
|
||||
|
||||
return (sizeof(lua_State) + sizeof(TValue) * th->stacksize +
|
||||
sizeof(CallInfo) * th->nci);
|
||||
}
|
||||
case LUA_PROTO:
|
||||
{
|
||||
Proto* p = (Proto*)pvalue(o);
|
||||
return (sizeof(Proto) +
|
||||
sizeof(Instruction) * p->sizecode +
|
||||
sizeof(Proto*) * p->sizep +
|
||||
sizeof(TValue) * p->sizek +
|
||||
sizeof(int) * p->sizelineinfo +
|
||||
sizeof(LocVar) * p->sizelocvars +
|
||||
sizeof(TString*) * p->sizeupvalues);
|
||||
}
|
||||
|
||||
case LUA_USERDATA:
|
||||
{
|
||||
return sizeudata(uvalue(o));
|
||||
}
|
||||
case LUA_SHRSTR:
|
||||
{
|
||||
TString* ts = gco2ts(o);
|
||||
return sizelstring(ts->shrlen);
|
||||
}
|
||||
case LUA_LNGSTR:
|
||||
{
|
||||
TString* ts = gco2ts(o);
|
||||
return sizelstring(ts->u.lnglen);
|
||||
}
|
||||
case LUA_TNUMBER:
|
||||
{
|
||||
return sizeof(lua_Number);
|
||||
}
|
||||
case LUA_TBOOLEAN:
|
||||
{
|
||||
return sizeof(int);
|
||||
}
|
||||
case LUA_LIGHTUSERDATA:
|
||||
{
|
||||
return sizeof(void*);
|
||||
}
|
||||
default: return (size_t)(0);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
74
Runtime/Plugins/LuaAdaptor/lua_adaptor_503.c.meta
Normal file
74
Runtime/Plugins/LuaAdaptor/lua_adaptor_503.c.meta
Normal file
@ -0,0 +1,74 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 798157947f88e004d938d2092163d6eb
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 1
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
: Any
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
Exclude Editor: 1
|
||||
Exclude Linux64: 1
|
||||
Exclude OSXUniversal: 1
|
||||
Exclude WebGL: 1
|
||||
Exclude Win: 1
|
||||
Exclude Win64: 1
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
DefaultValueInitialized: true
|
||||
OS: AnyOS
|
||||
- first:
|
||||
Standalone: Linux64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
Standalone: OSXUniversal
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
Standalone: Win
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
Standalone: Win64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
WebGL: WebGL
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
WeixinMiniGame: WeixinMiniGame
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
20
Runtime/Plugins/LuaAdaptor/lua_adaptor_comm.c
Normal file
20
Runtime/Plugins/LuaAdaptor/lua_adaptor_comm.c
Normal file
@ -0,0 +1,20 @@
|
||||
#include "lua_adaptor_import.h"
|
||||
|
||||
lua_Debug* lua_newdebugar() { return malloc(sizeof(lua_Debug)); }
|
||||
void lua_deletedebugar(lua_Debug* ar) { return free(ar); }
|
||||
|
||||
const char* lua_Debug_getname(lua_Debug* ar) { return ar->name; }
|
||||
char* lua_Debug_getshortsrc(lua_Debug* ar) { return ar->short_src; }
|
||||
int lua_Debug_getevent(lua_Debug* ar) { return ar->event; }
|
||||
int lua_Debug_getlinedefined(lua_Debug* ar) { return ar->linedefined; }
|
||||
int lua_Debug_getlastlinedefined(lua_Debug* ar) { return ar->lastlinedefined; }
|
||||
|
||||
int lua_get_registry_index() { return LUA_REGISTRYINDEX; }
|
||||
double lua_todouble(lua_State *L, int idx) { return (double)lua_tonumber(L, idx); }
|
||||
|
||||
|
||||
lua_State* lua_State_getmainthread(lua_State* L) { return G(L)->mainthread; }
|
||||
|
||||
void (lua_do_sethook) (lua_State *L, lua_Hook func, int mask, int count) {
|
||||
lua_sethook(L, func, mask, count);
|
||||
}
|
||||
74
Runtime/Plugins/LuaAdaptor/lua_adaptor_comm.c.meta
Normal file
74
Runtime/Plugins/LuaAdaptor/lua_adaptor_comm.c.meta
Normal file
@ -0,0 +1,74 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2c61fe7994a261a48a95348a09bd839a
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 1
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
: Any
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
Exclude Editor: 1
|
||||
Exclude Linux64: 1
|
||||
Exclude OSXUniversal: 1
|
||||
Exclude WebGL: 1
|
||||
Exclude Win: 1
|
||||
Exclude Win64: 1
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
DefaultValueInitialized: true
|
||||
OS: AnyOS
|
||||
- first:
|
||||
Standalone: Linux64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
Standalone: OSXUniversal
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
Standalone: Win
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
Standalone: Win64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
WebGL: WebGL
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
WeixinMiniGame: WeixinMiniGame
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
33
Runtime/Plugins/LuaAdaptor/lua_adaptor_import.h
Normal file
33
Runtime/Plugins/LuaAdaptor/lua_adaptor_import.h
Normal file
@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
|
||||
#include "stdint.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
/* value at a non-valid index */
|
||||
#define NONVALIDVALUE NULL//cast(TValue *, luaO_nilobject)
|
||||
|
||||
/* test for pseudo index */
|
||||
#define ispseudo(i) ((i) <= LUA_REGISTRYINDEX)
|
||||
|
||||
#if LOCAL_DEBUG_USE_LUA_VERSION == 503
|
||||
#include "lua53/lua.h"
|
||||
#include "lua53/lobject.h"
|
||||
#include "lua53/lstate.h"
|
||||
#include "lua53/lfunc.h"
|
||||
#include "lua53/lapi.h"
|
||||
#include "lua53/lstring.h"
|
||||
#include "lua53/ltable.h"
|
||||
#include "lua53/lauxlib.h"
|
||||
#elif LOCAL_DEBUG_USE_LUA_VERSION == 501
|
||||
#include "lua51/lua.h"
|
||||
#include "lua51/lobject.h"
|
||||
#include "lua51/lstate.h"
|
||||
#include "lua51/lfunc.h"
|
||||
#include "lua51/lapi.h"
|
||||
#include "lua51/lstring.h"
|
||||
#include "lua51/ltable.h"
|
||||
#include "lua51/lauxlib.h"
|
||||
#elif __EMSCRIPTEN__
|
||||
//EMSCRIPTEN_ENV_LUA_IMPORT_LOGIC_START
|
||||
//EMSCRIPTEN_ENV_LUA_IMPORT_LOGIC_END
|
||||
#endif
|
||||
74
Runtime/Plugins/LuaAdaptor/lua_adaptor_import.h.meta
Normal file
74
Runtime/Plugins/LuaAdaptor/lua_adaptor_import.h.meta
Normal file
@ -0,0 +1,74 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 169ebbbcd2d6ffd4180f421d0ae2bd33
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 1
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
: Any
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
Exclude Editor: 1
|
||||
Exclude Linux64: 1
|
||||
Exclude OSXUniversal: 1
|
||||
Exclude WebGL: 1
|
||||
Exclude Win: 1
|
||||
Exclude Win64: 1
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
DefaultValueInitialized: true
|
||||
OS: AnyOS
|
||||
- first:
|
||||
Standalone: Linux64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
Standalone: OSXUniversal
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
Standalone: Win
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
Standalone: Win64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
WebGL: WebGL
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
WeixinMiniGame: WeixinMiniGame
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -81,5 +81,26 @@ mergeInto(LibraryManager.library, {
|
||||
const content = UTF8ToString(dataPtr);
|
||||
GameGlobal.manager.profiler.uploadStringWithDir({'str': content, 'len': bufSize, 'fileName': name, 'uploadDir': dir, 'cb': _JSProfilerUploadStringWithDirCallback});
|
||||
//}
|
||||
},
|
||||
|
||||
JSExportFromIDBFS: function(idbfsPath, targetPath, snapshotFileName, frameIdx) {
|
||||
const idbfsPathStr = UTF8ToString(idbfsPath);
|
||||
const targetPathStr = UTF8ToString(targetPath);
|
||||
const fileName = UTF8ToString(snapshotFileName);
|
||||
GameGlobal.manager.profiler.uploadSnapshotBuffer({
|
||||
'fileName': fileName,
|
||||
'uploadSnapshotPath': targetPathStr,
|
||||
'frameIdx': frameIdx,
|
||||
'idbfsPathStr': idbfsPathStr,
|
||||
'targetPathStr': targetPathStr
|
||||
})
|
||||
},
|
||||
|
||||
JSGetConvertPluginVersion: function() {
|
||||
var lengthBytes = lengthBytesUTF8(GameGlobal.unityNamespace.convertPluginVersion) + 1;
|
||||
var stringOnWasmHeap = _malloc(lengthBytes);
|
||||
stringToUTF8(GameGlobal.unityNamespace.convertPluginVersion, stringOnWasmHeap, lengthBytes);
|
||||
|
||||
return stringOnWasmHeap;
|
||||
}
|
||||
});
|
||||
|
||||
Binary file not shown.
@ -64,6 +64,11 @@ PluginImporter:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
WeixinMiniGame: WeixinMiniGame
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Windows Store Apps: WindowsStoreApps
|
||||
second:
|
||||
|
||||
@ -14,5 +14,27 @@
|
||||
If the provided annotation string is null or empty, an error message will be logged.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:WXSDKPerf.WXPerfEngine_Implementation.DeclareCustomStatInfo(System.String,System.String,System.Int32)">
|
||||
<summary>
|
||||
声明自定义性能指标
|
||||
</summary>
|
||||
<param name="inStatName">性能指标名称</param>
|
||||
<param name="inStatCategory">性能指标类别</param>
|
||||
<param name="inStatInterpType">性能指标展示方式,0. 不插值. 1. 线性插值;2. Step插值;</param>
|
||||
</member>
|
||||
<member name="M:WXSDKPerf.WXPerfEngine_Implementation.SetCustomStatInfo(System.String,System.Single)">
|
||||
<summary>
|
||||
设置自定义性能值,目前只支持浮点数
|
||||
</summary>
|
||||
<param name="inStatName">性能指标名称</param>
|
||||
<param name="inValue">性能指标数值</param>
|
||||
</member>
|
||||
<member name="M:WXSDKPerf.WXPerfEngine_Implementation.SetLuaState(System.IntPtr)">
|
||||
<summary>
|
||||
指定luaState
|
||||
</summary>
|
||||
<param name="L">luaState</param>
|
||||
</member>
|
||||
<!-- Badly formed XML comment ignored for member "M:WXSDKPerf.WXPerfEngine_Implementation.AddCustomStatInfoBy(System.String,System.Single)" -->
|
||||
</members>
|
||||
</doc>
|
||||
|
||||
Binary file not shown.
@ -3124,6 +3124,26 @@
|
||||
接口调用成功的回调函数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ReserveChannelsLiveOption.noticeId">
|
||||
<summary>
|
||||
预告 id,通过 getChannelsLiveNoticeInfo 接口获取
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WeChatWASM.ReserveChannelsLiveOption.complete">
|
||||
<summary>
|
||||
接口调用结束的回调函数(调用成功、失败都会执行)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WeChatWASM.ReserveChannelsLiveOption.fail">
|
||||
<summary>
|
||||
接口调用失败的回调函数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WeChatWASM.ReserveChannelsLiveOption.success">
|
||||
<summary>
|
||||
接口调用成功的回调函数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.AccountInfo.miniProgram">
|
||||
<summary>
|
||||
小程序账号信息
|
||||
@ -8591,11 +8611,6 @@
|
||||
接口调用成功的回调函数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ReserveChannelsLiveOption.noticeId">
|
||||
<summary>
|
||||
预告 id,通过 getChannelsLiveNoticeInfo 接口获取
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WeChatWASM.RestartMiniProgramOption.complete">
|
||||
<summary>
|
||||
接口调用结束的回调函数(调用成功、失败都会执行)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 42748afd17a25bd01293d72e12c6e260
|
||||
guid: d697012f4cebfabc8cfa75c1c22623bb
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
Binary file not shown.
@ -3130,6 +3130,26 @@
|
||||
接口调用成功的回调函数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ReserveChannelsLiveOption.noticeId">
|
||||
<summary>
|
||||
预告 id,通过 getChannelsLiveNoticeInfo 接口获取
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WeChatWASM.ReserveChannelsLiveOption.complete">
|
||||
<summary>
|
||||
接口调用结束的回调函数(调用成功、失败都会执行)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WeChatWASM.ReserveChannelsLiveOption.fail">
|
||||
<summary>
|
||||
接口调用失败的回调函数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WeChatWASM.ReserveChannelsLiveOption.success">
|
||||
<summary>
|
||||
接口调用成功的回调函数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.AccountInfo.miniProgram">
|
||||
<summary>
|
||||
小程序账号信息
|
||||
@ -8597,11 +8617,6 @@
|
||||
接口调用成功的回调函数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ReserveChannelsLiveOption.noticeId">
|
||||
<summary>
|
||||
预告 id,通过 getChannelsLiveNoticeInfo 接口获取
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WeChatWASM.RestartMiniProgramOption.complete">
|
||||
<summary>
|
||||
接口调用结束的回调函数(调用成功、失败都会执行)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a522849090d5944d8beec2e651edb09e
|
||||
guid: 98dd7ffd6b23011780e5c299151ca915
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
Binary file not shown.
@ -16,12 +16,21 @@ PluginImporter:
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
Exclude Android: 1
|
||||
Exclude Editor: 1
|
||||
Exclude Linux64: 1
|
||||
Exclude OSXUniversal: 1
|
||||
Exclude WebGL: 1
|
||||
Exclude Win: 1
|
||||
Exclude Win64: 1
|
||||
Exclude WindowsStoreApps: 1
|
||||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
AndroidSharedLibraryType: Executable
|
||||
CPU: ARMv7
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
@ -69,6 +78,16 @@ PluginImporter:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Windows Store Apps: WindowsStoreApps
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
DontProcess: false
|
||||
PlaceholderPath:
|
||||
SDK: AnySDK
|
||||
ScriptingBackend: AnyScriptingBackend
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
||||
Binary file not shown.
@ -2639,16 +2639,6 @@ namespace WeChatWASM
|
||||
WXSDKManagerHandler.Instance.RequestPointerLock();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.reserveChannelsLive(Object object)](https://developers.weixin.qq.com/minigame/dev/api/open-api/channels/wx.reserveChannelsLive.html)
|
||||
/// 需要基础库: `2.19.0`
|
||||
/// 预约视频号直播
|
||||
/// </summary>
|
||||
public static void ReserveChannelsLive(ReserveChannelsLiveOption option)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.ReserveChannelsLive(option);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.revokeBufferURL(string url)](https://developers.weixin.qq.com/minigame/dev/api/storage/wx.revokeBufferURL.html)
|
||||
/// 需要基础库: `2.14.0`
|
||||
@ -3283,6 +3273,10 @@ namespace WeChatWASM
|
||||
WXSDKManagerHandler.Instance.OnShareMessageToFriend(result);
|
||||
}
|
||||
|
||||
public static void OffShareMessageToFriend(Action<OnShareMessageToFriendListenerResult> result)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.OffShareMessageToFriend(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.onShow(function listener)](https://developers.weixin.qq.com/minigame/dev/api/base/app/life-cycle/wx.onShow.html)
|
||||
|
||||
@ -1106,6 +1106,17 @@ namespace WeChatWASM
|
||||
{
|
||||
return WXSDKManagerHandler.CallJSFunctionWithReturn(sdkName, functionName, args);
|
||||
}
|
||||
|
||||
// TODO: 声明错误临时处理
|
||||
/// <summary>
|
||||
/// [wx.reserveChannelsLive(Object object)](https://developers.weixin.qq.com/minigame/dev/api/open-api/channels/wx.reserveChannelsLive.html)
|
||||
/// 需要基础库: `2.19.0`
|
||||
/// 预约视频号直播
|
||||
/// </summary>
|
||||
public static void ReserveChannelsLive(ReserveChannelsLiveOption option)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.ReserveChannelsLive(option);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -264,9 +264,9 @@ public class WXProfileStatsScript : MonoBehaviour, WeChatWASM.WXSDKManagerHandle
|
||||
m_fpsCount++;
|
||||
m_fpsDeltaTime += Time.deltaTime;
|
||||
|
||||
if (m_fpsCount % 60 == 0)
|
||||
if (m_fpsCount % 60 == 0 && m_fpsDeltaTime != 0.0f)
|
||||
{
|
||||
m_fpsCount = 1;
|
||||
m_fpsCount = 0;
|
||||
fps = (int)Mathf.Ceil(60.0f / m_fpsDeltaTime);
|
||||
m_fpsDeltaTime = 0;
|
||||
}
|
||||
|
||||
@ -69,6 +69,11 @@ namespace WeChatWASM
|
||||
#else
|
||||
WXRuntimeExtEnvDef.SETDEF("UNITY_2022", false);
|
||||
#endif
|
||||
#if UNITY_6000
|
||||
WXRuntimeExtEnvDef.SETDEF("UNITY_6000", true);
|
||||
#else
|
||||
WXRuntimeExtEnvDef.SETDEF("UNITY_6000", false);
|
||||
#endif
|
||||
#if UNITY_2022_2_OR_NEWER
|
||||
WXRuntimeExtEnvDef.SETDEF("UNITY_2022_2_OR_NEWER", true);
|
||||
#else
|
||||
@ -89,6 +94,11 @@ namespace WeChatWASM
|
||||
#else
|
||||
WXRuntimeExtEnvDef.SETDEF("TUANJIE_2022_3_OR_NEWER", false);
|
||||
#endif
|
||||
#if UNITY_6000_0_OR_NEWER
|
||||
WXRuntimeExtEnvDef.SETDEF("UNITY_6000_0_OR_NEWER", true);
|
||||
#else
|
||||
WXRuntimeExtEnvDef.SETDEF("UNITY_6000_0_OR_NEWER", false);
|
||||
#endif
|
||||
|
||||
#if PLATFORM_WEIXINMINIGAME
|
||||
WXRuntimeExtEnvDef.SETDEF("PLATFORM_WEIXINMINIGAME", true);
|
||||
|
||||
@ -6,6 +6,8 @@ using System.Runtime.InteropServices;
|
||||
using System.Xml;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Scripting;
|
||||
using System.IO;
|
||||
|
||||
|
||||
#if PLATFORM_WEIXINMINIGAME || PLATFORM_WEBGL || UNITY_EDITOR
|
||||
|
||||
@ -17,8 +19,10 @@ namespace WXSDKPerf
|
||||
[ComVisible(false)]
|
||||
public class WXPerfEngine
|
||||
{
|
||||
#if !UNITY_EDITOR
|
||||
static WXPerfEngine_Implementation m_PerfEngineImplementation = null;
|
||||
|
||||
#endif
|
||||
|
||||
[RuntimeInitializeOnLoadMethod]
|
||||
public static void StartWXPerfEngine()
|
||||
{
|
||||
@ -30,7 +34,14 @@ namespace WXSDKPerf
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to add an annotation to the performance data.
|
||||
/// The annotation string is uploaded to the server along with the current frame ID.
|
||||
/// </summary>
|
||||
/// <param name="InAnnotationString">The annotation string to be added. It should not be null or empty.</param>
|
||||
/// <remarks>
|
||||
/// If the provided annotation string is null or empty, an error message will be logged.
|
||||
/// </remarks>
|
||||
public static void Annotation(string InAnnotationString)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
@ -42,11 +53,177 @@ namespace WXSDKPerf
|
||||
return;
|
||||
}
|
||||
|
||||
if (InAnnotationString.Contains("CaptureUnityMemorySnapshot"))
|
||||
{
|
||||
TakeAndUploadUnityMemorySnapshot();
|
||||
}
|
||||
|
||||
m_PerfEngineImplementation.Annotation(InAnnotationString);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 检查是否正在录制性能数据
|
||||
/// </summary>
|
||||
/// <returns>如果正在录制返回true,否则返回false</returns>
|
||||
public static bool IsRecording()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
return false;
|
||||
#else
|
||||
return m_PerfEngineImplementation != null && m_PerfEngineImplementation.IsRecording();
|
||||
#endif
|
||||
}
|
||||
|
||||
private static void TakeAndUploadUnityMemorySnapshot()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
return;
|
||||
#else
|
||||
DateTime timestamp = DateTime.Now;
|
||||
var dateString = timestamp.ToLocalTime().ToString("yyyy-MM-dd_HH-mm-ss", System.Globalization.CultureInfo.InvariantCulture);
|
||||
var snapshotFileName = $"{dateString}.snap";
|
||||
|
||||
#if UNITY_2018_3_OR_NEWER && !UNITY_2022_2_OR_NEWER
|
||||
UnityEngine.Profiling.Memory.Experimental.MemoryProfiler.TakeSnapshot(Path.Combine(Application.persistentDataPath, snapshotFileName),
|
||||
WXPerfEngine_Implementation.CaptureSnapshotCallback, (UnityEngine.Profiling.Memory.Experimental.CaptureFlags)31);
|
||||
|
||||
#elif UNITY_2022_2_OR_NEWER
|
||||
Unity.Profiling.Memory.MemoryProfiler.TakeSnapshot(Path.Combine(Application.persistentDataPath, snapshotFileName),
|
||||
WXPerfEngine_Implementation.CaptureSnapshotCallback, (Unity.Profiling.Memory.CaptureFlags)31);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 指定luaState
|
||||
/// </summary>
|
||||
/// <param name="L">luaState</param>
|
||||
public static void SetLuaState(IntPtr L)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
return;
|
||||
#else
|
||||
if (m_PerfEngineImplementation == null)
|
||||
{
|
||||
UnityEngine.Debug.LogError("SetLuaState: WXPerfEngine Not Started yet! Please Call WXSDKPerf.StartWXPerfEngine first! ");
|
||||
return;
|
||||
}
|
||||
|
||||
m_PerfEngineImplementation.SetLuaState(L);
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 声明自定义性能指标
|
||||
/// </summary>
|
||||
/// <param name="inStatName">性能指标名称</param>
|
||||
/// <param name="inStatCategory">性能指标类别</param>
|
||||
/// <param name="inStatInterpType">性能指标展示方式,0. 不插值. 1. 线性插值;2. Step插值;</param>
|
||||
public static void DeclareCustomStatInfo(string inStatName, string inStatCategory, int inStatInterpType = 1)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
return;
|
||||
#else
|
||||
if (m_PerfEngineImplementation == null)
|
||||
{
|
||||
UnityEngine.Debug.LogError("DeclareCustomStatInfo: Invalid m_PerfEngineImplementation! ");
|
||||
return;
|
||||
}
|
||||
|
||||
m_PerfEngineImplementation.DeclareCustomStatInfo(inStatName, inStatCategory, inStatInterpType);
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置自定义性能指标,目前只支持浮点数
|
||||
/// 若该指标未通过DeclareCustomStatInfo进行类别的声明,则将被归为默认自定义类别,以及使用默认线性插值
|
||||
/// </summary>
|
||||
/// <param name="inStatName">性能指标名称</param>
|
||||
/// <param name="inValue">性能指标数值</param>
|
||||
public static void SetCustomStatValue(string inStatName, float inValue)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
return;
|
||||
#else
|
||||
if (m_PerfEngineImplementation == null)
|
||||
{
|
||||
UnityEngine.Debug.LogError("SetCustomStatInfo: Invalid m_PerfEngineImplementation! ");
|
||||
return;
|
||||
}
|
||||
|
||||
m_PerfEngineImplementation.SetCustomStatInfo(inStatName, inValue);
|
||||
#endif
|
||||
}
|
||||
|
||||
/// 在自定义性能指标值的基础上增加一段数值。
|
||||
/// 如果未进行指标声明,将自动声明该指标,该指标将出现在报告的“Project Default Stat Category”中
|
||||
/// </summary>
|
||||
/// <param name="inStatName">性能指标名称</param>
|
||||
/// <param name="inValue">性能指标数值</param>
|
||||
public static void AddCustomStatInfoBy(string inStatName, float inValue)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
return;
|
||||
#else
|
||||
if (m_PerfEngineImplementation == null)
|
||||
{
|
||||
UnityEngine.Debug.LogError("AddCustomStatInfoBy: Invalid m_PerfEngineImplementation! ");
|
||||
return;
|
||||
}
|
||||
|
||||
m_PerfEngineImplementation.AddCustomStatInfoBy(inStatName, inValue);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 手动开始记录
|
||||
/// </summary>
|
||||
/// <param name="inEnableStackTrace">是否启用堆栈跟踪</param>
|
||||
/// <param name="inEnableStatInfo">是否启用统计信息</param>
|
||||
/// <param name="inFrequentScreenShot">是否频繁截图</param>
|
||||
/// <param name="inEnablebRenderInst">是否记录渲染指令</param>
|
||||
/// <param name="inEnableCaptureResource">是否启用资源捕获</param>
|
||||
/// <param name="inEnableLuaMemoryMonitor">是否启用Lua内存监控</param>
|
||||
/// <param name="inEnableLuaFunctionMemoryTracking">是否启用Lua函数内存跟踪</param>
|
||||
public static void StartRecordManually(bool inEnableStackTrace, bool inEnableStatInfo, bool inFrequentScreenShot, bool inEnablebRenderInst,
|
||||
bool inEnableCaptureResource, bool inEnableLuaMemoryMonitor, bool inEnableLuaFunctionMemoryTracking)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
return;
|
||||
#else
|
||||
if (m_PerfEngineImplementation == null)
|
||||
{
|
||||
UnityEngine.Debug.LogError("StartRecordManually: Invalid m_PerfEngineImplementation! ");
|
||||
return;
|
||||
}
|
||||
|
||||
m_PerfEngineImplementation.StartRecordManually(inEnableStackTrace, inEnableStatInfo, inFrequentScreenShot, inEnablebRenderInst,
|
||||
inEnableCaptureResource, inEnableLuaMemoryMonitor, inEnableLuaFunctionMemoryTracking);
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 手动停止记录
|
||||
/// </summary>
|
||||
public static void StopRecordManually()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
return;
|
||||
#else
|
||||
if (m_PerfEngineImplementation == null)
|
||||
{
|
||||
UnityEngine.Debug.LogError("StartRecordManually: Invalid m_PerfEngineImplementation! ");
|
||||
return;
|
||||
}
|
||||
|
||||
m_PerfEngineImplementation.StopRecordManually();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@ -38,15 +38,13 @@ public class WXTouchInputOverride : BaseInput
|
||||
{
|
||||
base.OnEnable();
|
||||
#if UNITY_WEBGL && !UNITY_EDITOR
|
||||
if (string.IsNullOrEmpty(WeChatWASM.WX.GetDeviceInfo().platform)) return;
|
||||
#else
|
||||
return;
|
||||
#endif
|
||||
if (string.IsNullOrEmpty(WeChatWASM.WX.GetSystemInfoSync().platform)) return;
|
||||
InitWechatTouchEvents();
|
||||
if (_standaloneInputModule)
|
||||
{
|
||||
_standaloneInputModule.inputOverride = this;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
protected override void OnDisable()
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: be0270bfd43f029ae106de33854e607f
|
||||
guid: f1f7222e307eb06475bfabdbf621af11
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6d9a69df26b7bc6611510bea5fb68735
|
||||
guid: 9c2835eb454d7332ba06acbdb09e7e4f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ad7c292e283869aad57b11778a395cf9
|
||||
guid: c12ec2802efc59b39386ed1c46cf99d7
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d0a189da6dad059eb5bdff046c501973
|
||||
guid: c07055c388c882d43ae8cfed7e74c32f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
],
|
||||
"plugins": {
|
||||
"UnityPlugin": {
|
||||
"version": "1.2.62",
|
||||
"version": "1.2.65",
|
||||
"provider": "wxe5a48f1ed5f544b7",
|
||||
"contexts": [
|
||||
{
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b42b83d3556956b0cc29cb30d6af3007
|
||||
guid: a34a85564b3af6ab257c82207538f0d6
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c5e5c22da111d0ebcfb60a9eee74cdc4
|
||||
guid: b563cfa417bcd27fc643a48f2adf418a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ea12ca1c595c9f25201add831c9f40d7
|
||||
guid: fa738db20e2524709c51e910ac22f044
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d01bd3cd68d8bb6ea9c931b143bb8192
|
||||
guid: f4ae54cdff3da748114fa0222eadb834
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a946c3b701886feb67650e9fc1c5179b
|
||||
guid: a4a2ffa37e51c73eb63e5472e6e545af
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 04b2c98757ee8f53f1711561c0332ea5
|
||||
guid: 2092f95fe5b89f8dfaa5325ec4433f2d
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 085c54a6e19e1e6714769b8ca4d59594
|
||||
guid: baef6b04040837c8100f80e4e9c607f0
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 64974041b6b9394168ca6447c1b4e395
|
||||
guid: 93cfe65ed515324323838cbea288485f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 438e900b8d5aa22c6ea822001ae153b7
|
||||
guid: f78b88b5ed38c780dc59974b6f1f9555
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0e5e8578d91966f1090729aebde9fd2e
|
||||
guid: f4505f6902a7db4f734e6bfa51950014
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4f19ab6459b9d961cf0c8e2b57c11fbe
|
||||
guid: 076633434ca2a2cdfcfaacf233130d52
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 199d4158a7ee9a4fd5ea09f3ef394bf6
|
||||
guid: 08e9da464f1908e43e8569a8046e26b1
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ccf17c2fa09f2ba8516bf4e3bbfc10ac
|
||||
guid: b5c6c22af9585f5c1c5ab33efbc45014
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ca837f27096af7671567d6fabd4d67ba
|
||||
guid: 62408429e650da567ca3d78a4f06dfc0
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a051664e041711cd5646c38378b06d25
|
||||
guid: f343922671a0ccdb2a6d5302bfc4cf14
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f7f150b597814cfd610d5b59d2278705
|
||||
guid: f134fcc0e857c2e4dfb4544f59074245
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b91c447dd5e35111ac03b6c2a0385492
|
||||
guid: 92abfcf286bebd25d2b5bdd762905d14
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b4bd31f18fb3ee1c8033e691b2bbea8d
|
||||
guid: 51fe5680a1214e68bcf28c2798e1681a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7d8839d4d83dfff111aec3e9dc85d0c8
|
||||
guid: 89f5930eb4c8f068d1fcb9bd5079d1f2
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8d521902dd851be1d4e3ed52124db2bf
|
||||
guid: 13f29f03fa8aa8111517d70d74c58b0f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4d5e78f4eca41760143c72c7b458d033
|
||||
guid: a2b19b0fc9378a674a5d2ac691ff2f89
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1fb83c91e4aee7446eb5b0edea5e82e1
|
||||
guid: 47f3b7cdccb3dde5c92b45250b647858
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e35fd26a31cbed060dd3d750f9d72695
|
||||
guid: a62b99ab8165416ca20168ea29b4a952
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9da547bc01a6a2acb8c17f2f20e19029
|
||||
guid: b0a53dabaa5a74a38209aea69eb2dc33
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a2b72c0f351df2683daebe5dddfc8a70
|
||||
guid: 413118a5cf3f1b34c76955684798db9a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2448ddf5c4495366fcaeee98719a09b5
|
||||
guid: 4bb5db37aefba56d7f0a1e749835cb33
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 798896c13156b85bc6f15aad33a8d4ee
|
||||
guid: 1e2ba00d9293c82aff05afd9fe16c5c4
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e02ee6ed86c74a47a7d6456235a5087c
|
||||
guid: 1fd7ec81070198e1e409fc3c03b30077
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f9f325f65aa817981c3fbabf3909db18
|
||||
guid: da894aa1837639b04bf0032b195eb8ec
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8525735d9f92ee18a7d9dbd978ffa223
|
||||
guid: f8c87b7e8c05a6d4f843ea84575fd490
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e344baa314144d93cf52ad2d6767b592
|
||||
guid: 0cbec52214fd96a6c633162b314e8ed6
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3a1e8f042c85a5effb843571990d1035
|
||||
guid: 70142c02e9f9059e18cc3bb7e8c2be34
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 18084fa3a87ec01eba1f7ec23e6ffcc9
|
||||
guid: 3a446f2a72bcbb53cd0cd2aa6b6c5815
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c259cfaf1015ce5ed277a61b4790372d
|
||||
guid: 2c11febf7150d908a418ba26308ce0a3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b253bb5c7bccf899b26fc1b481bb7249
|
||||
guid: 309d585c1352c5439f9517228624fa97
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1f0b0ff6d819144690eaa93d2b15a036
|
||||
guid: 278a12d3f17b5dcf632dfb525790e244
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d5650eb26db749e2b36141b276fe569a
|
||||
guid: bbb1f9b179e8b57a3f173c5deacb7356
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 208eb092fd6fdde24be8b793be2aff39
|
||||
guid: bd93fe376eb03d05595f222454598bcd
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9ae22c78b9bd3d5388d9b940bd6f32b0
|
||||
guid: 46a37b814ee117175a7b4938144376f3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 65e604051ef70382531fcac12de59a92
|
||||
guid: fc4333fef5f8eb7a42bff408cbe23d47
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5c9b6da8d5d2b39e78653d0c16fdb3fe
|
||||
guid: b87e20b60a9a1a899409ad14deee1062
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 26bb277e81e1f464992b5bbffffb36a2
|
||||
guid: e71fdd9f7be976cef14b35ff69e075a9
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 31f791cce9ea86bc2267f8078e507bd3
|
||||
guid: ea336201a90a51a5e448c80afeec8ace
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ca3c03c527ec5f3db513ce9fbf6d9bd9
|
||||
guid: 3f219e0e941ed5b91003ee39f9931132
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7e3477ce55f6f7e32310c0c89e044974
|
||||
guid: d2c1173ce8b78eace196e6752f894075
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bb9176a84ee722dfb3b610fbb99b9223
|
||||
guid: a2b760f51521561fc2fa509f986792a0
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cc982427b49d3fae8227902898b8ed48
|
||||
guid: 2a86751122ffc632613edafd3f72ac68
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d9707be05f61ec8fca45b38ef3ea01ca
|
||||
guid: baba4f9aa47f8cf8d05c7d8561fe5788
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 888fa9472eb38c3f0744d50e00bdcf2e
|
||||
guid: 66e1fcbf07a614f831b701c14491075a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7a281fa0f5db8b4f54d9d4b2cc29b0be
|
||||
guid: 8fd12d2666524192674d46e491c75d1a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3dc8adaae9e3aa5928dec007fa5f4668
|
||||
guid: 625114e7cf70e73acc8ebdbd6f278ce6
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b588ff43dce224ba64950532f6b5d373
|
||||
guid: bdbc363dbefb659df19732ebf71d2f94
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -408,7 +408,9 @@ export default {
|
||||
},
|
||||
WX_FileSystemManagerReadSync(option, callbackId) {
|
||||
const fs = wx.getFileSystemManager();
|
||||
const res = fs.readSync(formatJsonStr(option));
|
||||
const optionConfig = formatJsonStr(option);
|
||||
optionConfig.arrayBuffer = new ArrayBuffer(optionConfig.arrayBuffer.length);
|
||||
const res = fs.readSync(optionConfig);
|
||||
cacheArrayBuffer(callbackId, res.arrayBuffer);
|
||||
return JSON.stringify({
|
||||
bytesRead: res.bytesRead,
|
||||
@ -438,16 +440,12 @@ export default {
|
||||
const optionConfig = formatJsonStr(option);
|
||||
optionConfig.data = data.buffer;
|
||||
const res = fs.writeSync(optionConfig);
|
||||
return JSON.stringify({
|
||||
mode: res.bytesWritten,
|
||||
});
|
||||
return JSON.stringify(res);
|
||||
},
|
||||
WX_FileSystemManagerWriteStringSync(option) {
|
||||
const fs = wx.getFileSystemManager();
|
||||
const res = fs.writeSync(formatJsonStr(option));
|
||||
return JSON.stringify({
|
||||
mode: res.bytesWritten,
|
||||
});
|
||||
return JSON.stringify(res);
|
||||
},
|
||||
WX_FileSystemManagerOpenSync(option) {
|
||||
const fs = wx.getFileSystemManager();
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ea1099cd0add8224798e924d59c4cff0
|
||||
guid: fd99ed3a1e04b42f2ddce04c1e3bb446
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 888642ec12b7242b71b8f7f6a4240670
|
||||
guid: 2242564fb5f83220d4743bad3e5a61cb
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f5fa9ea295dcc11874ef073aaab524d5
|
||||
guid: 1a05ceba0a8ded95e7c673fd46f67543
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 68fc28908be51853c07a1a296348f57f
|
||||
guid: da2b7789e2e3a713573a2dd18fd552e3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 823067e86c7bae8511efaa858181e43d
|
||||
guid: b54a8568e4e0f6011cc5a6e110c0f8b8
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7df2634c2804b6e0dc37d216d49b9bf0
|
||||
guid: 1986225975efaf2e93a85f0aea78b98e
|
||||
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