先贴上代码:
private _iconUrl:string = “https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTKialAsAVNqhX1iaHOnvdnRtI6wvGX9qwMvMdGYTbfIHoUMvPjn4Ml4mOCcJJYribFPhZS6brkL0bXfA/0”
let icon_sprite = this.icon_player.getComponent(Sprite) as Sprite;
assetManager.loadRemote(this._iconUrl, {type: ‘png’}, function (err, imageAsset) {
const spriteFrame = new SpriteFrame();
const texture = new Texture2D();
texture.image = imageAsset;
spriteFrame.texture = texture;
icon_sprite.spriteFrame = spriteFrame;
});
由于获取到的图片是"jpg"格式的,参数{type:“jpg”}也尝试过,图片还是显示不了,使用creator3.1版本

