Skip to content

Card Definitions

CardDefinition is a ScriptableObject containing card-specific content.

Fields

Group Fields
Identity Card ID, name, description, rarity
Stats Attack, defense, mana
Design Design template, character icon, card color, accent color

Each card receives a persistent internal ID automatically.

Create a card

Use either:

  • Create → CardFanUI → Card Definition
  • Tools → CardFanUI → Create Card Definition

The Tools command stores new cards under:

CardFanUIData/Cards/

Card-specific versus shared data

Store character art, text, stats, and rarity on the Card Definition. Store frames, corners, edges, ornaments, badges, and typography colors on the shared Card Design Template.

This separation allows many characters to reuse one visual theme.

Runtime assignment

modularCardView.SetCard(cardDefinition);

The view refreshes text, character artwork, template parts, gem, and colors.