2.0 cc.Texture2D initWithData BUG

在使用 cc.Texture2D 的时候报错,示例代码如下。希望尽快修复
let texture=new cc.Texture2D();
let array=new Uint8Array(new ArrayBuffer(16))
texture.initWithData(array,cc.Texture2D.PixelFormat.RGBA8888,2,2);

在 update中377行报错,this._texture 是空
if (options.images && options.images.length > 0) {
this._texture.update(options);
}

是否将 this._texture.update(options); 应该改写成
if (!this._texture) {
this._texture = new renderer.Texture2D(renderer.device, opts);
}
else {
this._texture.update(opts);
}

当发布到微信后 该问题依然没有解决。
HTMLCanvasElement 在微信下 是Object
导致任何数据都会进入该if语句中
Texture2D.prototype._setImage
if (
img instanceof HTMLCanvasElement ||
img instanceof HTMLImageElement ||
img instanceof HTMLVideoElement
)

触控对我们提的bug都是这样不理不睬吗

非常感谢楼主,我也碰到这个问题,最新版的2.01,initWithData时_texture为空

哥 你有解决方案么?