Install
$ agentstack add skill-xeldaralz-everything-claude-unity-match3 ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
Match-3 Puzzle Patterns
Grid System
public sealed class Board : MonoBehaviour
{
[SerializeField] private int _width = 7;
[SerializeField] private int _height = 9;
[SerializeField] private float _cellSize = 1f;
[SerializeField] private TileDefinition[] _tileTypes;
private Tile[,] _grid;
private void Awake()
{
_grid = new Tile[_width, _height];
}
public Vector3 GridToWorld(int x, int y)
{
float offsetX = (_width - 1) * 0.5f;
float offsetY = (_height - 1) * 0.5f;
return new Vector3((x - offsetX) * _cellSize, (y - offsetY) * _cellSize, 0f);
}
public bool IsValidPosition(int x, int y)
{
return x >= 0 && x = 0 && y _tileId;
public Sprite Sprite => _sprite;
public Color Color => _color;
public TileType Type => _type;
}
public enum TileType
{
Normal,
StripedHorizontal,
StripedVertical,
Wrapped,
ColorBomb,
Blocker,
Ice,
Chain
}
Swap & Match Detection
public sealed class MatchDetector
{
private readonly Board _board;
private readonly List _matchBuffer = new(16);
public MatchDetector(Board board) { _board = board; }
public List FindAllMatches()
{
_matchBuffer.Clear();
FindHorizontalMatches();
FindVerticalMatches();
return _matchBuffer;
}
private void FindHorizontalMatches()
{
for (int y = 0; y = 3)
{
MatchResult match = new MatchResult();
match.Direction = MatchDirection.Horizontal;
for (int mx = matchStart; mx = 3)
{
MatchResult match = new MatchResult();
match.Direction = MatchDirection.Vertical;
for (int my = matchStart; my matches = _detector.FindAllMatches();
int comboCount = 0;
while (matches.Count > 0)
{
comboCount++;
yield return StartCoroutine(DestroyMatches(matches, comboCount));
yield return StartCoroutine(ApplyGravity());
yield return StartCoroutine(RefillBoard());
matches = _detector.FindAllMatches();
}
CheckLevelObjective();
EnableInput();
}
Special Tile Rules
| Match | Creates | |-------|---------| | 4 in a row | Striped tile (clears row or column) | | L or T shape | Wrapped tile (explodes 3x3 area) | | 5 in a row | Color bomb (clears all of one color) |
| Combo | Effect | |-------|--------| | Striped + Striped | Cross clear (row + column) | | Striped + Wrapped | 3-row or 3-column clear | | Wrapped + Wrapped | 5x5 explosion | | Color bomb + any | Clears all tiles of that color | | Color bomb + Color bomb | Clears entire board |
Touch Input for Swap
- Drag threshold: 0.5 cells (half the cell size)
- Only allow horizontal/vertical swaps (snap to nearest direction)
- Invalid swap: animate swap then swap back
- Disable input during cascade animation
Level Objectives
- Score target: reach N points in M moves
- Clear blockers: destroy all ice/chain tiles
- Collect items: match next to items to collect them
- Reach bottom: guide special tile to bottom row
Lives / Energy System
public sealed class LivesSystem : MonoBehaviour
{
[SerializeField] private int _maxLives = 5;
[SerializeField] private int _regenMinutes = 30;
private int _currentLives;
private System.DateTime _lastLifeLostTime;
public int CurrentLives => _currentLives;
public bool HasLives => _currentLives > 0;
public void UseLive()
{
if (_currentLives = _maxLives) return;
System.TimeSpan elapsed = System.DateTime.UtcNow - _lastLifeLostTime;
int livesRegened = (int)(elapsed.TotalMinutes / _regenMinutes);
if (livesRegened > 0)
{
_currentLives = Mathf.Min(_maxLives, _currentLives + livesRegened);
_lastLifeLostTime = _lastLifeLostTime.AddMinutes(livesRegened * _regenMinutes);
Save();
}
}
private void Save()
{
PlayerPrefs.SetInt("Lives", _currentLives);
PlayerPrefs.SetString("LastLifeLost", _lastLifeLostTime.ToBinary().ToString());
PlayerPrefs.Save();
}
}
Performance Notes
- Pool all tiles — never Instantiate/Destroy during gameplay
- Use SpriteRenderer or UI Image, not 3D meshes
- Pre-calculate match possibilities for hint system
- Animate with DOTween for smooth tile movement
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: XeldarAlz
- Source: XeldarAlz/everything-claude-unity
- License: MIT
- Homepage: https://github.com/XeldarAlz/everything-claude-unity#readme
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.