Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.8.5 多个热更实例并发更新,只有一个实例能正常更新进行 #18370

Open
oscarHeyang opened this issue Feb 24, 2025 · 1 comment
Labels
Bug Needs Triage Needs to be assigned by the team

Comments

@oscarHeyang
Copy link

Cocos Creator version

3.8.5

System information

window 10 android

Issue description

当我多个项目工程去构建不同的bundle ,然后以原生热更的方式更新资源。
实例化多个热更实例。

this._am = new native.AssetsManager(this.manifest.nativeUrl, this._storagePath, this.versionCompareHandle);

但是3.8.5升级后,出现了只会更新最后一个实例的热更资源。

查看源码发现,AssetsManagerEx 里的设定了一个静态变量,每次去创建一个实例都会强制赋值,
然后后续的判定都会根据这个 assetsManager 进行判定。导致问题所在。

Image

Image

Image

看下这个如何更正,不知道这个操作的意义??

Relevant error log output

No response

Steps to reproduce

必先。

Minimal reproduction project

AssetsManagerEx.cpp 源码导致。

@oscarHeyang oscarHeyang added Bug Needs Triage Needs to be assigned by the team labels Feb 24, 2025
@oscarHeyang
Copy link
Author

附论坛贴
https://forum.cocos.org/t/topic/164970

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Needs Triage Needs to be assigned by the team
Projects
None yet
Development

No branches or pull requests

1 participant