Files
AIGame/Doc/UI_Atlas_Pipeline.md
T
udxandCursor b7a0bbcb89 Add hot-update boot pipeline, UI bundles/atlas assets, and design docs.
Ignore AIClient/Library and AIClient/HybridCLRData permanently; include HybridCLR/YooAsset project setup and UI tooling.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-21 16:02:58 +08:00

47 lines
1.8 KiB
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.
# UI 图集自动化方案(AIGame 精简版)
> 参考 AIC# `Unity_UI自动图集制作方案.md`。本仓库首期以 **目录约定 + 单图 Sprite + YooAsset** 为主;完整 SpriteAtlas 生成器作为后续里程碑。
## 1. 目标
- 美术/AI 把切图放入约定目录。
- 导入为 `Sprite (2D and UI)`,关闭 mipmap。
- Prefab / 运行时按 **Sprite 短名** 引用(与 JSON `assets.sprites` 一致)。
- 后续:按子目录自动生成 `.spriteatlas`,构建时原图与图集同包。
## 2. 目录
```text
AIClient/Assets/Bundles/UI/Texture/
Common/ # 通用控件(对应 UI_*_Set)
<Module>/ # 业务专用
AIClient/Assets/Bundles/UI/Atlas/ # (后续)自动生成的 .spriteatlas
```
中间产物仍可先落在 `Tools/output/`,再导入 Bundles。
## 3. 切图来源
1. 选图集级别:`UI_Simple_Set` / `UI_Normal_Set` / `UI_Pic_Set`。
2. `Tools/gpt_image_generate.py` 生成(>1K 用 `gpt-image-2-vip`,见 `ResourceCreate.md`)。
3. 风格:`Doc/Design/UI_Design_Principles.md` + `ui_design.jpg`。
4. 切片坐标以对应 `Doc/UI_*_Set.md` 为准;登记 `Doc/ResDesc_Picture.md`。
## 4. 导入建议
- Texture Type:`Sprite (2D and UI)`
- Sprite Mode:单图 `Single`;整图集再切为 `Multiple`
- Mesh Type:`Full Rect`(九宫格)
- Alpha Is Transparency:开
- 原图尽量不压缩;压缩留给图集/平台 override
## 5. 后续里程碑(对齐 AIC#)
1. `SpriteAtlasGenerator`:扫描 `Texture/UI` 子目录 → `Atlas/*.spriteatlas`
2. `AtlasEnum` / 名字索引生成
3. YooAsset 收集规则:图集与原图同组
4. 运行时 `SetSprite(atlas, name)` API(HotUpdate)
5. UI Prefab 依赖图集 JSON 审计
在里程碑完成前,JSON→Prefab 流水线使用 **Common 单图路径** 即可闭环。