XtGameKit/Doc/Luban-Guide.md

26 lines
620 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Luban 使用说明(最小链路)
## 目录约定
- Schema`Config/Defines`
- Data`Config/Datas`
- 生成 C#`My project/Packages/cn.etetet.config/Scripts/Model/Share/cfg`
- 生成 Json`My project/Bundles/Config`
## 命令
在仓库根目录执行:
`powershell -ExecutionPolicy Bypass -File "tools/luban/gen.ps1"`
## 运行时接入
- 场景挂载:`ConfigComponent`
- 读取入口:`scene.Cfg()`
- 示例:`scene.Cfg().TbItem.Get(1)`
## 注意
- 当前 `cfg.Tables` 为占位实现,后续应由 Luban 正式生成结果覆盖。
- 新增表一律先补 `bean.xml`,再补数据文件。