MotivationWhile working on a fast paced traffic dodging game, we realized that the road system and networks we were building needed to be high quality and infinitely generated. So we built a system for stacks, exchanges, exit ramps, flyovers, highways inside Unity.Procedural Highways builds believable highway infrastructure for you, and builds it as you move. Drop a generator into your scene, press Play, and a deterministic network of highways and arterial roads streams in around the camera. It doesn't run out, and the same seed always gives the same roads. The generation is deterministic.This isn't a set of road tiles snapped together. Every crossing is solved as real grade-separated infrastructure. Highways meet at four-level stack interchanges, partial cloverleafs or slip-road junctions, and arterials pass over on bridges with their own on- and off-ramps.Ramps follow their own splines and climb over whatever they cross. Lanes, shoulders, medians, barriers, fences, lamp posts, piers, gantries and route signs are all generated as mesh data, so the network looks finished from the air and at road level.Two ways to work with Procedural HighwaysLet it generate: Use the infinite procedural grid for open-world driving, flight sims, traffic prototypes or background scenery. Presets get you started quickly (Balanced Motorway, Dense Interchanges, Stack City, Suburban Arterials, Elevated Expressways), and around twenty sliders let you tune spacing, interchange types, viaducts, branching, elevation and more.Draw it yourself: Turn the grid off, or leave it on, and sketch your own roads with the Scene-view path editor. Click to place points and the road follows. Where two roads cross you get a bridge automatically. One more click turns the crossing into an interchange, adds an exit ramp between any two roads, or gives a carriageway an auxiliary lane. Every one of those tools is also available from code.Highlights- Infinite, streamed, deterministic highway and arterial network- Four-level stack, partial cloverleaf and slip-road interchanges- Arterial bridges with slip roads, plus collector, express and viaduct branches- Scene-view road editor: draw highways and arterials, add interchanges, exit ramps and extra lanes- Automatic bridges with clearance checks between crossing roads- Banked curves, gore areas, lane markings, work zones and coloured tarmac- Barriers, fences, delineators, crash barrels, lighting, gantries and route signs with destinations you set- Network Builder window: presets, area preview, interchange survey, clearance validation and screenshots- Bake any area into ordinary scene objects and prefabs for fixed levels- Distance-based detail, a per-frame build budget, object pooling and optional colliders- Clean scripting API, with an example network includedEverything ships as C# source, with demo scenes for the procedural grid and for a hand-built network, and a full PDF user guide.Things to watch out for:Editing massive highways in the editor can hang the main thread for a few seconds. The runtime should be buttery smooth though.Materials are procedural too, but they can be baked, so bake the materials if you want to add your custom road textures.The trees, cars, traffic AI is not included in the package. However it is incedibly easy to make. Traffic project available upon request.- Unity version: Unity 6 (6000.x), developed and tested on 6000.6- Render pipeline: Universal Render Pipeline (URP). Materials use URP/Lit.- Platforms: no native plugins. Runs anywhere URP runs; streaming distances and detail are adjustable for lower-end hardware.- Input: the demo controller supports both the Input System package and the legacy Input Manager.- Code: full C# source in the `AiKodex.ProceduralHighways` namespace, split into Runtime, Editor and Demo assemblies.- Generation:- meshes are built procedurally at runtime or in edit mode, with no prebuilt road models- chunks are streamed by distance, with a configurable per-frame time budget, high- and low-detail chunks, pooling and a maximum chunk count- Determinism: the same seed and coordinates always produce identical geometry.- Editor tools:- Network Builder window- Scene-view path editor: highway, arterial, exit ramp, interchange, extra lane and delete tools- Create Highway Scene menu item- Baking: converts generated areas to scene objects. Meshes, materials and textures are saved as assets, optionally as a prefab.- API:- `HighwayGenerator`: Rebuild, GeneratePreview, ClearAll, runtime statistics- `CustomNetwork` and `CustomNetworkTools`: AddRoad, AddInterchange, AddRamp, ExtrudeArterial, AddExtraLane, ConnectEnd and more- `NetworkLayout`: queries for road positions, heights, tangents and crossings- Included:- two demo scenes- the `SimplePlayerController` first-person explorer- example network code- a PDF user guide- Dependencies: Unity packages only (URP). No third-party code.Used in creating the logic for merging meshes using spline math


