Sorry if it is not right place to ask my question.
I have downloaded COCOS CREATOR and start with demo app but when i work with offline mode, it create issues as below:
{ [Error: getaddrinfo ENOTFOUND fbupdater.avosapps.comfbupdater.avosapps.com:80] code: ‘ENOTFOUND’, errno: ‘ENOTFOUND’, syscall: ‘getaddrinfo’, hostname: ‘fbupdater.avosapps.com’, host: ‘fbupdater.avosapps.com’, port: 80 } at ClientRequest. (/Applications/CocosCreator.app/Contents/Resources/app.asar/share/hot-updates.js:1:1902) at emitOne (events.js:77:13) at ClientRequest.emit (events.js:169:7) at Socket.socketErrorListener (_http_client.js:259:9) at emitOne (events.js:77:13) at Socket.emit (events.js:169:7) at connectErrorNT (net.js:993:8) at doNTCallback2 (node.js:441:9) at process._tickCallback (node.js:355:17)
Can you please help me solve that issue? Is there any issue in setup Cocos Creator?
In offline mode, it’s normal to see these messages, the first one is the communication with our login server, the second one is the hot update request to see whether a new version is out.
Did they block any usage in Creator ? If not, you can just ignore them
I’m using Cocos Creator since a few days, and while I still have a lot to discover, I do enjoy using it more and more day after day: great job guys!!
I have a bug report and a couple of suggestions:
Bug Report (I’m using the Mac version):
very often, when using the build in JavaScript editor (the one opening a standalone window), it hangs after I start making some changes in the source code
(the autocompletion did not seemed to start so I don’t think it is autocompletion related)
(it maybe happen more often when I create variables outside cc.Class({}); block, like: var Utils = require(‘Utils’); )
It’s not a big deal as I can just kill the window related to the JavaScript Editor (which was using ~100% CPU) without exiting the project, but I wanted to mention it.
Suggestions (build related) - it would be great if it was possible to:
being able to start the build process from the command line
automatically start a pre-build script
automatically start a post-build script
specify the real build directory name, without having a platform name directory (native, web-mobile etc) added to it
Is there any git repo where is available the latest version of Cocos Creator?
Thank you for your suggestions, the first one is already supported in the dev version. We will discuss how to support pre & post build scripts, I also think it’s a great idea personally. The last one, you mean unified build directory for web & native ?
Yes, your project will be compatible across the versions, and for major version update, we might introduce some difference, but will also provide a upgrade tool or something.
As for now, we are in public beta, and we haven’t reach 1.0 yet, the APIs may still change, it is possible, we will give clear informations about the changes to help you fix issues caused by API change. But in any way, your project will be compatible with 1.0 and future versions.
I mean that the directory specified should be the one really used to put the generated files, not a directory name in which there will be an other subdirectory (like ‘native’, ‘web-mobile’ etc).
PS: How can I start the build process from the command line? I tried /Applications/CocosCreator.app/Contents/MacOS/CocosCreator --help but it just started an other session of Cocos Creator
You need to use cocos console, normally if you can successfully build native package via Creator, it means you already got one. Just do the following in your native build path:
When Cocos Creator build the project it will compress and replace the original main.js file which make it unable to put in new code. Even I paste the new code in main.js after building process completed, it will not update the resolution policy also.
In the build\jsb\src\jsb_polyfill.js file, line 3986, there is no EXACT_FIT resolution policy. I guess that is the reason it is not supported? Sorry, I am newbie in cocos2dx
applySettings: function() {
var ResolutionPolicy = cc.ResolutionPolicy;
var policy;
if (this.fitHeight && this.fitWidth) {
policy = ResolutionPolicy.SHOW_ALL;
} else {
if (!this.fitHeight && !this.fitWidth) {
policy = ResolutionPolicy.NO_BORDER;
} else {
if (this.fitWidth) {
policy = ResolutionPolicy.FIXED_WIDTH;
} else {
policy = ResolutionPolicy.FIXED_HEIGHT;
}
}
}
var designRes = this._designResolution;
if (false) {
cc.engine.setDesignResolutionSize(designRes.width, designRes.height);
} else {
cc.view.setDesignResolutionSize(designRes.width, designRes.height, policy);
}
}
@pandamicro when I try to connect an android device to Cocos Creator using url for local network, in the “connected device counter” appears like connected but in the device only shows a screen of “Powered by Cocos Creator”.
Hi pandamicro. Nope. It is not working. Cocos Creator will replace every code that I have changed when I click build button and it will run those in jsb_polyfill.js. The only solution is temporary by hard-coded into \jsb\src\jsb_polyfill.js file after build.
You can see the following code that I have added to force it change resolution policy to EXACT_FIT because there is no logic to assign this value anywhere.
Maybe need to fix this in Cocos Creator editor source code?
policy = ResolutionPolicy.EXACT_FIT;
Original Code in \jsb\src\jsb_polyfill.js file
applySettings: function() {
var ResolutionPolicy = cc.ResolutionPolicy;
var policy;
if (this.fitHeight && this.fitWidth) {
policy = ResolutionPolicy.SHOW_ALL;
} else {
if (!this.fitHeight && !this.fitWidth) {
policy = ResolutionPolicy.NO_BORDER;
} else {
if (this.fitWidth) {
policy = ResolutionPolicy.FIXED_WIDTH;
} else {
policy = ResolutionPolicy.FIXED_HEIGHT;
}
}
}
var designRes = this._designResolution;
if (false) {
cc.engine.setDesignResolutionSize(designRes.width, designRes.height);
} else {
cc.view.setDesignResolutionSize(designRes.width, designRes.height, policy);
}
}
Modified Code in \jsb\src\jsb_polyfill.js file
applySettings: function() {
var ResolutionPolicy = cc.ResolutionPolicy;
var policy;
if (this.fitHeight && this.fitWidth) {
policy = ResolutionPolicy.SHOW_ALL;
} else {
if (!this.fitHeight && !this.fitWidth) {
policy = ResolutionPolicy.NO_BORDER;
} else {
if (this.fitWidth) {
policy = ResolutionPolicy.FIXED_WIDTH;
} else {
policy = ResolutionPolicy.FIXED_HEIGHT;
}
}
}
policy = ResolutionPolicy.EXACT_FIT; // My added code. It works!
var designRes = this._designResolution;
if (false) {
cc.engine.setDesignResolutionSize(designRes.width, designRes.height);
} else {
cc.view.setDesignResolutionSize(designRes.width, designRes.height, policy);
}
}