Using CocosCreator as GUI for C++ project

Hi!
I would appreciate any help with this issue:

I’ve made a test C++ project which uses Cocos2d-x-3.17.2
I’ve also managed to export a test scene from CocosCreator using this plugin: https://github.com/cocos2d/creator_to_cocos2dx#how-to-generate-the-needed-files
But now, when I try to load it in my project, I see that CreatorReader.cpp is using some methods from Cocos-2d-x-14, which do not exist anymore.

Does anybody know is there an updated version for this plugin,
or is there any other way to load a scene from CocosCreator?
Thanks in advance!

There isn’t an updated version of the plugin currently. I’m not sure if there will ever be.

Do you mean Cocos2d-x v3.14? If so, you can always use GitHub to download that version by selecting the tag for 3.14

https://github.com/cocos2d/cocos2d-x/archive/cocos2d-x-3.14.zip

Thank you @slackmoehrle for your quick response! :slight_smile:

Yes, I mean v.3.14

there any other way to load a scene from CocosCreator?

I using cocos2d-x-3.17.2 & creator_to_cocos2dx for windows.
I sucess to build CreatorReader from cmake.
I Added ,
reader/CMakeLists.txt & reader/dragonbones/CMakeLists.txt

use_cocos2dx_compile_define(${LIB_NAME})
use_cocos2dx_compile_options(${LIB_NAME})

after add_library(${LIB_NAME} …)

I see that CreatorReader.cpp is using some methods from Cocos-2d-x-14, which do not exist anymore.

What’s methods name? I want to know.

Hi, @F14Tomcat :slight_smile:

I added creator-luacpp-support/ reader in my project’s source code (which uses cocos2d-x-3.17.2).
These are the compilation errors in CreatorReader:
error C2039: ‘setCenterRectInPixels’: is not a member of ‘cocos2d::SpriteFrame’
error C2039: ‘setTitleLabel’: is not a member of ‘cocos2d::ui::Button’
error C2039: ‘setCenterRectNormalized’: is not a member of ‘cocos2d::Sprite’
error C2039: ‘setFontSize’: is not a member of ‘cocos2d::ui::RichText’
error C2039: ‘setFontFace’: is not a member of ‘cocos2d::ui::RichText’
error C2259: ‘creator::RichtextStringVisitor’: cannot instantiate abstract class
error C2039: ‘parseIntrusive’: is not a member of ‘cocos2d::SAXParser’
error C2039: ‘initWithXML’: is not a member of ‘cocos2d::ui::RichText’
error C2039: ‘setStretchEnabled’: is not a member of ‘cocos2d::Sprite’
error C2039: ‘getSlidBallNormalRenderer’: is not a member of ‘cocos2d::ui::Slider’
error C2039: ‘getSlidBallRenderer’: is not a member of ‘cocos2d::ui::Slider’
error C2039: ‘setIndicatorIndexNodesTexture’: is not a member of ‘cocos2d::ui::PageView’

You say, that you are able to read the exported from CocosCreator scene in a C++ project?

Thank you!
For my cocos2d-x 3.17.2 engine source,
For example: cocos2d :: SpriteFrame :: setCenterRectInPixels
Is
cocos2d-x \ cocos \ 2d \ CCSpriteFrame.h (157,10)
void setCenterRectInPixels (const Rect & centerRect);
There was a definition in.

Yes, but I’m having another problem and I’m trying now.
The position of Node is not reflected and is displayed in all (0,0).
The .fire stores the position probably as “_tri” instead of “position”. There is no word “_tri” in the js code of the plugin, so it may be a problem with the version of cocos creator.

I say

so it may be a problem with the version of cocos creator.

I was able to display it properly now.
After all it was a problem of the Creator version.

NG:2.4.3
OK:1.10.1

I want support for the latest version 2.x of “creator_to_cocos2dx”

Sorry, guys
the problem was on my side.
As @F14Tomcat mentioned, the listed above “missing” methods actually do exist in Cocos2d-x-3.17.2.
I am not sure how this happened, but it could be related to CocosStudio, which I had installed earlier in order to test it.
Later, I used the command line tools to generate a test project (“cocos new Game_1…”). The generated project included the source code from CocosStudio instead of the one from Cocos2d-x-3.17.2.
So it seems that we can still use CocosCreator as GUI for C++ projects.

Hi,
I continue to investigate Cocos2dx and CocosCreator.
Could you please tell me if you know:

  1. Is there a way to run the created in CocosCreator javascript code from the C++ project?
  2. Is there any other way (except by creator_to_cocos2dx ) to use CocosCreator as an editor for a C++ project?
  3. Are there any other good editors that can be used to create cocos2dx game using C++?

Thank you in advance!

Do a search here on these forums for other editor ideas. Like FairyGUI, etc.