cocos-engine
cocos-engine copied to clipboard
[3.8.1] When preloading the spine prefab resource, the loading result obtained in web preview is inconsistent with the loading result obtained when running the project after building and publishing
Cocos Creator version
3.8.1
System information
Windows10
Issue description
When preloading the spine prefab resource, the loading result obtained in web preview is inconsistent with the loading result obtained when running the project after building and publishing 预加载 spine 预制体资源时在 web 预览得到的加载结果与构建发布后项目运行的加载结果不一致
The result when previewing in the browser web:
The result when running the web-mobile project after building and publishing:
Test code:
import { _decorator, assetManager, Component, Node, Prefab } from 'cc';
const { ccclass, property } = _decorator;
@ccclass('PreloadTest')
export class PreloadTest extends Component {
preloadBundleResTest () {
assetManager.loadBundle("spine", (err, bundleInfo)=>{
if (bundleInfo) {
bundleInfo.preload("spineRaptor/SpinePrefabTest", Prefab , (err, preloadSpine)=>{
if (preloadSpine) {
console.log(preloadSpine);
}
})
}
});
}
}
Relevant error log output
Steps to reproduce
Minimal reproduction project
Currently, a temporary solution has been found by modifying the engine code: