I followed this guide but the result returned null Asset Manager · Cocos Creator
resources.load('data/cards.json', JsonAsset, (err, asset)=>{
log(asset);
});

But the deprecated class is working

If I missed the documents, please let me know.
Thanks.
I asked engineering to have a look.
Zakhar
3
Hello, have you solved it? If no so try this:
private static loadRes(url: string) {
return new Promise<JsonAsset>((resolve, reject) => {
resources.load(url, null, (error, asset) => {
if (error) {
reject(error)
}
resolve(asset)
})
})
}
Koei
4
You do not need to add a file suffix.
resources.load(‘data/cards’, JsonAsset, (err, asset)=>{
log(asset);
});