Skip to content

TCG Kit

A complete framework for building trading card games in Unity: a rules engine you configure with assets and a visual ability editor, a ready-made match screen, a computer opponent, collection, deck building and booster packs, online play, and the editor tools to put it all together. It ships with Mana and Minions, a small finished game that uses every part.

Every part can be replaced from your own code without editing the kit. See Extending the Kit.

  • Unity 6000.6 or newer.
  • uGUI (com.unity.ugui, which includes TextMesh Pro). Unity’s project templates include it; install it from the Package Manager if your project does not have it.
  • Optional: Netcode for GameObjects 2.x (com.unity.netcode.gameobjects) for online play. Without it everything else works and the online parts are simply skipped.
  • Either input system. The sample adds the UI input module that suits your project’s input settings when a scene starts (AutoInputModule).
  • Optional: the Test Framework (com.unity.test-framework) to run the kit’s tests.
  1. Getting Started: import, play the sample, make your own game.
  2. How It Works: the ideas behind the kit, in two pages.
  3. Building Your Game: zones, stats, resources, turns, cards, decks.
  4. Abilities and Rules: the graph editor and every node.
  5. The Match Screen: board, cards, layouts, animation, input.
  6. Computer Opponents.
  7. Collection, Decks and Packs.
  8. Online Play.
  9. Editor Tools: wizard, card browser, validator, match debugger.
  10. Extending the Kit: replacing any part with your own code.
  11. Testing, Replays and Determinism.
  12. Limitations and FAQ.

The full source is included. Every public class and member has XML documentation, so your IDE shows it as you type.

Folder Contents
Runtime/Core The rules engine. Plain C# with no reference to UnityEngine.
Runtime/Definitions The assets you edit: games, cards, zones, stats, decks, packs and so on.
Runtime/Presentation The match screen, deck builder and shop.
Editor The graph editor, wizard, card browser, validator and match debugger.
Integrations/NetcodeForGameObjects Online play. Compiled only when Netcode for GameObjects is installed.
Samples/ManaAndMinions The sample game.
Tests Edit mode and play mode tests for all of the above.
Documentation These pages.

Keep your own game outside Assets/TCGKit, so updating the kit never overwrites your work.