Skip to content

In this tutorial, we will implement a generic pathfinder in Unity using C#. We will approach the tutorial from a basic 2D grid-based pathfinding to a more robust generic pathfinder that we can use for a graph-based data structure. We will then apply our pathfinder to a variety of pathfinding problems.

License

Notifications You must be signed in to change notification settings

shamim-akhtar/tutorial-pathfinding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 

Repository files navigation

Generic Pathfinder in Unity using C#

Note:

I am in the process of updating the codes to the latest Unity version and rewrite the tutorials. You can find the previous version of tutorial codes in the branch 2023

Unity C#

In this tutorial, we will implement a generic pathfinder in Unity using C#. We will approach the tutorial from a basic 2D grid-based pathfinding to a more robust generic pathfinder that we can use for a graph-based data structure. We will then apply our pathfinder to a variety of pathfinding problems.

Try the WebGL Pathfining Playground

Pathfinding Playground

In this first tutorial, we create a generic pathfinder that is algorithm agnostic. Then we create three implementations of the pathfinder using the A*, Djikstra and Greedy best-first algorithm. We apply this generic pathfinder to various pathfinding problems (8-Puzzle, rectangular grid-based map and graph-based map).

In the second tutorial, we apply our generic pathfinder and solve the 8-puzzle problem and demonstrate the application in Unity.

In the third tutorial, we apply our generic pathfinder and solve the 2D grid-based pathfinding and demonstrate the application in Unity.

In the fourth tutorial, we apply our generic pathfinder and solve the graph-based pathfinding problem and demonstrate the application in Unity.

About

In this tutorial, we will implement a generic pathfinder in Unity using C#. We will approach the tutorial from a basic 2D grid-based pathfinding to a more robust generic pathfinder that we can use for a graph-based data structure. We will then apply our pathfinder to a variety of pathfinding problems.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages