Match-3 — Unity 6 core
MatchBoard.cs is a minimal match-3 loop for Unity 6: colored cubes, click-to-swap, match detection, gravity, and cascades. The portfolio also ships Fruit Crush in the browser (levels, score, combos).
Setup in Unity
- Create a new 3D project in Unity 6.3 LTS (URP or Built-in).
- Copy
MatchBoard.csfrom the repo intoAssets/Scripts/. - Hierarchy: Create Empty → rename Board.
- Add component Match Board to Board.
- Keep Main Camera in the scene (default).
- Press Play — click one tile, then an adjacent tile, to swap.
Source
Download the script for Unity 6, or browse the full repo on GitHub:
Web vs Unity
- Unity — foundation only: swap, clear, gravity, refill. Hook score/combos in
ResolveCascades. - Fruit Crush (web) — same core idea plus endless levels, targets, moves, combo multipliers, touch/swipe.