A few years ago we were using Cocos Studio 2 for scene editing. That project was closed and Cocos creator appear but unfortunately it doesn’t support csb exporting, the way we were using to load scene binarys into our games.
This wasn’t a problem because i kept the old cocos studio 2 executable and everything was fine with this part.
An update cam and changed this. Apparently widget readers were changed
cocos2d/cocos/editor-support/cocostudio/CSParseBInary_benerated.h
The button reader was starting to crash. The apparent reason was that the font name was undefined ( 12313232322235553 ) and the creation of a font with that size was impossible. I found the problem in flatbuffers parsing
VT_ISLOCALIZED was moved to index 18 and everting below was shifted. Font size should be at index 18.
FIX:
struct ButtonOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
enum {
VT_WIDGETOPTIONS = 4,
VT_NORMALDATA = 6,
VT_PRESSEDDATA = 8,
VT_DISABLEDDATA = 10,
VT_FONTRESOURCE = 12,
VT_TEXT = 14,
VT_FONTNAME = 16,
VT_FONTSIZE = 18,
VT_TEXTCOLOR = 20,
VT_CAPINSETS = 22,
VT_SCALE9SIZE = 24,
VT_SCALE9ENABLED = 26,
VT_DISPLAYSTATE = 28,
VT_OUTLINEENABLED = 30,
VT_OUTLINECOLOR = 32,
VT_OUTLINESIZE = 34,
VT_SHADOWENABLED = 36,
VT_SHADOWCOLOR = 38,
VT_SHADOWOFFSETX = 40,
VT_SHADOWOFFSETY = 42,
VT_SHADOWBLURRADIUS = 44,
VT_ISLOCALIZED = 46,
};
As a conclusion, is there a way to get scene files ( csb ) into the build like the old way. The new cocos creator forces me to switch from c++ to js and at this point i’m not confortable with this move.
Thank you!