我用CocosStudio做ui,获取拼好大图的时候一直报Rect width exceeds maximum margin: res/UI_MainLayer/UI_MainLayer0.png
我这个图的尺寸是1024*512的,debug发现CCSpriteFrameCache.js里的 texture = cc.textureCache.addImage(texture); 这个texture的width和height 都是0,
不知道为啥,我换了张图也是0求大神帮忙,哪里的出了问题?
我用CocosStudio做ui,获取拼好大图的时候一直报Rect width exceeds maximum margin: res/UI_MainLayer/UI_MainLayer0.png
我这个图的尺寸是1024*512的,debug发现CCSpriteFrameCache.js里的 texture = cc.textureCache.addImage(texture); 这个texture的width和height 都是0,
不知道为啥,我换了张图也是0求大神帮忙,哪里的出了问题?
图片是否有进行过预加载呢
没有,图片预加载报 “classname” undefine
那应该就是图片没有加载成功,可以参考sample里面的resource,将图片进行预加载,另外studio导出的json文件也是需要加入预加载列表中的。