Ignore AIClient/Library and AIClient/HybridCLRData permanently; include HybridCLR/YooAsset project setup and UI tooling. Co-authored-by: Cursor <cursoragent@cursor.com>
1.8 KiB
1.8 KiB
UI 图集自动化方案(AIGame 精简版)
参考 AIC#
Unity_UI自动图集制作方案.md。本仓库首期以 目录约定 + 单图 Sprite + YooAsset 为主;完整 SpriteAtlas 生成器作为后续里程碑。
1. 目标
- 美术/AI 把切图放入约定目录。
- 导入为
Sprite (2D and UI),关闭 mipmap。 - Prefab / 运行时按 Sprite 短名 引用(与 JSON
assets.sprites一致)。 - 后续:按子目录自动生成
.spriteatlas,构建时原图与图集同包。
2. 目录
AIClient/Assets/Bundles/UI/Texture/
Common/ # 通用控件(对应 UI_*_Set)
<Module>/ # 业务专用
AIClient/Assets/Bundles/UI/Atlas/ # (后续)自动生成的 .spriteatlas
中间产物仍可先落在 Tools/output/,再导入 Bundles。
3. 切图来源
- 选图集级别:
UI_Simple_Set/UI_Normal_Set/UI_Pic_Set。 Tools/gpt_image_generate.py生成(>1K 用gpt-image-2-vip,见ResourceCreate.md)。- 风格:
Doc/Design/UI_Design_Principles.md+ui_design.jpg。 - 切片坐标以对应
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#)
SpriteAtlasGenerator:扫描Texture/UI子目录 →Atlas/*.spriteatlasAtlasEnum/ 名字索引生成- YooAsset 收集规则:图集与原图同组
- 运行时
SetSprite(atlas, name)API(HotUpdate) - UI Prefab 依赖图集 JSON 审计
在里程碑完成前,JSON→Prefab 流水线使用 Common 单图路径 即可闭环。