docs: align picker layout with JSON builder

This commit is contained in:
ud18010
2026-08-04 15:14:31 +08:00
parent 7cbea6186c
commit 64cb3fb737
@@ -245,7 +245,7 @@ The JSON nodes must have this hierarchy and behavior:
│ │ ├─ Img_PreviewAvatar preview Image │ │ ├─ Img_PreviewAvatar preview Image
│ │ └─ Txt_PreviewHint preview hint text │ │ └─ Txt_PreviewHint preview hint text
│ ├─ Scroll_Avatars ScrollRect, vertical only │ ├─ Scroll_Avatars ScrollRect, vertical only
│ │ └─ Content_Avatars GridLayoutGroup, six fixed columns │ │ └─ Content_Avatars fixed RectTransform content
│ │ └─ AvatarSlot_01..54 six columns by nine rows │ │ └─ AvatarSlot_01..54 six columns by nine rows
│ │ ├─ Btn_Avatar_XX Image + Button │ │ ├─ Btn_Avatar_XX Image + Button
│ │ ├─ Img_Avatar_XX matching GamerPic Image │ │ ├─ Img_Avatar_XX matching GamerPic Image
@@ -254,7 +254,7 @@ The JSON nodes must have this hierarchy and behavior:
│ ├─ Btn_Cancel secondary Button │ ├─ Btn_Cancel secondary Button
│ └─ Btn_Confirm primary Button │ └─ Btn_Confirm primary Button
Use a ScrollRect and GridLayoutGroup supported by the existing JSON builder. Use six columns, nine rows, 116×116 cell size, 18×18 spacing, 24 padding, and enough content height for all 54 nodes. Add bindings for Img_Mask, Btn_Close, Img_PreviewAvatar, Btn_Cancel, Btn_Confirm, Scroll_Avatars, and every avatar button/preview/selected node. Add events PlayerProfile.CancelAvatarPicker for mask/close/cancel, PlayerProfile.ConfirmAvatarPicker for confirm, and PlayerProfile.SelectAvatar_XX for each avatar button. Use the ScrollRect component supported by the existing JSON builder and set Content_Avatars as its content. Do not use GridLayoutGroup because the builder does not implement it; position all 54 slots explicitly under Content_Avatars in six columns and nine rows, using 116×116 cells, 18×18 spacing, 24 padding, and enough content height for all rows. Add bindings for Img_Mask, Btn_Close, Img_PreviewAvatar, Btn_Cancel, Btn_Confirm, Scroll_Avatars, and every avatar button/preview/selected node. Add events PlayerProfile.CancelAvatarPicker for mask/close/cancel, PlayerProfile.ConfirmAvatarPicker for confirm, and PlayerProfile.SelectAvatar_XX for each avatar button.
- [ ] **Step 3: Validate and generate the Prefab through Unity** - [ ] **Step 3: Validate and generate the Prefab through Unity**