.ccb Queries

.ccb Queries
0.0 0



i Have

  • MenuScene (CCScene)
  • commonLayer (CCLayer)
  • MainMenuLayer (CCLayer)
  • OptionsLayer (CCLayer)
  • HelpLayer (CCLayer)

now i have one .ccb added which contains images which i want to display in commonLayer, which i have done by

CCommonLayer *commonRef = (CCommonLayer*) CCBReader::nodeGraphFromFile(“common.ccb”);
and added commonRef in my MenuScene…which works fine.

Now, i have images to show in other layers too…so do i have to create separate .ccb files for them or create one .ccb common for all the layers.

[but, if only one .ccb file is required per scene, then how do i add images in all the separate layers through one common .ccb file.]…or do i create separate .ccb files for separate layers like the above, i did for comonLayer.



In our latest code on github, it has supported ccbi(binary format).
Also it supports nesting ccb in ccb files, I think this can meet your demand.
But you should use the latest Cocosbuilder version on github (https://github.com/cocos2d/CocosBuilder) to use this feature.

BTW, we will release a new version today. :slight_smile: