cocos creator3.0 报错 this._texture.getGFXTexture is not a function

补充一下

你好,请问你这个 this._texture 确定是有值的是吗,是在什么阶段调用 this._texture.getRenderTexture

我也遇到了这个错误,我看其他帖子,是new SpriteFrame(texture),但是3.0不能这样写,我该如何将Texture2D处理成SpriteFrame,求解答


https://forum.cocos.org/t/topic/107547/8

sprite = SpriteFrame.createWithImage(nativeres.iconTexture);cocos3d1.1.2是这么写的,当时参数是oppo,vivo小游戏上传过来的图片是能正常用的,3.0.1还没试过,不过应该也能用

1赞

感谢回复,这个方法是有效的