引擎5.2.5版本

 

一个eui.Image,给source和texture赋值,获取高宽会不同 = = !

let img:eui.Image = new eui.Image();


img.source = RES.getRes("1_png");
console.log(img.width); // 输出为0 


img.texture = RES.getRes("1_png");
console.log(img.width); //输出width正常值

  

posted on 2018-09-11 14:40  gamedaybyday  阅读(688)  评论(0编辑  收藏  举报