Join Jesse Freeman for an in-depth discussion in this video What is a graph?, part of Unity 5 2D: Pathfinding.
- And now we're ready to build…our graph class which will help…us link the nodes together.…Let's switch over to Unity and create…a new C# Script called Graph,…and then open this up in model develop.…Just like the node class, our graph…doesn't need to extend model behavior.…So we can delete that and we can…also remove the start and update methods.…Now we'll need some fields to help…keep track of the rows and columns of our graph…as well as the nodes.…Let's start by making a public int field…called rows, and setting its value to zero.…
We'll need to do the same thing for columns.…And finally, we'll need to make…a public array of the nodes we want to keep track of.…Let's call this nodes.…In the next video, we'll look at how to store…the nodes inside of our graph.…
- What is A*?
- Adding node classes and properties
- Storing and indexing graph nodes
- Building the search class
- Traversing the nodes
- Searching adjacent nodes
- Testing the search
- Building a test map
- Creating and coloring a grid
Skill Level Intermediate
Unity 5 2D Essential Training (2015)with Jesse Freeman3h 22m Intermediate
1. Pathfinding Introduction
What is A*?58s
2. The Node Class
3. The Graph Class
4. The Search Class
5. Testing the Search
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.