UnityPlugin 4.43.0 ABFS关闭时崩溃,ABFS冷启动时间过长
322 浏览2026年10月27日作者:TPSE

环境:

- com.bytedance.starksdk: 6.9.5

- UnityPlugin: 4.43.0 (provider: tt674511f8f84ea91612)

- Unity: 2022.3.62f3c1

复现步骤:

1. StarkBuilderSetting.assetBundleFSEnabled = 0

2. 构建抖音小游戏

3. 真机运行

崩溃堆栈:

TypeError: Cannot read properties of undefined (reading 'has')

at e.isRegisteredAssetBundlePath (index.js:3)

at ___syscall_openat (index.js:3)

根因:

UnityPlugin 在 ___syscall_openat 拦截器里无条件调用

abfs.isRegisteredAssetBundlePath(path).has(path),

但 assetBundleFSEnabled=0 时 window.StarkSDK.abfs 未初始化,

isRegisteredAssetBundlePath 返回 undefined,.has() 崩溃。

修复方案(一行):

将 abfs.isRegisteredAssetBundlePath(path).has(path)

改为 abfs?.isRegisteredAssetBundlePath?.(path)?.has(path)

期望行为:

assetBundleFSEnabled=0 时正常走 LoadFromMemory fallback,

与 TTAssetBundle.isAbfsReady=false 分支设计一致。


另外 ABFS开启的情况下 冷启动时间过长,能否默认关闭

最后一次编辑于 2026 年 10 月 27 日
共 1 条评论

相关问答

专题推荐

热门文章

热门问答