1.给lua增加包名的时候,在 TOLUA_API int register_all_cocos2dx_xxx(lua_State* tolua_S) 函数的
tolua_module(tolua_S,nullptr,0);
tolua_beginmodule(tolua_S,nullptr);
下面增加包名
tolua_module(tolua_S,"xxx",0);
tolua_beginmodule(tolua_S,"xxx");
结尾处多写一条
tolua_endmodule(tolua_S);
2. 接上面增加了lua包名后,生成binding文件会报错
conversion wasn't set in 'ns_map' section of the conversions.yaml
修改 frameworks/cocos2d-x/tools/bindings-generator/targets/conversions.yaml
在 ns_map下增加一条新的包名信息
"c++命名空间::": "lua包名."