Files
AIGame/.cursor/rules/aigame-basics.mdc
T

35 lines
2.7 KiB
Plaintext
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.
---
description: AIGame 项目基础规则(资源登记、UI 自动生成等必须遵守)
alwaysApply: true
---
# AIGame 项目说明
## 基础规则
1. **资源登记(必须)**:所有资源生成完成后,必须按类型追加到对应描述文件,并写明简要说明(用途、路径、生成方式等)。未登记视为流程未完成。
- 索引:`Doc/ResDesc.md`
- model → `Doc/ResDesc_Model.md`
- animation → `Doc/ResDesc_Animation.md`
- picture → `Doc/ResDesc_Picture.md`
- sound → `Doc/ResDesc_Sound.md`
- effect → `Doc/ResDesc_Effect.md`
2. **3D 游戏网格**:导出 FBX 为 Y-up、原点在底面中点、**局部 +Z 为正面**。摆场景时让 +Z 朝向目标,使用 Unity `transform.forward` / `Quaternion.LookRotation(direction)`。旧 -Z 资产按明确的旧资源配置兼容,不自动翻转。配置见 `Config/Art/ModelConvention.json`,详见 `GameResProductProc.md` 附录 B。
3. **UI 自动生成(必须)**:业务面板使用 JSON→Prefab 管线,不要用运行时临时代码拼业务 UI 替代 Prefab。
- 总览:`Doc/UI_AutoGen_Overview.md`
- 提示词契约:`Doc/Rule/UIGenerationPrompt.md`
- 规则详解:`Doc/Rule/UIGenerationRules.md`
- 工程约定:`Doc/Rule/UnityUIProject.md`
- JSON:`Doc/UIPrefabCreater/{UIName}.json`
- Prefab:`Assets/Bundles/UI/Prefab/{UIName}.prefab`
- 通用贴图:`Assets/Bundles/UI/Texture/Common/`
- 标准控件底图必须使用九宫格:Sprite 设置有效的非零 `Border`、`Full Rect`,JSON 使用 `imageType: Sliced`;按钮各状态图同样设置。图标、插画等整图按原比例使用。
- 设计分辨率:竖屏 **`[1080, 1920]`**(不要用参考项目的 2048×1024)
- Unity 菜单:`Tools/UI/...`;转换器:`AIClient/Assets/Editor/UI/`
4. **人形角色蒙皮默认方案**:固定 Mixamo 骨架 + TokenRig 只预测蒙皮权重。先按角色体型拟合骨架,推理时固定骨架;生成权重后恢复并校验原骨名、层级、骨轴和休息矩阵,检查跨部位错误影响并做必要清理。具体流程见 `GameResProductProc.md`「二.2.A 人物角色」。
5. **新场景组件模型默认流程**:所有新组件(含独立地表)采用「分件图 → 混元 50k 高模 → Studio 低模 → Studio UV → Blender 同源对齐烘焙 → 实际面数严格超过目标 130% 时保留 UV 减面」。不得用 Blender 自动 UV 替代 Studio UV;未超过阈值须登记跳过。统一入口 `Tools/scene_component_pipeline.py`,细则见 `Doc/Design/Scene/SceneModelProduction.md`。已有 Prefab 可在外观验收后复用;既有模型回执保留真实历史。TownSquare 测试内容已删除,不再生成或注册为加载/打包入口。