I have used several versions and found that my resources seem to be unable to be recognized. Finally, I found that someone said that after configuring it as a Bundle, a cc.assetbundle will be generated in this folder, but no matter which version of the software I use, I have never seen this file generated. After selecting the folder and configuring it as a Bundle, I assigned the priority. In order to prevent the resources from being missed, I specially added the files in all folders. After saving, I still didnāt see any cc.assetbundle generated. In fact, it would be fine if it can be used with or without, but now it canāt be used. I am a wild child without a teacher to teach me, so I can only ask the big guys to take care of me. My code content is: private async loadImages(): Promise {
const promises = this.TEST_RESOURCES.images.map((path, index) => {
return new Promise((resolve) => {
const bundleName = this.getBundleName(path);
const bundle = assetManager.getBundle(bundleName);
if (!bundle) {
if (bundleName === 'main') {
warn(`äø»čµęŗå
ęŖå č½½ļ¼ę ę³å č½½čµęŗ: ${path}`);
} else {
warn(`čµęŗå
${bundleName}ęŖå č½½ļ¼č·³čæčµęŗ: ${path}`);
}
resolve();
return;
}
bundle.load(path, SpriteFrame, (err: Error | null, spriteFrame: SpriteFrame) => {
if (err) {
warn(`å č½½å¾ē失蓄: ${path}`, err);
this.tryAlternativeLoad(bundle, path, index).finally(resolve);
} else if (index < this.displaySprites.length) {
this.displaySprites[index].spriteFrame = spriteFrame;
resolve();
} else {
resolve();
}
});
});
});
await Promise.all(promises);
}
private getBundleName(path: string): string {
if (path.indexOf(āfemale_charactersā) === 0) return āfemale-charactersā;
if (path.indexOf(āpve_modeā) === 0) return āpve-modeā;
if (path.indexOf(ācommon_battleā) === 0) return ācommon-battleā;
return āmainā;
} There are also resource paths in the code: private readonly TEST_RESOURCES = {
images: [
ātextures/bg_tā, // Change to relative path
āfemale_characters/1_n/poses/1_n_standā,
āpve_mode/boss/boss_male_seyouā, // Related path
ācommon_battle/items/icons/dingshenā
],
audio: āsounds/clickā // Change to relative path
}; The following is part of the error: [PreviewInEditor] Failed to load image: pve_mode/boss/boss_male_seyou Error: Bundle pve_mode doesnāt contain pve_mode/boss/boss_male_seyou
at parse (K:\cocosbianjiqi\Creator\3.8.6\resources\resources\3d\engine\bin.cache\dev\editor\bundled\index.js:117036:25)
at Pipeline.sync (K:\cocosbianjiqi\Creator\3.8.6\resources\resources\3d\engine\bin.cache\dev\editor\bundled\index.js:115715:28)
at preprocess (K:\cocosbianjiqi\Creator\3.8.6\resources\resources\3d\engine\bin.cache\dev\editor\bundled\index.js:115993:53)
at Pipeline._flow (K:\cocosbianjiqi\Creator\3.8.6\resources\resources\3d\engine\bin.cache\dev\editor\bundled\index.js:115759:11)
at Pipeline.async (K:\cocosbianjiqi\Creator\3.8.6\resources\resources\3d\engine\bin.cache\dev\editor\bundled\index.js:115755:16)
at AssetManager.loadAny (K:\cocosbianjiqi\Creator\3.8.6\resources\resources\3d\engine\bin.cache\dev\editor\bundled\index.js:109614:20)
at Bundle.load (K:\cocosbianjiqi\Creator\3.8.6\resources\resources\3d\engine\bin.cache\dev\editor\bundled\index.js:112965:33)
at file:///K:/386/525/temp/programming/packer-driver/targets/editor/chunks/d0/file:/K:/386/525/assets/testscene.ts:102:24
at new Promise ()
at map (file:///K:/386/525/temp/programming/packer-driver/targets/editor/chunks/d0/file:/K:/386/525/assets/testscene.ts:88:20)
at Array.map ()
at TestScene.loadImages (file:///K:/386/525/temp/programming/packer-driver/targets/editor/chunks/d0/file:/K:/386/525/assets/testscene.ts:87:53)
at TestScene.loadAndDisplayResources (file:///K:/386/525/temp/programming/packer-driver/targets/editor/chunks/d0/file:/K:/386/525/assets/testscene.ts:77:22)
at TestScene.start (file:///K:/386/525/temp/programming/packer-driver/targets/editor/chunks/d0/file:/K:/386/525/assets/testscene.ts:32:24)
Error: [PreviewInEditor] Failed to load image: pve_mode/boss/boss_male_seyou Error: Bundle pve_mode doesnāt contain pve_mode/boss/boss_male_seyou
at Pipeline._flow (K:\cocosbianjiqi\Creator\3.8.6\resources\resources\3d\engine\bin.cache\dev\editor\bundled\index.js:115759:11)
at Pipeline.async (K:\cocosbianjiqi\Creator\3.8.6\resources\resources\3d\engine\bin.cache\dev\editor\bundled\index.js:115755:16)
at AssetManager.loadAny (K:\cocosbianjiqi\Creator\3.8.6\resources\resources\3d\engine\bin.cache\dev\editor\bundled\index.js:109614:20)
at Bundle.load (K:\cocosbianjiqi\Creator\3.8.6\resources\resources\3d\engine\bin.cache\dev\editor\bundled\index.js:112965:33)
at file:///K:/386/525/temp/programming/packer-driver/targets/editor/chunks/d0/file:/K:/386/525/assets/testscene.ts:102:24
at new Promise ()
at map (file:///K:/386/525/temp/programming/packer-driver/targets/editor/chunks/d0/file:/K:/386/525/assets/testscene.ts:88:20)
at Array.map ()
at TestScene.loadImages (file:///K:/386/525/temp/programming/packer-driver/targets/editor/chunks/d0/file:/K:/386/525/assets/testscene.ts:87:53)
at TestScene.loadAndDisplayResources (file:///K:/386/525/temp/programming/packer-driver/targets/editor/chunks/d0/file:/K:/386/525/assets/testscene.ts:77:22)
at TestScene.start (file:///K:/386/525/temp/programming/packer-driver/targets/editor/chunks/d0/file:/K:/386/525/assets/testscene.ts:32:24)
at Logger._logHandler (K:\cocosbianjiqi\Creator\3.8.6\resources\app.asar\builtin\scene\dist\script\3d\manager\startup\log.ccc:1:487)
at Logger.record (K:\cocosbianjiqi\Creator\3.8.6\resources\app.asar\node_modules@base\electron-logger\lib\renderer.ccc:1:458)
at console. (K:\cocosbianjiqi\Creator\3.8.6\resources\app.asar\node_modules@base\electron-logger\lib\renderer.ccc:1:1260)
at console.warn (K:\cocosbianjiqi\Creator\3.8.6\resources\app.asar\node_modules@sentry\src\instrument\console.ts:40:20)
at warn (K:\cocosbianjiqi\Creator\3.8.6\resources\resources\3d\engine\bin.cache\dev\editor\bundled\index.js:146866:12)
at file:///K:/386/525/temp/programming/packer-driver/targets/editor/chunks/d0/file:/K:/386/525/assets/testscene.ts:104:25
at eval (K:\cocosbianjiqi\Creator\3.8.6\resources\resources\3d\engine\bin.cache\dev\editor\bundled\index.js:117467:9)
at eval (K:\cocosbianjiqi\Creator\3.8.6\resources\resources\3d\engine\bin.cache\dev\editor\bundled\index.js:151169:9)
at sentryWrapped (K:\cocosbianjiqi\Creator\3.8.6\resources\app.asar\node_modules\src\helpers.ts 17)
[PreviewInEditor] Failed to load image: common_battle/items/icons/dingshen Error: Bundle common_battle doesnāt contain common_battle/items/icons/dingshen It may be a bit messy, Iām very sorry QAQ