1. 打开模板功能
    不知道什么原因,cocos 3.16关闭了模板功能,因此使用cocos -h命令时,无法显示gen-templates参数。
    打开的方式也挺简单,打开tools/cocos2d-console/bin/cocos2d.ini文件,修改将28行“#plugin_generate.TemplateGenerator”前的注释去掉。

  2. 生成预编译库
    cocos gen-libs

  3. 生成模板
    cocos new -t binary

  4. 生成工程
    cocos new test -p com.test.test1 -t binary -l lua --portrait

    如果要生成竖屏,还需要修改config.json文件中的"isLandscape"为false

相关文章:

  • 2021-09-13
  • 2022-12-23
  • 2022-12-23
  • 2021-05-28
  • 2021-04-25
  • 2021-10-16
  • 2021-12-11
  • 2022-12-23
猜你喜欢
  • 2021-04-11
  • 2021-08-12
  • 2022-12-23
  • 2021-12-02
  • 2021-10-24
  • 2022-03-04
  • 2021-04-30
相关资源
相似解决方案