Skip to content

CardDealerManager

Tiny sample spawner to create cards at runtime for demos and tests.

Inspector

Field Type Description
cardPrefabs GameObject[] Array of card prefabs to instantiate from.
cardHolder Transform Parent transform that will receive new cards (should be the CardHand).
cardCount int How many cards to auto‑spawn on Start.

Public API

Method Returns
DrawCard void

Usage

// Attach this script to any GameObject outside the Canvas
// Assign: cardPrefabs[], and set cardHolder to your UI Hand object
// During play, call:
GetComponent<CardDealerManager>().DrawCard();