Pathfinding Graph Editor Tool
- kevinmeergans
- Jun 28, 2025
- 2 min read
Updated: Aug 14, 2025
Due to the grid-based nature of the world in Mushroom Kingdom, using Unreal’s native NavMesh solution isn’t particularly intuitive. I initially tried to enforce grid-based path-following for pawns using the existing system — with some limited success — but quickly came to the conclusion that it might be easier and more flexible to implement my own custom-tailored pathfinding solution.

I’m specifically planning a hierarchical approach, so the pawns roaming the island don’t have to plan their entire paths on a cell-by-cell basis from the start. Instead, the island will be divided into defined regions with designated entries and exits. This way, paths can be split into sub-paths, for example from the current position to the next regional exit.
I also want to set up a kind of road network connecting settlements and other important points of interest. This will help reduce the need for fine-grained, grid-level pathfinding and lower the overall computational cost. The idea is that a pawn traveling from their hometown to a settlement on the other side of the island will only need to calculate a cell-based path to the edge of their current town. From there, they’ll enter the larger road network, follow it across the island, and finally switch back to cell-level navigation within the destination town to reach their exact target. Since the road network will have relatively few nodes and intersections, path computation should be fast and I could still look into caching paths if further optimization is needed later on.
To define this navigation network efficiently, I built a custom editor tool that allows me to place and connect nodes directly within the Unreal Editor to form the underlying graph. I created an actor component to hold the graph and a custom visualizer (based on Unreal’s SplineComponentVisualizer) to draw a simple graphical representation of the network. I also added various options for placing, selecting, connecting, and deleting nodes, all accessible through a context menu. All these functions ensure that everything stays aligned to the grid. One additional option saves the graph to a data asset, so it can be loaded at runtime by the pathfinding system, which I’ll cover in a future post once implementation is complete.
The tool is complemented by a custom details panel for the graph component, which shows info about the selected elements and allows direct editing of node and connection properties, such as region association or type. Check out the video below for a quick look at the editor in action.


