Cocos Creator v1.1.2 released!

There are two layers of engine customization: JavaScript and C++.

I am confused. If you don’t yet support C++, what does the above statement mean?

You can’t yet write code in C++, This mean, that you can use customised c++ engine for mobile compilation, but code you should write with JavaScript

1 Like

When I’m trying to import project from Cocos Studio I’m getting a lot of these warnings:

It’s not recommended to use SpriteFrame constructor (new SpriteFrame) to create SpriteFrame instance since it’s memory will be unable to manage. Instead please use cc.loader.loadRes to get SpriteFrame instance from loading, or define a cc.SpriteFrame property in your component and drag the SpriteFrame onto it.

Also files are imported to certain scene and then it fails with error:

Error: EISDIR: illegal operation on a directory, read
    at Error (native)
    at Object.fs.readSync (fs.js:651:19)
    at Object.fs.readFileSync (fs.js:472:24)
    at Object.fs.readFileSync (ATOM_SHELL_ASAR.js:449:29)
    at _importCSDFile (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/project-importer/core/studio/csd-importer.js:1:522)
    at /Applications/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/project-importer/core/studio/csd-importer.js:1:26646
    at fn (/Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:746:34)
    at /Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:1213:16
    at /Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:166:37
    at /Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:706:43
    at EventEmitter.e (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor/builtin/project-importer/main.js:1:204)
    at EventEmitter.g (events.js:260:16)
    at emitTwo (events.js:87:13)
    at EventEmitter.emit (events.js:172:7)
    at EventEmitter.<anonymous> (/Applications/CocosCreator.app/Contents/Resources/atom.asar/browser/api/web-contents.js:134:25)
    at emitTwo (events.js:87:13)
    at EventEmitter.emit (events.js:172:7)

[SOLVED]
Turns out, it was a particular prefab that I was referencing that was causing the build to fail. The issue seems to be that the prefab has a reference to another prefab which had a Sprite component with no spriteframe. This was a strange issue and I wish there was a better error indicating the problem so I could have tracked it down more easily.

[ORIGINAL]
Since upgrading to v1.1.2, I’ve been having issues running native builds for my application. I have a node with a custom component that has a reference to a prefab. That reference to the prefab breaks the build and gives me the following error:

Build Failed: Error: ENOENT: no such file or directory, open ‘/Development/3mg/flytRepo/jsb-default/res/import/d7/d75e07fb-4f8b-4376-9dfe-14adc1eb5072.json’
2
at Error (native)
at /Applications/CocosCreator.app/Contents/Resources/app.asar/editor/core/builder.js:1:1647
at Gulp.doneCallback (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor/core/gulp-build.js:1:9307)
at Gulp.Orchestrator.stop (/Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/orchestrator/index.js:150:9)
at r (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor/core/gulp-build.js:1:3197)
at /Applications/CocosCreator.app/Contents/Resources/app.asar/editor/core/gulp-build.js:1:5832
at EventEmitter. (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor-framework/lib/main/ipc.js:1:7874)
at emitMany (events.js:108:13)
at EventEmitter.emit (events.js:182:7)
at EventEmitter. (/Applications/CocosCreator.app/Contents/Resources/atom.asar/browser/api/web-contents.js:134:25)

If I remove the reference to the prefab from the component on the node, the build works. I’ve got other types of properties on the component including Nodes and numbers but the prefabs appear to be the problem. I was not having this issue in the previous version of Cocos Creator and was able to build and deploy to both iOS and Android successfully.

Is there something I need to do to correct this issue or does this sound like a bug?

Thank you!

Example of the custom component script:

cc.Class({
    extends: cc.Component,

    properties: {
        playerSpawn: cc.Node,
        enemyDeathZone: cc.Node,
        enemySpawn: cc.Node,
        playerPrefabTest: cc.Prefab, <- this breaks the build when the property is referencing an actual prefab asset

Hello cocos team,
I’m very happy with the Cocos-Creator productivity, cotinuos updates and new fetures.
It’s nice to see the community getting bigger.
thanks for all

1 Like

I just installed and try v1.1.2 : there is still the same bug with the Cocos Studio importer I reported on previous version : Cocos Creator v1.1.1 released!

Are you going to fix ? Do I need to fill a bug report somewhere ?

I also have a “bug report.” I made a post here:

Anywhere we can report these to?
Thanks.

I’m confused too. You had a quite good tool “cocos” where I was able to create new projects and connect them directly on xcode/android studio/whatever where is now everything? Why you cancelled it and substituted with something incomplete insted of supporting both?

FWIW, I feel the same way. I used the Cocos GUI app for a lot. I voted that we keep it around and I lost that vote.

Happy to see that someone share the same opinion.
Sad to see that the final decision was to cancel Cocos GUI instead mantain it or of release the code. That decision bring some trouble to me. I was struggling to keep my team on Cocos but that could change everything, if your focus is the web.

our focus is not the web. Yes we support the web but we also support C++, Lua, JavaScript all on the desktop and native mobile apps. On top of that, the web too :slight_smile:

1 Like

But the C++ support seems to be less than the JavaScript support. I’m not talking at the API level but on tool level. Everything was going in the right way with Cocos but now introducing Cocos Creator everything it’s getting more difficult if you are working on a native app.

Furthermore is CocoStudio.h going to be deprecated?

Cocos Studio is indeed EOL’d. I’ll create a GitHub issue to deprecate cocosstudio.h

Yes, tool wise Creator is JavaScript. C++ and Lua are being added to it. This takes a bit of time as you can imagine.

Difficult, perhaps, if you have relied on our tools. We have EOL’d tools and totally threw you all for a tale spin with others. The upside is that we are improving and the quality of the tools is a lot better. Creator is a much better tool than Studio. We just need to keep improving Creator until we get our users everything they need to make their games.

2 Likes

Hi @slackmoehrle

Which time and version CC support intergrade SDKBOX?

The future is mobile, and we are in the future already. Good thing Im learning JS which means I can use it in Cocos Creator hahaha.

I just wish everything is translated to English from Chinese.

1 Like

I don’t know. I’d ask the SDKBOX team.

Man, this is was dumb move and I’m guessing you pissed off a lot of developers who are have apps published on Apple Store and Google Play…
I have my game developed on C++ and published since October last year using Cocos2d-x v3.6 and I was happy so far with it, until I decided to improve it’s performance on Android and add some other features. So, I decided to upgrade it to the latest version of Cocosd2-x v3.13(which hasn’t been released yet, but the code is on github) because it adds support for ETC1 with Alpha. After making all the changes to make my game work with the new version I was surprised to see that my scenes created on Cocos Studio didn’t work as expected, sprites not being loaded anymore, etc… I decided to see if there was an update and I found out that Cocos Studio is deprecated supporting up to version Cocos2d-x V3.10 and it may not work with latest versions.
So, I downloaded Cocos Creator to find out that it’s purely JS.
I’m stuck now with a new Cocos2d-x V3.13 with the feature I want and my scenes don’t work anymore.
The only solution I see is to migrate my code to version V3.10 and try to implement myself the ETC1 support for alpha on it.

You could also use Creator just as a scene editor, but unfortunately, you’ll have to write your own parser and loader since right now, there isn’t one in the C++ version, only on LUA as far as I understood.

It made me mad too. Anyway you can use 3.11 - cocos studio still works there. 3.12 breaks everything.

Also, cocos creator will support c++ in the future (nobody knows when), but I’m worried about migrating old scenes. Now in cocos creator you can import cocos studio project and I made few tests on my projects and always got some import errors…

I’d like to know the same thing. Can you let me know what they say. @mbgtcx