Skip to content

A Unity editor-level developer tool that lets you visualize the shortest path between two vertices within a graph in Editor mode (~9 hrs of work)

Notifications You must be signed in to change notification settings

rokuniichi/dijkstra_visualization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 

Repository files navigation

Dijkstra Visualization

Game screenshot

About

Dijkstra's Shortest Path First algorithm implementation

GameOn Production test task source code

This project is an implementation of the Dijkstra's algorithm and also my dive into developing tools under Unity Editor API

Installation

  1. Download the latest version of the package
  2. Import the package into your project
  3. See Usage

Usage

Editor

  1. Create your own Graph by dragging its prefab onto the scene or use Demo scene
  2. Drag Vertices prefab onto the Graph in Hierarchy, making them its children
  3. Connect the Vertices' by specifying connections in each Vertex's corresponding component
    Note: you only need to connect Vertices ONCE, algorithm will sync all pairs
  4. Under Shortest Path component on the Graph specify Start and Finish vertices
  5. The Shortest Path will be highlighted with Green color, starting Edge will be marked Red
    Note: if you want to unpair the Vertices (remove an Edge from the Graph), you have to remove both of them from each other's connections list

Runtime

Not yet fully supported, try at your own risk

Visual design inspired by EmpireWorld's implementation

About

A Unity editor-level developer tool that lets you visualize the shortest path between two vertices within a graph in Editor mode (~9 hrs of work)

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages