[LayaAir 2.0]关于graphics.drawTexture方法设置纹理报错TypeError: texture.getIsReady is not a function

自己的问题
已邀请:

Aar0n

赞同来自:

截图和代码信息过于少,看不到整体环境,请上传这个工程demo 以供排查问题

louber大可

赞同来自:

请问具体是怎样实现的?
我也遇到了这个问题
Texture2D.load("res/env/mountain1_3.png", Handler.create(null, function(tex:Texture2D):void {
           
menu_sprite_jian.graphics.drawTexture(tex,0,0);
            }));这样然后无法drawtexture报同样的错误
但是这个type要如何加上去呢?是作为函数参数吗,没有看到有函数提供一个type参数呀

柠萌

赞同来自:

今天也遇到了哈,new Texture就行,Laya.loader.load试了还是 不行
var Texture1= new Laya.Texture();
Texture1.load("res/1.png",Laya.Handler.create(this,function(){
    this.sprite.graphics.drawTexture(Texture1,0,0,50,50,null,1,"#FFFFF");
}));

要回复问题请先

商务合作
商务合作