Flatbuffers version or binary


#1

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.


#2

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


#3

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


#4

@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.


#5

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


#6

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


#7

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.


#8

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


#9

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.


#10

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


#11


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.


#12

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


#13

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.


#14

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


#15

Could you explain this in more detail please?


#16

It’s triggered by different field sequence at fbs.

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


#17

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


#18

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


#19

Thank you! I will look at it.


#20

Any progress on that?