Ok, I’ve searched forever for this answer and have played with many things. I’ve read the threads on here about CCBReader, but they never seem to resolve the issue. I can’t get a ccbi file to load because I get the incompatible version warning:
WARNING! Incompatible ccbi file version (file: 3 reader: 2)
Good news is that it is at least reading the file. I looked at the CCBReader code and it shows kCCBVersion 2. Which I believe is different from the CCB file version, which shows 3 in the ccb file. I am able to get the TestsDemo app to load and run just fine and I can do the CocosBuilderTest just fine. So I know it can load one. So I looked at that ccb file and it shows version 3 just like what I have.
So my next question does the file version in the ccb file have anything to do with the magic version tag in the ccbi file? We are using CocosBuilder 2.0 to publish to ccbi.
For those that are getting this to work, how are you doing it.? Here’s the code I’m using:
cocos2d::extension::CCNodeLoaderLibrary * ccNodeLoaderLibrary = cocos2d::extension::CCNodeLoaderLibrary::sharedCCNodeLoaderLibrary();
cocos2d::extension::CCBReader * ccbReader = new cocos2d::extension::CCBReader(ccNodeLoaderLibrary);
ccbReader~~>autorelease;
CCNode * node = ccbReader~~>readNodeGraphFromFile(“”, “test.ccbi”, this);
if (node != NULL) {
this->addChild(node);
}
node is always NULL because of the version issue. This is on Win7, eclipse, android project. I have successfully completed the ninja tutorial, so my environment should be fine.
Is there a certain way that the scene needs to be created in CCB? All we have is a background and a couple sprites, that’s it.
Thanks for the help.