- Creator 版本: 3.8.6
- 目标平台: android
- 首个报错:没有报错
使用assetManager.laodRemote加载远程astc,
assetManager.loadRemote(url, (error, asset: ImageAsset) => {
if (error) {
console.error(error);
} else {
console.log(asset, “asset”);
t.sp.spriteFrame = SpriteFrame.createWithImage(asset);
}
});
模拟器中显示
看了下加载astc和png格式同为ImageAsset,_nativeData数据结构不一样

要想正常在android显示还需要什么操作
Astc纹理原文件
试试这样
let imageAssetProto = cc.ImageAsset.prototype;
imageAssetProto.$reset = imageAssetProto.reset;
imageAssetProto.reset = function (data){
this.$reset(data);
if (this.isCompressedTexture){
this.format = data.format;
this._format = data.format;
}
}
isCompressedTexture 自己加
感谢回复,你用的什么版本我这打印发现data.format==undefined
