https://github.com/xieziyu/unity-tilemap-astar
A* Pathfinding for Tilemap in Unity
https://github.com/xieziyu/unity-tilemap-astar
astar-algorithm csharp tilemap unity
Last synced: 4 months ago
JSON representation
A* Pathfinding for Tilemap in Unity
- Host: GitHub
- URL: https://github.com/xieziyu/unity-tilemap-astar
- Owner: xieziyu
- License: gpl-3.0
- Created: 2024-05-10T09:56:09.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-15T10:24:56.000Z (about 1 year ago)
- Last Synced: 2025-01-07T22:24:29.838Z (6 months ago)
- Topics: astar-algorithm, csharp, tilemap, unity
- Language: ShaderLab
- Homepage:
- Size: 3.59 MB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# A* Pathfinding for Tilemap in Unity
![demo]
## Get Started
You can install this package via Unity Package Manager:
### Install by git
```
https://github.com/xieziyu/unity-tilemap-astar.git?path=/Assets/Package
```### Simple Usage
1. Add `AStarTilemap` Component to some GameObject.
2. Assign walkable road tilemap and collider tilemaps to it.
3. Use `AStarTilemap.FindPath(Vector3Int startPos, Vector3Int endPos)` to find path.### Debugger
The debugger implementing `IPathfindDebugger` helps to show the process of pathfinding algorithm.
I provide a sample one with this package. You can import it via `Package Manager / Samples` tab.
Please refer to the `SampleScene` in this repository for more details.PS: Remember to enable debug mode in `AStarTilemap` and also assign `AStarTilemap` to the debugger.
[demo]: ./Docs/demo.gif