代码片段:
CCNode *pNode = SceneReader::sharedSceneReader()->createNodeWithSceneFile(“LoadSceneEdtiorFileTest/FishJoy2.json”);
控制台提示
Cocos2d: Get data from file(LoadSceneEdtiorFileTest/FishJoy2.json) failed!
pNode为NULL
代码片段:
CCNode *pNode = SceneReader::sharedSceneReader()->createNodeWithSceneFile(“LoadSceneEdtiorFileTest/FishJoy2.json”);
控制台提示
Cocos2d: Get data from file(LoadSceneEdtiorFileTest/FishJoy2.json) failed!
pNode为NULL
你好,请问你这个是编译安卓么?如果是安卓,检查文件是否放到了assert目录里。安卓平台编译较为常见的问题就是资源为复制和无读取权限。
MAC 下的IOS项目 ,资源都导入到rescourse 里了 ,能加下Q帮忙解决下么 ,3Q 542214712
不要用路径,直接写文件名
我好像找到原因了 ,我的JSON里都有路径 比如:Misc/music_logo.mp3 ,如果换成music_logo.mp3 就OK了
你的mp3文件这个路径下么?也就是跟json在同一个文件夹~