Auto-publish pre-release WXSDK.

This commit is contained in:
nebulaliu 2025-08-22 15:20:42 +08:00
parent 819be01293
commit 45224f96d4
183 changed files with 491 additions and 208 deletions

View File

@ -1,8 +1,8 @@
fileFormatVersion: 2
guid: DytLvSj8UC9CKob0XUy9Y3usKDmX8US1YgxYmBxa1iAZ/I8JbM5wZwE=
guid: cccbd1d680cfe34fa1fef9e4875e5a12
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
assetBundleVariant:

View File

@ -1,8 +1,8 @@
fileFormatVersion: 2
guid: XSwesi78AS28ymfR2HEhHpEBAC2DHupI1hIKP7HApjHRaZgGw+DTwWI=
guid: cccbd1d680cfe34fa1fef9e3375e5a12
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
assetBundleVariant:

View File

@ -2,26 +2,21 @@ mergeInto(LibraryManager.library, {
// 定义供 C/C++ 调用的 JS 函数
js_batchRender_malloc: function(data, size, isSync) {
// 直接从 WASM 内存创建视图(零拷贝)
const binaryData = new Uint8Array(Module.HEAPU8.buffer, data, size);
// 转换为标准 ArrayBuffer如果需要复制
const targetBuffer =
binaryData.buffer.slice(binaryData.byteOffset, binaryData.byteOffset + binaryData.byteLength);
const targetBuffer = new Uint8Array(Module.HEAPU8.buffer, data, size);
//console.log("processBinaryData invoke");
const extBuffer = new ArrayBuffer(1);
const headerBuffer = new ArrayBuffer(8);
const headerBufferView = new DataView(headerBuffer);
headerBufferView.setUint32(0, 0xDEC0DE, true);
headerBufferView.setUint32(4, mtl.ctx.__uid(), true);
const merged = new Uint8Array(headerBuffer.byteLength + targetBuffer.byteLength);
merged.set(new Uint8Array(headerBuffer), 0);
merged.set(new Uint8Array(targetBuffer), headerBuffer.byteLength);
const extBuffer = new ArrayBuffer(1);
if(!isSync){
mtl.batchRenderAsync(merged.buffer, extBuffer);
mtl.batchRenderAsync(targetBuffer, extBuffer);
return null;
}
const result = mtl.batchRender(merged.buffer, extBuffer).buffer;
if(result.byteLength == 0){
return null;;
const response = mtl.batchRender(targetBuffer, extBuffer);
if (!response) {
return null;
}
const result = response.buffer;
if(!result || result.byteLength == 0){
return null;
}
// 申请内存空间,后续在cpp wasm部分使用记得释放
const ptr = Module._malloc(result.byteLength);

View File

@ -107,6 +107,14 @@ namespace WeChatWASM
return config.CompileOptions.enableiOSMetal;
}
}
// 用于replaceRules判断是否需要注入相关的修改
public static bool UseEmscriptenGLX
{
get
{
return config.CompileOptions.enableEmscriptenGLX;
}
}
// public static void SetPlayableEnabled(bool enabled)
// {
// isPlayableBuild = enabled;
@ -126,6 +134,8 @@ namespace WeChatWASM
}
// iOS metal 的相关特性
ProcessWxiOSMetalBinaries();
// emscriptenglx的相关特性
ProcessWxEmscriptenGLXBinaries();
MakeEnvForLuaAdaptor();
// JSLib
SettingWXTextureMinJSLib();
@ -371,6 +381,59 @@ namespace WeChatWASM
AssetDatabase.Refresh();
}
private static void ProcessWxEmscriptenGLXBinaries()
{
string[] glLibs;
string DS = WXAssetsTextTools.DS;
if (UnityUtil.GetSDKMode() == UnityUtil.SDKMode.Package)
{
glLibs = new string[]
{
$"Packages{DS}com.qq.weixin.minigame{DS}Runtime{DS}Plugins{DS}libemscriptenglx.a",
$"Packages{DS}com.qq.weixin.minigame{DS}Runtime{DS}Plugins{DS}libemscriptenglx_2021.a",
};
}
else
{
string glLibRootDir = $"Assets{DS}WX-WASM-SDK-V2{DS}Runtime{DS}Plugins{DS}";
// 下方顺序不要变动
glLibs = new string[]
{
$"{glLibRootDir}libemscriptenglx.a",
$"{glLibRootDir}libemscriptenglx_2021.a",
};
}
{
// unity2022, tuanjie lib引入
bool showEnableGLX2022Plugin = config.CompileOptions.enableEmscriptenGLX && IsCompatibleWithUnity202203OrNewer();
var glx2022Importer = AssetImporter.GetAtPath(glLibs[0]) as PluginImporter;
#if PLATFORM_WEIXINMINIGAME
glx2022Importer.SetCompatibleWithPlatform(BuildTarget.WeixinMiniGame, showEnableGLX2022Plugin);
#else
glx2022Importer.SetCompatibleWithPlatform(BuildTarget.WebGL, showEnableGLX2022Plugin);
#endif
SetPluginCompatibilityByModifyingMetadataFile(glLibs[0], showEnableGLX2022Plugin);
}
{
// unity2021 lib引入
bool showEnableGLX2021Plugin = config.CompileOptions.enableEmscriptenGLX && IsCompatibleWithUnity202102To202203();
var glx2021Importer = AssetImporter.GetAtPath(glLibs[1]) as PluginImporter;
#if PLATFORM_WEIXINMINIGAME
glx2021Importer.SetCompatibleWithPlatform(BuildTarget.WeixinMiniGame, showEnableGLX2021Plugin);
#else
glx2021Importer.SetCompatibleWithPlatform(BuildTarget.WebGL, showEnableGLX2021Plugin);
#endif
SetPluginCompatibilityByModifyingMetadataFile(glLibs[1], showEnableGLX2021Plugin);
}
AssetDatabase.Refresh();
}
/**
* Lua Adaptor Settings.
*/
@ -1982,7 +2045,7 @@ namespace WeChatWASM
config.ProjectConf.bundleHashLength.ToString(),
bundlePathIdentifierStr,
excludeFileExtensionsStr,
config.CompileOptions.enableiOSMetal ? "5" : (config.CompileOptions.Webgl2 ? "2" : "1"),
config.CompileOptions.Webgl2 ? "2" : "1",
Application.unityVersion,
WXExtEnvDef.pluginVersion,
config.ProjectConf.dataFileSubPrefix,
@ -2031,7 +2094,9 @@ namespace WeChatWASM
config.ProjectConf.MemorySize.ToString(),
config.SDKOptions.disableMultiTouch ? "true" : "false",
// Perfstream暂时设为false
"false"
"false",
config.CompileOptions.enableEmscriptenGLX ? "true" : "false",
config.CompileOptions.enableiOSMetal ? "true" : "false"
});
List<Rule> replaceList = new List<Rule>(replaceArrayList);

View File

@ -185,6 +185,7 @@ namespace WeChatWASM
this.formCheckbox("profilingMemory", "Profiling Memory");
this.formCheckbox("webgl2", "WebGL2.0");
this.formCheckbox("iOSPerformancePlus", "iOSPerformancePlus(?)", "是否使用iOS高性能+渲染方案有助于提升渲染兼容性、降低WebContent进程内存");
this.formCheckbox("EmscriptenGLX", "EmscriptenGLX(?)", "是否使用EmscriptenGLX渲染方案");
// this.formCheckbox("iOSMetal", "iOSMetal(?)", "是否使用iOSMetal渲染方案需要开启iOS高性能+模式有助于提升运行性能降低iOS功耗");
this.formCheckbox("deleteStreamingAssets", "Clear Streaming Assets");
this.formCheckbox("cleanBuild", "Clean WebGL Build");
@ -449,6 +450,7 @@ namespace WeChatWASM
this.setData("webgl2", config.CompileOptions.Webgl2);
this.setData("iOSPerformancePlus", config.CompileOptions.enableIOSPerformancePlus);
this.setData("iOSMetal", config.CompileOptions.enableiOSMetal);
this.setData("EmscriptenGLX", config.CompileOptions.enableEmscriptenGLX);
this.setData("fbslim", config.CompileOptions.fbslim);
this.setData("useFriendRelation", config.SDKOptions.UseFriendRelation);
this.setData("useMiniGameChat", config.SDKOptions.UseMiniGameChat);
@ -528,6 +530,7 @@ namespace WeChatWASM
config.CompileOptions.Webgl2 = this.getDataCheckbox("webgl2");
config.CompileOptions.enableIOSPerformancePlus = this.getDataCheckbox("iOSPerformancePlus");
config.CompileOptions.enableiOSMetal = this.getDataCheckbox("iOSMetal");
config.CompileOptions.enableEmscriptenGLX = this.getDataCheckbox("EmscriptenGLX");
config.CompileOptions.fbslim = this.getDataCheckbox("fbslim");
config.SDKOptions.UseFriendRelation = this.getDataCheckbox("useFriendRelation");
config.SDKOptions.UseMiniGameChat = this.getDataCheckbox("useMiniGameChat");

View File

@ -129,6 +129,10 @@ namespace WeChatWASM
{
return WXConvertCore.UseiOSMetal;
});
WXExtEnvDef.RegisterAction("WXConvertCore.UseEmscriptenGLX", (args) =>
{
return WXConvertCore.UseEmscriptenGLX;
});
WXExtEnvDef.RegisterAction("UnityUtil.GetWxSDKRootPath", (args) =>
{
#if UNITY_2018

View File

@ -2,7 +2,7 @@ namespace WeChatWASM
{
public class WXPluginVersion
{
public static string pluginVersion = "202508210759"; // 这一行不要改他,导出的时候会自动替换
public static string pluginVersion = "202508220720"; // 这一行不要改他,导出的时候会自动替换
}
public class WXPluginConf

Binary file not shown.

View File

@ -653,6 +653,7 @@
是否使用iOS metal指令流
</summary>
</member>
<!-- Badly formed XML comment ignored for member "F:WeChatWASM.CompileOptions.enableEmscriptenGLX" -->
<member name="F:WeChatWASM.CompileOptions.brotliMT">
<summary>
是否使用brotli多线程压缩

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 155de0b98cf009e2c51d4102ae435b2d
guid: 425af858d7628c72c7eb08421a09238f
DefaultImporter:
externalObjects: {}
userData:

Binary file not shown.

View File

@ -0,0 +1,69 @@
fileFormatVersion: 2
guid: cccbd1d680cfe34fa1fef9e4875e5f23
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 0
Exclude Linux64: 0
Exclude OSXUniversal: 0
Exclude WeixinMiniGame: 0
Exclude Win: 0
Exclude Win64: 0
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: OSXUniversal
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: Win
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: Win64
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
WeixinMiniGame: WeixinMiniGame
second:
enabled: 1
settings: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,93 @@
fileFormatVersion: 2
guid: 89ccba97a8e2991dc502c741bc8cd6c6
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
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:
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: {}
- 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.

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 2530ba66c553e336ea3049ae569e60d8
guid: 1e1bccd9301d421638074582c6c5f2f3
DefaultImporter:
externalObjects: {}
userData:

Binary file not shown.

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 5b786370a2d2be4c5eaa025eaaa3a821
guid: ba72cce9cf252ea0ea1623b6c036e365
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 4ac7d76ae75350cf1895f553a560a847
guid: fff6b27d3aee7cb4f745fbb03ebe1b09
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: dbc93d5e6ce2e8fdf53585c3782335ce
guid: 82425a84d2c3fc3990fef564257e74bc
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 9ea9c6403a9ceb35828ac55731695190
guid: 3d16f61bb6e1a4953c7f10d6415dd2f4
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a64e978c58ce19337815f75beb3a8719
guid: 414b0cd7500fb50ff29f8987a9a9bbb9
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 4a9689372b9754c9dab23a3438b7851c
guid: a05f481b8c35b132e9c5af0e2b3fdaa0
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 83f0ce155f3cd075e333167306151b4d
guid: 5dfabbb69835c45e9432873f680aad97
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: b3b597348722e50c47bb4d0826b90aeb
guid: d606934fe944c3ad96681708206f7d51
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: e973d94e9730c8939cd272f06cee044a
guid: b877e37ae9453a3857e5c2eadf22a213
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 4925a8523ac6474ba17789c65e3701a7
guid: ad5100653808195b626a51618768a1eb
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 0bfedee4ba18119d7d73d2a5f55e5319
guid: b7fad14de0cd0ff9b2a1ffd268ea0d03
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a6a5df95984cf392a6ea784ddc759cb1
guid: 4e7177ef382f58a6eb79170b90dc3294
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: d9747f944de141d0eb7d7a172f58104d
guid: 0f4fdbe994d69fc19b2e97cafaf4a896
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 12473cbd89094efc6d008aab368ad1c4
guid: 409ac4aeeb4b55242167989397669221
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: dbb51137770b5765a5ac9c9057c185b8
guid: bc20784c794ed3a9a54956f5e5d6914d
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 77795ac6929483d37d4c85627d9df910
guid: c219c652f7d7d00943434045f98cd5ff
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: f4f2983bc3ebe3b30950a1a24242a82f
guid: 3c913505c4e199f6bda762eb803ce228
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: c09ab555613ee3766e6660d587855633
guid: 7af7efd52dc41451313ede2d4c2d9440
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 172486ee205e914dc9c8a4cf6507a803
guid: 585f12564607b86f7121b4c38e7d8c2f
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 84b65b1d8941a4110817040f9956f66a
guid: c276fef2af5608c8103cbf0f1eced2c0
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 680d12eff864ec116c8a04ad3b9e3f99
guid: 10b1f64567e2f24d40e22b6beee1df2e
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 30ba6804486a4bb598812a4e7f33b8d6
guid: 7a6d405c835ed1678cde9fde6e0af4c5
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 5a84015c9ee1faf9b7292f8c07d63484
guid: eb0c9ce95fff22e0848d5daab4ace640
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a0b62e230f2172e9d390414ab686f020
guid: 4fb7cddfd5afc4804d88ec7add421ed3
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 25680b2f1f07d614f9c9d2dfefe6b2c8
guid: b61d17a27c917ee0789a23f4bfedf6cf
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: e86671129e34500c8d6744370d4bd863
guid: 7f7020ec931cf98bd454346d6700326a
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 652d54280275bc00cae6641eb3028d09
guid: 46c95a1e776a91c541aacce458149b25
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 641d6b1c4d19dc2c19881bc7c4f4787b
guid: 0ea41b4745db09e68fa11973f0087871
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 82f0556ae5d5a17f9d107f53ff4facb2
guid: cba76e862c2db129145fc65ca02c6744
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 19cad8822562d5b66757d7646da40034
guid: 3e9f0e0d28ed780af5328c70ea9d4d0f
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 274e35e312039ea529c68c599ab36da0
guid: a3fd591ed2164bf63fdeccbe12b2e042
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 63702260ff4bd5431c7ff7a941d611d9
guid: 7aab82d34b0cca4c5dcea39b54ca9a72
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: e0eae49479659699923867791aac7f0b
guid: 9275089dd28b03aa80ad1a2370509c73
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 44a8260602f4e6d43c4275a546c9cda7
guid: aa34a9787ff25a57cc942b9f6c12b6e9
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: e917974a80af85d3de03ace0ece72e49
guid: eeb996b915f643ed94f9f601ef3a0c99
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: f86ee05ac361319b3c7fc84148731eef
guid: 9e36f3654e42b4e91cfa9903adf0e1d8
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: fe2106030a07a5fdf37308cea93f96d7
guid: ae80a9cd4c6028c347ce63404d2663a4
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 46d0ac5b87d4f511f4638002c9c39283
guid: 10a713bbce23661c1fcb0c3a1b22f174
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 28e75c3107495d9bb23898e81f4bdaed
guid: 0af2706cd761433fa1dc8059d299eab9
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 713fa8bc3e555ce918996f5d4cd601f5
guid: e54a8c621beb93f4c40951aad55eae18
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: b0254b79781d88f9c1c6eafa931dbec1
guid: 9c2dc3a8615dadc20f66a6d9ee24929c
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: b0bed5cde15cfd1d5e6ad5837333b7ee
guid: 115a4dbd7e6b893fbda8411524b01d6a
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 3e469988903af1fc26bff4d656f20e0f
guid: d3ff8276cab087217a128e8082b46d0e
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: c664455f57836c7cbe4ad5254002b485
guid: dfc2a55f0281d1ca58f1d52f2bcbb03e
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 2a4703e1fc91f1f2e1ac8d253c0e6da1
guid: 3b5876ef95082707ea3f83d96a1cce24
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: aa10d67c1a5d4d8da74dc53c185cac78
guid: 5a25df45eb9d771447e1a5a59ecadc50
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 994996f463f6c84d1ed907220693aacf
guid: 6994cab2d541773e9ffabe483a8b42ca
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: c6be7a163106d8b008938895fba52791
guid: 0d747e636952d7a34059422245c4d4ce
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 473f21ea9a2e69655671c80b4e99ffe1
guid: 002bf125e8d6c063b8167f667a7b3f93
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 652dfcd0b105823ac9c5db62d70ebbfd
guid: 9e0d1cfef813a5e137149677335ad62b
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -171,6 +171,12 @@ function _JS_Video_Create(url) {
function _JS_Video_Destroy(video) {
debugLog('_JS_Video_Destroy', video);
videoInstances[video].destroy();
const Module = GameGlobal.manager.gameInstance.Module;
const { GL } = Module;
const gl = GL.currentContext.GLctx;
if (!isWebVideo && gl.emscriptenGLX && Module._glxVideoDestroy) {
Module._glxVideoDestroy(video);
}
delete videoInstances[video];
}
function _JS_Video_Duration(video) {
@ -375,7 +381,29 @@ function _JS_Video_UpdateToTexture(video, tex) {
if (!FrameworkData) {
return false;
}
const Module = GameGlobal.manager.gameInstance.Module;
const { GL, GLctx } = FrameworkData;
const gl = GL.currentContext.GLctx;
if (!isWebVideo && Module._glxVideoUpdateToTexture && gl.emscriptenGLX) {
const data = v.frameData?.data;
const source = supportVideoFrame ? data : new Uint8ClampedArray(data);
const byteLength = supportVideoFrame ? 0 : source.byteLength;
let sourceIdOrPtr;
if (supportVideoFrame) {
sourceIdOrPtr = source.__uid;
}
else {
sourceIdOrPtr = Module._glxGetVideoTempBuffer(video, byteLength);
if (sourceIdOrPtr) {
Module.HEAPU8.set(source, sourceIdOrPtr);
}
}
Module._glxVideoUpdateToTexture(v, supportVideoFrame, tex, v.videoWidth, v.videoHeight, sourceIdOrPtr);
return true;
}
GLctx.pixelStorei(GLctx.UNPACK_FLIP_Y_WEBGL, true);

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 14ae36d3f7f0dc7dc41259c03fbc6628
guid: 5b79af31afbbfae205bd36ce9e372be3
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 208fb4e13f9c8186710b3ead70af75a9
guid: 81a9cffda8ac717e125818ef0253cdb2
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 6b1937272a581e45a170dbc6670fde3c
guid: 66a2cea4b8b78aaed0eb0dc71f7e57a8
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: f7afff08c2382fecd47be49f2a0f885d
guid: e49e409e3c3f2ac58bb4f0989af4b98e
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: c8727d4de422a991e9da118148e18ac1
guid: 173848402fbd54b5d379ba28e0e2e0e6
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 6029409ef310b0e6c5d9dd442ecacf05
guid: efa4071e321f51585b76dc5f44f32310
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 21329531fa1a872008c9f10fb566d0a0
guid: faf371f8de56900bf45da2d66c90d079
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 06c5ba74e219a25be5e8de62f2c25100
guid: acc7b1ed11a8ebb23d6d4e069f6cfa00
DefaultImporter:
externalObjects: {}
userData:

View File

@ -27,7 +27,11 @@ const managerConfig = {
'$PRELOAD_LIST',
],
contextConfig: {
contextType: $WEBGL_VERSION, // 1: webgl1 2: webgl2
contextType: $WEBGL_VERSION,
contextExt: {
enableGLX: $ENABLE_GLX,
enableMetal: $ENABLE_METAL,
}
},
PROFILER_UPLOAD_URL: '',
};

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 0127dd66c358fd8e9198307f05958abf
guid: 89919136ef38bbf9f29bd69117af86e0
DefaultImporter:
externalObjects: {}
userData:

View File

@ -23,7 +23,7 @@
],
"plugins": {
"UnityPlugin": {
"version": "1.2.79",
"version": "1.2.80",
"provider": "wxe5a48f1ed5f544b7",
"contexts": [
{

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 1fc08a83fbb6f222389843f923be219b
guid: 9f0a5d647ed19c1a3a021f8b83e0edb3
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 10da2018319a542afd8f9f3b2c273f86
guid: 5914cb4176eb253c6aef8ccfa74f18cc
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 435def406e9ee2295cbcd681d7e591d0
guid: c6cb8395379ad46e123d369de4dec061
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 884683f144cea49f75263da04947f80f
guid: 0f172fc046c5ddbb2e0b49b2f01e3648
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: db473975ec9c9ab6447aaa5a646d25a8
guid: f72f61bdef8720a18b3a97aeb8afa75f
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 3303912aa2ae81ab1fa447f6edea92fc
guid: 73b7e06b69ecce06852604893c922f2a
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 506a03adae1727ed0c8f0e1ff0c9acc8
guid: e1f36113abc1a82d28f56df605405d6f
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 36a6b67dfd41a091089b8cd20347fedc
guid: 8af56b0b235475d3fe841cb249fae5e6
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 43cde48f6d29d6191e70bceb4c430b0a
guid: 97068990056e4ac1483002f3e990b9f5
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 82559d6f33ed9eb438676e93871d6939
guid: d0f325185549e7903fc8786c2bbb7a50
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 183dfb74fb4df4da1019ccef335c71a1
guid: 6bff83cd47af12d2c64ddd5131be84e3
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 94a8b85a9aab96b6e3b5e7bdfd457006
guid: 0d9b98d55efe5291854735a61f2aa632
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 91a4a63cde85606bfa53799253093274
guid: c0cd169050b72233f0441549bef8af6b
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: c1b7b0f8ebeb1b5ad44679f0cb9b36cb
guid: 9ea7e13c04371f23db8ff0bc1706a35c
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 6a8c2d3c5ef106fedd785c62e98669c8
guid: ddc53d1a0870888c13eac465b33073bb
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: f404afa6a632b937d2bf89738f5d767b
guid: fa61da71e0eda22aa7a1ef03c6a3da38
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 0f03e4d17d1c0c68a2b3409ace46f4d2
guid: 45d89d862945f1706e96360f267ff5b8
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: ec76a15ad3fc53c18c7d8b8ce880811f
guid: ef2656fe56ce10358fd12c2da11a3f7a
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 50644a08a8c24d3c2e12801ac81fbe88
guid: 830bdb94237758dc4209ec6071c365c9
DefaultImporter:
externalObjects: {}
userData:

Some files were not shown because too many files have changed in this diff Show More