Bundle resource doesn't contain item

I’m trying to load assets from resources folder using resources.load in Cocos Creator 3.5. But when I run the project there is an error “Bundle resources doesn’t contain apel”.

This is my code to load assets

import { _decorator, Component, Sprite, resources, SpriteFrame, error } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('MainMenu')
export class MainMenu extends Component {
    @property(Sprite)
    attachedNode: Sprite = null;

    start() {
        resources.load('apel', SpriteFrame, (err, spriteFrame) => {
            if (err) {
                error(err.message);
                return;
            }

            this.attachedNode.spriteFrame = spriteFrame;
        });
    }
}

and this is the contents of resources folder
image

I’ve tried to build the project but the result is still same. Has anyone experienced this and what is the solution? Thanks before.

You need to add spriteFrame to url, refer to :Sprite Frames · Cocos Creator

oh I see, thanks for the answer :smile:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.