Simulator: texture name E:/Cocos_Projects/GameTest/assets/resources/subGameUI/gamechose_101.png
Simulator: D:/CocosCreator/resources/cocos2d-x/simulator/win32//src/jsb_polyfill.js:34690:TypeError: texture is null
上面时报错信息,图片资源是存在的但是提示找不到什么鬼?
var item = cc.instantiate(self.subgamePrefab);
item.getChildByName("lab_version").getComponent(cc.Label).string= "v1.0."+i;
item.setPosition(-370 + (i % 3) * 250,-10 - Math.floor((i) / 3) * 262);
self.subgameList.addChild(item,i,i*123);
var name = cc.url.raw("resources/subGameUI/gamechose_101.png")
cc.log("texture name " + name)
item.getComponent(cc.Sprite).spriteFrame.setTexture(name)
