Modular Card Prefab¶
ModularCardBase defines the visual layout. ModularCardView assigns data to its slots.
Expected hierarchy¶
ModularCardBase
├── CardArt
├── CardDesc
│ └── Text (TMP)
├── EdgeLeft
├── EdgeRight
├── CornerTopLeft
├── CornerTopRight
├── CornerBotLeft
├── CornerBotRight
├── OrnamentTop
├── OrnamentBottom
├── NamePlate
│ └── Text (TMP)
├── Attack
│ └── Text (TMP)
├── Defense
│ └── Text (TMP)
├── Mana
│ └── Text (TMP)
└── Gem
Automatic binding¶
- Add
ModularCardViewto the root. - Press Auto Assign From Prefab.
- Confirm all Image and TMP fields are populated.
- Press Refresh Preview.
Automatic binding uses the object names above.
Reusable prefab rule¶
For cards created by CardDealerManager, save the prefab with:
The dealer assigns the Card Definition at runtime. The Card Definition then selects its own template.
One prefab, many cards¶
Do not create one prefab per character unless a card requires a genuinely different hierarchy. One modular prefab plus multiple data assets is easier to maintain and update.