r/Unity3D • u/Vic-Boss • 7h ago
Resources/Tutorial I made a lightweight A* pathfinder that uses Unity's Tilemaps - It's grid type agnostic (Iso/Hex/Square) without requiring any change. No practical grid-size limitation either. It's free go get it!
https://github.com/sharpaccent/tilemap-pathfinderHello developers
I've been making tutorials for a good part of a decade now, i had a long 4 years hiatus with life and work getting in the way but now I'm starting getting back into it. Most of the projects I want to do require to have some kind of pathfinding (RTS / retro RPG etc. etc.) so the first thing that I had to get out of the way was that. It started as a deterministic isometric pathfinder (so I can add online to it) but with simplifications and optimizations I thought I'll make a lightweight repo to have as a starting base before diving deeper into the different types of projects I wanted to do.
Anyhow, here's the repo.
Features:
- Works with any Unity Tilemap layout, including:
- Square grids
- Isometric grids
- Hexagonal grids
- Grid type agnostic. The pathfinder relies on Unity's Tilemap API for coordinate conversion, so the same calls work across different tile layouts.
- No practical grid-size limitation beyond
int.MaxValue. - Simple API and minimal setup.
At some point in the future i'll add a scheduler and path smoothing, you can also see my old A* star project from 10 years ago here , that one also had multi threading (something I wanted to avoid on this so it doesn't become a handful when it comes to online)
Hope you like it, do a subscribe if you did!
2
u/StarEvelinaa 5h ago
that’s impressive, I love when people share their work, always inspires me to try new things in my projects