Flatbuffers version or binary

Flatbuffers version or binary
0.0 0


What is the used flatbuffers version in cocos2d-x 3.16 (or github)? I want to use the bundled version, so I don’t need extra sources. But to create the header files for my schema, I need the flatbuffers binary, which isn’t precompiled in cocos2d-x, isn’t it?

The latest flatbuffers release is 1.8.0 and the generated files can’t be used with the bundled sources.


@slackmoehrle Because no one answered yet, I mention you.


Thank you I will ask our engineering team to review this topic.


@mars3142 you can check the version in flatbuffer.h, it is 1.0.0. I updated it to new version in v3.15, but it breaks cocos studio reader, so i reverted it in v3.16.


Wouldn’t it be better to fix the implementation for Cocos Studio reader instead of reverting to an outdated (and possibly buggy) version?


But the output of Cocos Studio uses the format of old flatbuffer, and cocos studio is cancelled.


As far as I know flatbuffer schema are backward compatible, if you create the scheme files correct.

And if Cocos Studio is cancelled, why do you still want to support it? This way you can’t update flatbuffer never. That’s not the best decision. Please look forward and not always backward, even if a project is cancelled.


No input resource on it, but we can not delete the reader since many developers need it.


Maybe you could fix this if you are familiar with flatbuffers?
Then @zhangxm could update the version.

Or I can look at it if @zhangxm provides more information about the issue. But it will be by the end of the month …in the best case.


Right, more information from @zhangxm about the issue would be nice.


And there are many other developers complained it in Chinese forum. What i did for updating flatbuffer are:

  • update flatbuffer
  • use new version of flatbuffer to regenerate header files used in studio reader
  • modify reader to adapt new flatbuffer

More detail information can refer to: https://github.com/cocos2d/cocos2d-x/pull/17349.


The dropbox link is broken. Where can I find the uncompiled old scheme file?


It is here: https://github.com/cocos2d/cocos2d-x/tree/v3/cocos/editor-support/cocostudio/fbs-files. But i am not sure if it is the one used in last version of Cocos Studio.


Actually, the problem is not triggered by newer flatbuffers version.


Could you explain this in more detail please?


It’s triggered by different field sequence at fbs.

you can compare the cocos2d-x 3.15 and 3.16 .fbs files.


As @halx99 mentioned, the FBS files changed and that’s why the latest flatbuffers doesn’t work.


I don’t remember why i need to modify .fbs in v3.15. You can try to update flatbuffer without breaking.


Thank you! I will look at it.


Any progress on that?