onepath
Pathfinding and navigation for .NET: grids, graphs, navigation meshes and crowds in one package, with bit-identical results on every platform.
A quick look
A path on a tile map in two lines, and a navigation mesh from level geometry in two more. Options are plain objects with presets; you never write a struct.
Getting startedusing RecursiveAI.OneMath; using RecursiveAI.OnePath; var grid = Grid.FromText(map); GridPath path = grid.FindPath(new Cell(0, 0), new Cell(4, 3)); NavMesh level = NavMesh.Build(triangles, NavSettings.Humanoid); PathResult route = level.FindPath(start, goal);
What it does
Grids
Square, hex and 3D voxel grids with A*, JPS, JPS+, Theta*, Lazy Theta* and HPA*, area costs, agent sizes, incremental replanning and flow fields.
Graphs
Weighted graphs and point graphs that link nearby points, with bidirectional search and landmarks for fast repeated queries.
Navigation meshes
An exact 2D builder for tile maps and outlines, and a 3D builder for triangles or glTF, into one tiled format with tile caching and obstacles.
Queries
Paths, raycasts, nearest points, random points and distance to walls, with filters and area costs, whole or sliced over frames.
Crowds
Agents follow their corridors and avoid each other with navmesh-aware ORCA, stepped with a fixed time step from your game loop.
Built for lockstep
Grids, searches, meshes and crowds save to bytes and restore exactly. No 1.x release changes an existing result or stops reading an earlier 1.x save.
Timed against the native references
Every part is timed against Recast and Detour, DetourCrowd, DetourTileCache, RVO2 and Warthog, on the same inputs and settings, on x64 and arm64. Grid searches meet a bar of 1.00 and navmesh parts 1.15, with grid costs checked against the optimal costs. A hash matrix checks that results are the same bits on JIT, scalar, NativeAOT, WebAssembly and any thread count.
New in 1.2
- 1.2.0
“Additions only: every 1.0 and 1.1 result and saved format is unchanged, and 1.0 and 1.1 data loads as before.” Crowd recording and replay (
RecursiveAI.OnePath.Replay):CrowdRecorder“records the adds, removes, destinations, stops, teleports and steps a host performs on aCrowd”;CrowdPlayer“rebuilds the crowd from a replay’s setup and plays operations […] and steps into it”;CrowdReplay.FindMismatch“checks a replay against its recorded per-step hashes.”
The packages
- RecursiveAI.OnePath
Grids, graphs, both navmesh builders, the query layer, the tile cache and crowds. Trimming drops the parts an app doesn’t use. 1.2.0.
- Viewer module
RecursiveAI.OnePath.Scope1.0.0: the OnePath module for the OneScope viewer. - Dependency
onemath 1.0 or later, for vectors and deterministic math. Nothing else.
- Migration
Type, setting and unit tables for moving from Recast, Detour, DotRecast and Unity’s navigation.
- Memory
Higher than the native references’: it trades memory for speed and safety.
- .NET
.NET 10 on Windows, Linux and macOS, x64 and arm64, and browser WebAssembly. NativeAOT and trimming are supported. MIT or Apache-2.0.