C++ and Lua support for creator alpha0 released

Thanks for the information. I will fix it ASAP. And you can create an issue in the github repo in future.

yaaashua:

  1. I created a scene, exported and loaded correctly, but after … I made a modification in Creator, several modifications, but the exported scene (*.creator ) remained unchanged, like the first time I exported it. I even restarted the application. The scene in CocosCreator displays all the changes, but the exported data remains like the first save, IDK why.

zhangxm: Did you use the plugin to build again?
----> yes, im only using the plugin.

yaaashua:
update: LOL, I even deleted the scenes and still appear in the exported data hahaha. Ill try the alpha0 now

zhangxm: What did you mean? You tried another version?
—> no, I mean I deleted from the cocosCreator the scenes that were creating problems, created a new scene, and after building the data (exporting using the plugin) the new scene was not exported, but the most interesting part is that the scenes that I previously deleted were actually exported by the plugin.
after some moment, seems like the exported data doesnt change, no matter how much you changes the scene.

as I mentioned, I found out how to reproduce this error:

-I just took everything from the example project and put it inside a folder “example”
-I created a new scene. As long as this scene does NOT use any of the contents of the “example” folder, everything is fine, but as soon as I place one sprite into the new scene… build script fails , and data is not exported.

Maybe is related to what @nicardo said, because it happened after moving things into a different folder,

I hope in this new version the prebuild will be by default

@yaaashua yep, it has problem if .fire is in subfolder.
@OscarLeif what did you mean prebuild. It is not cocos2d-x.

Is there any C++ method for instantiate a prefab?

1 Like

Currently not, and i am not sure if it is possible. This plugin will support as more features of creator as possible, but can not support all features.

1 Like

I experience some errors:
using the alpha0 project I created a scene, to use it in C++, after creating a RichText (i think thats the source of problems) and save it, the plugin fails trying to export.
I deleted the scene, since didnt know what from my scene was creating the error, but the error remains. So all I have is the alpha0 example project and is failing.

I check the files difference against the repository, and all I can see is there are some files created from my already deleted scene ( from folders: /ccreator , /json/ , temp/BackupAssets/assets/). I deleted this files hoping that this helps, but no.

(note: everything was in the same folder, I didnt create any subdirectory)

log:
WARNING: RichText support is an experimental feature
ERROR: convert_fire_to_json.py", line 793, in parse_properties
_ self._properties[‘backgroundImage’] = state.sprite_frames[sprite_frame_uuid][‘frameName’]

what I mean is this.
In order to have prebuild we should first setup the projects after we created, because this is not by default, I think changing that can save a lot of time and space in the hard drives.Well of course I don’t really know if changing this is easy or nor, of course I talk for the C++ version of the engine.
I will check if this new version of cocos creator 1.5 is more faster to develop (I receive an email talking about a release of Cocos Creator 1.5 and Cocos2d-x 3.15)

btw: I think label size (dimensions in C++) are missing when exported.

@yaaashua as the readme and log says, RichText is not completed.

They are two different issues, right? I don’t quite understand the issue. Could you please describe it how to reproduce it step by step? Thanks.

Could you please show me the wrong result or show me how to reproduce it?
Thanks.

@OscarLeif i think the engine used in cocos creator is binary by default, i am not sure. But the plugin is for cocos2d-x, could you please ask questions in creator category?

@zhangxm how to reproduce it? Im not exactly sure. All I did was:

  • open the example alpha0 project
  • added a new scene
  • added a layout
  • added 2 buttons and 1 label as children of layout
  • exported and loaded SUCESFULLY to c++
  • added another richtext label,
  • renamed the buttons and labels

—> and at this point… something went wrong and I could NOT export anymore…
—> then I deleted the scene (I didnt clear the scene, I removed the scene.fire) but still I was unable to export. I was screwed up with that project after that point. Script would always send error.


label size (dimensions in C++) are missing when exported

this is how I set up the label:

and this is the result:

  • c++ says that dimensions are ZERO and produces a one row label
  • you can see that if I manually (by code) set the dimensions to the values it should have from CCreator (500,90) the result is correct :slight_smile:

Thanks, i will try to reproduce it first.

Is it possible to have some documentation ??
I struggled last 2 hrs finding out that the hierarchy in cocoscreator is not the same that the nodes in C++

example: button text

  • creator: /button/label
  • C++: /btn. for changing text need to changing from button->SetString ( since Label doesnt exist)

example: button inside scrollview:

  • creator: scrollview/view/content/button
    this is translated into c++ as:
  • C++: scrollview/button

I know documentation is not the priority right now, and all of these diference can be found out by the programmer in a few days >_> but… really, it would be nice to be aware of all these diferences.
tnx

Hi,

  1. i am trying out this plugin for my project that is imported from .ccs
    However, after ‘exporting’, i only get the image files and but it does not generate the .ccreator files

  2. i am testing out the example project that comes with the git repo.
    first time opening the project has no issues, and i am also able to export.
    But after closing the project and trying to open it the 2nd time, the ‘Node Tree’ window is stuck with this ‘Loading…’ forever. And when i double click on any of the scenes, i also get this ‘Loading…’ forever.

Anyone else experiencing this same issue?
I’m using the latest cocos creator version.

@yaaashua I asked my colleague about the documentation.
@Darren_86 About issue 1, i think it is because there are some error happened. Is there any log?
About issue 2, i think it is an bug of creator. @jare @pandamicro any idea?

@zhangxm the only log i see is this:
preview server running at http://localhost:7456
1.4.2
ScaleX != ScaleY. Don’t know which one to return

which is shown when the project is opened.
Anyway, this issue is not a concern for my project as we are going to have a new UI… just considering if we should migrate to cocos creator.

Just to confirm, the cocos studio will no longer be usable after the flatbuffer upgrade in cocos2d-x 3.15 is that correct?

1 Like

If I create an empty node as child of a sprite,
. . . and I add a collider component to that child.

In C++ i dont even see the child of the sprite :confused:

how can I get the collider info in C++?
Is it even supported (or will it be) ?

Currently, convert_file_to_json.py parse uuid files from temp folder or assets folder. It is not enough, because many informations should get from creator. So i am working to rewrite it in the plugin, which means i will rewrite it in js and use creator’s API. First, i will make it work correctly with current examples, then i will add missing features.

PS: the original implementation is done by ricardo. It is done as a hack way, it parses .fire and use other meta files (the meta files in temp folder) to get filepath. What i have done currently is making it as a creator plugin. But i found i have to rewrite convert_file_to_json.py in plugin or it can not work correctly. For example, the files in temp folder may change, that’s why i found sometimes the plugin can not work without any modification.

2 Likes

Sorry you should not popup or close the Scene panel. We will improve it in next version.