LaneGraph is a lightweight lane-based navigation system for pathfinding in Unity.The package is compatible with all unity versions.Ensure your project use Unity.Mathematics if it doesn't already.Build intelligent road networks in minutes, not days. LaneGraph eliminates the complexity of lane-based navigation with a visual editor that lets you design, connect, and control traffic flow as easily as drawing paths. Featured in 📺 CodeMonkey's Top 10 Unity Tools 📖 Documentation | 💬 Discord | 📧 Email SupportWhy LaneGraph?Stop wrestling with complex navigation systems. LaneGraph gives you production-ready lane-based pathfinding that scales from simple racetracks to sprawling city networks—all without writing a single line of navigation code.Perfect for:Racing Games: Create dynamic racing lines with overtaking lanes and pit lane transitionsTraffic Simulations: Build realistic city traffic with intersections, signals, and lane changesAutonomous AI: Give vehicles intelligent navigation through complex road networksCity Builders: Design road networks that NPCs can actually navigate properlyVisual Design ToolsDesign your entire road network visually in the Unity editor—no code, no guessing. See your changes in real-time.Path Component: Straight roads, sweeping curves, or complex shapes using Linear, AutoBezier, or manual Bezier control. Perfect for highways, racetracks, and city streets.Intersection Component: Connect paths with customizable lane-to-lane routing. Define which lanes can turn left, right, or go straight—exactly like real traffic engineers do.Transition Component: Handle merges, splits, on-ramps, and lane reductions. Your AI can finally navigate highway entrances without breaking a sweat.Lane State Controller: Add working traffic signals with customizable timing. Green, yellow, red—your lanes respond like real traffic lights.Runtime Performance That ScalesBuilt for performance from day one:Hierarchical BVH (Bounding Volume Hierarchy) for lightning-fast spatial queriesA* pathfinding optimized for lane graphs—finds routes through thousands of lanes in nanosecondsUnity.Mathematics data types (float3, etc.) for light-weight queriesAutomatic scene optimization converts editor data to lean runtime structuresQuery nearby lanes, find paths, detect positions—all without frame drops, even in massive open worlds.What's IncludedEditor Tools (Editor-Only):Drag-and-drop lane component creationVisual profile manager for configuring lane properties (width, direction, speed limits, tags)Real-time connection visualization and snappingTraffic signal controller setupOne-click build systemRuntime Components (Optimized ScriptableObjects):Compact lane graph data structuresFast spatial query API via LaneGraphManagerLane state management with event callbacksPathfinding between any two positionsDirection and tag-based lane filteringDocumentation & Support:Comprehensive user guide with workflow examplesComplete API reference with code samplesDemo scenes showcasing different configurationsDiscord community for quick helpEmail support for technical issuesKey Features:Lane-based pathfinding with A* algorithm optimized for road networksMultiple lane types with customizable properties (width, direction, speed, tags)Flexible intersections with per-lane connection configuration for turns and traffic flowLane transitions for merges, splits, and complex highway scenariosTraffic signal control with timing-based state managementOptimized spatial queries using hierarchical BVH for fast lookups in large scenesUnity.Mathematics integration for efficient, allocation-free calculationsShape variety: Linear paths, automatic Bezier curves, or manual Bezier with full tangent controlVisual editor: Real-time lane visualization, snapping, and debugging toolsEvent system: Lane state change callbacks for reactive AI behaviorRuntime Architecture:Editor components convert to optimized ScriptableObjects at build timeLane data stored in compact, cache-friendly structuresSpatial queries execute in O(log n) time via BVH traversalZero runtime allocations for spatial queries using Span and stack allocationScene-based data isolation—multiple scenes can each have their own lane networksSupported Platforms:Fully compatible with all Unity platforms. The runtime system is designed for consistent performance across:Desktop (Windows, macOS, Linux)Mobile (iOS, Android)ConsolesWebGLThe data structures are memory-efficient and platform-agnostic, with no platform-specific code required.Requirements:Unity 2019.1 or laterUnity.Mathematics package (included with Unity)




