

























打开模板功能
不知道什么原因,cocos 3.16关闭了模板功能,因此使用cocos -h命令时,无法显示gen-templates参数。
打开的方式也挺简单,打开tools/cocos2d-console/bin/cocos2d.ini文件,修改将28行“#plugin_generate.TemplateGenerator”前的注释去掉。
生成预编译库
cocos gen-libs
生成模板
cocos new -t binary
生成工程
cocos new test -p com.test.test1 -t binary -l lua --portrait
如果要生成竖屏,还需要修改config.json文件中的"isLandscape"为false
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。