[]this.bitmap.activeResource is not a function TypeError: this.bitmap.activeResource is not a function


if (bitmap&&bitmap._addReference){
bitmap._addReference();
}

这个代码过滤已经加了,但是会报下面这个错
this.bitmap.activeResource is not a function
TypeError: this.bitmap.activeResource is not a function
 
 
使用代码如下:var rankTexture:Texture = new Texture(Laya.Browser.window.sharedCanvas);
var image:Laya.Image = new Laya.Image();
image.source = rankTexture;
Laya.stage.addChild(image);
 
 
QQ图片20180403023228.png
已邀请:

Laya_XS

赞同来自:

你在报错的地方添加一个空判断,临时处理下,写个版本修复:
if(bitmap&&bitmap.activeResource)
{
bitmap.activeResource();
}

祝贺

赞同来自:

请问解决了么?我也遇到了,也按照楼下方式改过,但是还是报这个错。

要回复问题请先

商务合作
商务合作