Greetings everyone,
currently working with scene export/import.
i’ve loaded the FishJoy 2 scene from CocoStudio:
bool InfoLayer::init()
{
if ( !CCLayer::init() ) {return false;}
CCSize visibleSize = CCDirector::sharedDirector()->getVisibleSize();
CCPoint origin = CCDirector::sharedDirector()->getVisibleOrigin();
if (!CCNode::create()) { return false; }
CCNode* rootSceneNode;
SceneReader* sceneReader = SceneReader::sharedSceneReader();
rootSceneNode = sceneReader->createNodeWithSceneFile("FishJoy2.json");
if (rootSceneNode == NULL) { return false; }
this->addChild(rootSceneNode);
return true;
}
This works great!
But when using a subfolder inside resources folder:
rootSceneNode = sceneReader->createNodeWithSceneFile("somefolder/FishJoy2.json");
This throws an assertion failure, because the file was not found:
Is this a bug in Cocos2D-X-2.2.2? :;qst
Can we load the scenes from subfolders inside the resource folder?
Am i missing something here?
Suggestions are appreciated.
Btw, i am following the docs at:
http://www.cocos2d-x.org/forums/6/topics/45819/edit
Related issue:
http://www.cocos2d-x.org/forums/24/topics/40625
Thank you in advance
assertfail.jpg (26.7 KB)