[已解决]cocos2d -js无法使用cocos Studio v2.0.6 发布的csb资源

我只是修改了最基本的例子程序:
1、代码
var HelloWorldScene = cc.Scene.extend({
onEnter:function () {
this._super();
this._node = ccs.csLoader.createNode(res.test);
this.addChild(this._node);
}
});
2、资源文件
var res = {
HelloWorld_png : “res/HelloWorld.png”,
CloseNormal_png : “res/CloseNormal.png”,
CloseSelected_png : “res/CloseSelected.png”,
test:“res/BaseRoom.csb”
};

var g_resources = ];
for (var i in res) {
g_resources.push(res);
}

3、报错
suffix = csb
JS: F:/CompanyWorkspace/CocosJSGame0000/runtime/win32/…/…/src/app.js:5:Error: js_cocos2dx_Node_addChild : wrong number of arguments
为什么用不了呢?求各位大大帮忙,谢谢了~~~~

so so so so so :9:

我会告诉你cocos2d-JS3.2不支持cocos studio2.x导出的资源,但是3.1是支持的。

我用的是3.1的版本

结贴:JS3.1的版本不支持cocos studio v2.0.2以上版本导出的资源文件

Cocos Studio v2.0.6采用的是flatbuffer格式的csb,之后的版本也是,Cocos2d-JS都不支持。

Cocos Studio会同时支持csb和json,其中Cocos2d-JS使用json格式。

对于JS来讲,json是最高效的,也最方便,Cocos2d-JS v3.3会支持最新版本的Studio导出的json格式,同时向前兼容v1.x版本studio导出的json。

大家如果有什么需求无法得到满足,可以在这里跟帖回复,谢谢。

Cocos Studio v2.0.6采用的是flatbuffer格式的csb,之后的版本也是,Cocos2d-JS都不支持。

Cocos Studio会同时支持csb和json,其中Cocos2d-JS使用json格式。

对于JS来讲,json是最高效的,也最方便,Cocos2d-JS v3.3会支持最新版本的Studio导出的json格式,同时向前兼容v1.x版本studio导出的json。

大家如果有什么需求无法得到满足,可以在这里跟帖回复,谢谢。

cocos2d-js 3.6.1
var LoginLayer=cc.ModuleLayer.extend({
_data:null,

init:function(data){
    var bRef = false;
    if(this._super()){
       var me = this;
        var bg = cc.Sprite.createWithDynamicRes(img_login_newBG);
        bg.setAnchorPoint(cc.p(0,0));
        this.addChild(bg);

});
LoginLayer.create=function(){
var layer=new LoginLayer();
if(layer&&layer.init()){

    return layer;
}
return null;

}

LoginLayer.scene=function(){
var father = CommonFather.scene();
var scene= father.getScene();
var layer = father.getLayer();

layer.addChild(LoginLayer.create());

return scene;

}

现在 layer.addChild(LoginLayer.create()); 这句报错了
js_cocos2dx_Node_addChild : wrong number of arguments

请版主赐教吧,:3::3::3::3:
按照提示给addChild三个参数也是一样的报错。。。
/**

  • @method addChild

  • @param {cc.Node|cc.Node|cc.Node|cc.Node} node

  • @param {int|int|int} int

  • @param {int|String} int
    */
    addChild : function(
    node,
    int,
    str
    )
    {
    },

    layer.addChild(LoginLayer.create(),10,10 ); 还是一样的错误