@kwellman after dig into creator, i found the plugin already supports widgets, but the widget can only AlignOnce. If want to support align in runtime, then
plugin should retain the target it aligns to and the node which is will do align
when the target or node is deleted by codes, then plugin(reader and other codes) doesn’t know it, so target and node will not been deleted, which is error.
If plugin doesn’t retain them, then they will be wild pointer. So we can only align the Widget once.
Hi, I’ve desperately trying to run example project, but it just doesn’t work. I’ve added “reader” in my Classes directory (via Xcode), I can include: #include “reader/CreatorReader.h” but when trying to run the app I’m getting tons of linker errors. Can you provide already configured HelloWorld project with creator support? Note that I’m using precompiled cocos2d-x (3.14.1). Should I have to include reader classes inside cocos and recompile library or can they be outside of it?
I think you don’t include reader folder correctly, how did you include it? Could you please should me the screenshot of Xcode folder structure? Yep, i will use a branch of my personal cocos2d-x repo to test the plugin in future.
Is there a file named config.json in the root of your project? Now the plugin use it to check if it is a lua project or not. CreatorReaderBinding.h/cpp will be copied if it is a lua project.
I don’t have such a file.
I have an existing cocos2d-x project and I wanted to add creator support to it, so I’ve copied all files from packages/creator-luacpp-support/reader.
Removing CreatorReaderBinding.cpp and CreatorReaderBinding.h removed that error.
I just wanted to show simple demo scene in my game like this (in AppDelegate.cpp):
FileUtils::getInstance()->addSearchPath("creator"); //TRIED this but didn't help
creator::CreatorReader* reader = creator::CreatorReader::createWithFilename("creator/CreatorAnim.ccreator");
reader->setup();
Scene* scene = reader->getSceneGraph();
director->runWithScene(scene);
No, you don’t have to copy these files manually, the plugin will copy the files automatically, and the plugin will not copy luabinding related files. I thin you can reader the README.
Ok, I’ve followed this tutorial and the problem is when I’m selecting my cocos2d-x project and using “Build now” from cocos creator it “thinks” it’s a lua project, because it creates frameworks directory.
It’s 3.14.1 I believe. I didn’t have config.json either. Cocos creator created it I guess.
Maybe it doesn’t work, because I’m using precompiled libs? (no cocos2d-x directory inside project).