---
title: "A Simple Graph API"
content_type: tutorial
url: "https://learn.unity.com/course/artificial-intelligence-for-beginners/unit/waypoints-graphs/tutorial/a-for-pathfinding?language=en"
language: en
container_type: course
container_title: "Artificial Intelligence for Beginners"
container_url: "https://learn.unity.com/course/artificial-intelligence-for-beginners.md?language=en&version=6.0"
unit_title: "Waypoints & Graphs"
unit_url: "https://learn.unity.com/course/artificial-intelligence-for-beginners/unit/waypoints-graphs?language=en&version=6.0"
standalone_markdown_url: "https://learn.unity.com/tutorial/a-for-pathfinding.md?language=en&version=6.0"
previous_title: "Using A* with Waypoints Part 1"
previous_url: "https://learn.unity.com/course/artificial-intelligence-for-beginners/unit/waypoints-graphs/tutorial/graph-theory?language=en&version=6.0"
previous_markdown_url: "https://learn.unity.com/course/artificial-intelligence-for-beginners/unit/waypoints-graphs/tutorial/graph-theory.md?language=en&version=6.0"
next_title: "Using A* with Waypoints Part 2"
next_url: "https://learn.unity.com/course/artificial-intelligence-for-beginners/unit/waypoints-graphs/tutorial/using-a-with-waypoints-part-2?language=en&version=6.0"
next_markdown_url: "https://learn.unity.com/course/artificial-intelligence-for-beginners/unit/waypoints-graphs/tutorial/using-a-with-waypoints-part-2.md?language=en&version=6.0"
difficulty: intermediate
duration_minutes: 35
unity_version:
  - "6.0"
supported_unity_versions:
  - name: "6.0"
    url: "https://learn.unity.com/course/artificial-intelligence-for-beginners/unit/waypoints-graphs/tutorial/a-for-pathfinding.md?language=en&version=6.0"
  - name: "2021.3"
    url: "https://learn.unity.com/course/artificial-intelligence-for-beginners/unit/waypoints-graphs/tutorial/a-for-pathfinding.md?language=en&version=2021.3"
  - name: "2019.4"
    url: "https://learn.unity.com/tutorial/a-for-pathfinding.md?language=en&version=2019.4"
  - name: "2019.3"
    url: "https://learn.unity.com/tutorial/a-for-pathfinding.md?language=en&version=2019.3"
  - name: "2019.2"
    url: "https://learn.unity.com/tutorial/a-for-pathfinding.md?language=en&version=2019.2"
  - name: "2019.1"
    url: "https://learn.unity.com/tutorial/a-for-pathfinding.md?language=en&version=2019.1"
last_updated: "2026-08-04T14:22:18.000Z"
---

# A Simple Graph API

In this tutorial we will learn how to write classes to store a graph with its nodes and edges.

## 1. A Simple Graph API Part 1

[Video](https://storage.googleapis.com/learn-platform-bucket-production/tutorial/460d17b1-f422-55d2-b703-fbfb55ae6327/versions%5B_key==%22f9abe100c7cfb8378ba788340bfa3a71%22%5D.sections%5B_key==%22ZnGr3kGV9xZ7apWlN0bpcA%22%5D.body%5B_key==%22ZnGr3kGV9xZ7apWlN0bpfm%22%5D.overviewVideo/S0506_20260313_171330.mp4) ([Transcript (en)](https://storage.googleapis.com/learn-platform-bucket-production/tutorial/460d17b1-f422-55d2-b703-fbfb55ae6327/versions%5B_key==%22f9abe100c7cfb8378ba788340bfa3a71%22%5D.sections%5B_key==%22ZnGr3kGV9xZ7apWlN0bpcA%22%5D.body%5B_key==%22ZnGr3kGV9xZ7apWlN0bpfm%22%5D.subtitles/S0506%20VTT%20en_20260522_125849.vtt))

In this tutorial we will start writing a new set of classes to store a graph, with it's nodes and edges.

## 2. A Simple Graph API Part 2

[Video](https://storage.googleapis.com/learn-platform-bucket-production/tutorial/460d17b1-f422-55d2-b703-fbfb55ae6327/versions%5B_key==%22f9abe100c7cfb8378ba788340bfa3a71%22%5D.sections%5B_key==%22ZnGr3kGV9xZ7apWlN0bpn0%22%5D.body%5B_key==%22ZnGr3kGV9xZ7apWlN0bpqc%22%5D.overviewVideo/S0507_20260313_171519.mp4) ([Transcript (en)](https://storage.googleapis.com/learn-platform-bucket-production/tutorial/460d17b1-f422-55d2-b703-fbfb55ae6327/versions%5B_key==%22f9abe100c7cfb8378ba788340bfa3a71%22%5D.sections%5B_key==%22ZnGr3kGV9xZ7apWlN0bpn0%22%5D.body%5B_key==%22ZnGr3kGV9xZ7apWlN0bpqc%22%5D.subtitles/S0507%20VTT%20en_20260522_125859.vtt))

In this tutorial students will learn how to introduce the A\* algorithm into the graph class.

## 3. A Simple Graph API Part 3

[Video](https://storage.googleapis.com/learn-platform-bucket-production/tutorial/460d17b1-f422-55d2-b703-fbfb55ae6327/versions%5B_key==%22f9abe100c7cfb8378ba788340bfa3a71%22%5D.sections%5B_key==%22ZnGr3kGV9xZ7apWlN0bq1S%22%5D.body%5B_key==%22ZnGr3kGV9xZ7apWlN0bq54%22%5D.overviewVideo/S0508_20260313_172310.mp4) ([Transcript (en)](https://storage.googleapis.com/learn-platform-bucket-production/tutorial/460d17b1-f422-55d2-b703-fbfb55ae6327/versions%5B_key==%22f9abe100c7cfb8378ba788340bfa3a71%22%5D.sections%5B_key==%22ZnGr3kGV9xZ7apWlN0bq1S%22%5D.body%5B_key==%22ZnGr3kGV9xZ7apWlN0bq54%22%5D.subtitles/S0508%20VTT%20en_20260522_125916.vtt))

In this tutorial students will complete writing the Graph class with the A\* Algorithm code and be ready to continue working on the waypoint system.
