Cocos Creator 3.0.0 加载一个图片图找不这个图片

resources.load(id,SpriteFrame,null,(error, asset) => {
if (error) {
console.warn(‘加载SpriteFrame[资源加载] 错误 [’ + id + ‘]’);
return;
}
if (typeof callback == ‘function’) {
callback(asset);
}
});

这个uuid都没有

image

api文档很不给力

@wangzhe @panda @jare @308303735

图片路径对吗,报错是什么

image

是uuid没有这个纹理

image
编辑器里面有这个纹理

那就不清楚了

public static load(id:any,callback:Function|any){
resources.load(id,(error, asset) => {
if (error) {
console.warn(‘加载SpriteFrame[资源加载] 错误 [’ + id + ‘]’);
return;
}
if (typeof callback == ‘function’) {
if(asset instanceof ImageAsset){
let frame=new SpriteFrame()
frame.texture=asset._texture;
callback(frame);
}else{
callback(asset);
}
}
});
}

ddd.load(‘Client/vip/VIP’+(index-1),function(res:any){
this.spriteFrame=res
}.bind(info.vip_up))

该主题在最后一个回复创建后14天后自动关闭。不再允许新的回复。