From c1f13bac86a23c0e8482d04e8a1a89cc0f1f54af Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sat, 21 Mar 2026 19:00:36 +0000
Subject: [PATCH 1/8] Initial plan
From fe171aa759466dabc52059133d8f7896ea8b90a5 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sat, 21 Mar 2026 19:07:52 +0000
Subject: [PATCH 2/8] Add Exit Game and Reset Car buttons to ESC menu
Co-authored-by: adam133 <20442729+adam133@users.noreply.github.com>
Agent-Logs-Url: https://github.com/adam133/terradrive/sessions/3f204d72-14dd-44e0-9588-f58a93308846
---
Assets/Scripts/Core/MapSceneBuilder.cs | 59 +++++++++++++++++++++---
Assets/Scripts/Hud/CoordinateEntryHud.cs | 45 +++++++++++++++++-
2 files changed, 97 insertions(+), 7 deletions(-)
diff --git a/Assets/Scripts/Core/MapSceneBuilder.cs b/Assets/Scripts/Core/MapSceneBuilder.cs
index 54f1e6e..650f275 100644
--- a/Assets/Scripts/Core/MapSceneBuilder.cs
+++ b/Assets/Scripts/Core/MapSceneBuilder.cs
@@ -81,6 +81,7 @@ public class MapSceneBuilder : MonoBehaviour
// ── Private state ──────────────────────────────────────────────────────
private CancellationTokenSource _cts;
+ private MapData _builtMapData;
// ── Unity lifecycle ────────────────────────────────────────────────────
@@ -203,6 +204,7 @@ private IEnumerator LoadAndBuildRoutine(CancellationToken ct)
}
PositionVehicle(map);
+ _builtMapData = map;
GameManager.Instance?.SetState(GameState.Racing);
Debug.Log("[MapSceneBuilder] Level generation complete.");
@@ -558,7 +560,7 @@ private void PositionVehicle(MapData map)
///
private Vector3 FindRoadSpawnPoint(MapData map)
{
- RoadSegment best = FindBestRoadSegment(map);
+ RoadSegment best = FindNearestRoadSegment(map, Vector3.zero);
if (best == null)
return new Vector3(0f, VehicleSpawnHeight, 0f);
@@ -573,7 +575,7 @@ private Vector3 FindRoadSpawnPoint(MapData map)
///
private Quaternion FindRoadSpawnRotation(MapData map, Vector3 spawnPoint)
{
- RoadSegment best = FindBestRoadSegment(map);
+ RoadSegment best = FindNearestRoadSegment(map, Vector3.zero);
if (best == null || best.Nodes.Count < 2)
return Quaternion.identity;
@@ -586,7 +588,13 @@ private Quaternion FindRoadSpawnRotation(MapData map, Vector3 spawnPoint)
return Quaternion.LookRotation(dir.normalized, Vector3.up);
}
- private RoadSegment FindBestRoadSegment(MapData map)
+ ///
+ /// Returns the drivable whose midpoint is closest
+ /// to in the XZ plane. Drivable road types
+ /// are tried in priority order; falls back to any road if none match, and to
+ /// null if the map has no roads at all.
+ ///
+ private RoadSegment FindNearestRoadSegment(MapData map, Vector3 referencePoint)
{
if (map.Roads == null || map.Roads.Count == 0)
return null;
@@ -605,7 +613,9 @@ private RoadSegment FindBestRoadSegment(MapData map)
System.StringComparison.OrdinalIgnoreCase)) continue;
Vector3 mid = seg.Nodes[seg.Nodes.Count / 2];
- float dist = mid.x * mid.x + mid.z * mid.z; // sqr distance in XZ
+ float dx = mid.x - referencePoint.x;
+ float dz = mid.z - referencePoint.z;
+ float dist = dx * dx + dz * dz; // sqr distance in XZ
if (dist < bestDist)
{
bestDist = dist;
@@ -617,14 +627,16 @@ private RoadSegment FindBestRoadSegment(MapData map)
return best;
}
- // Fallback: any road, closest midpoint to origin.
+ // Fallback: any road, closest midpoint to referencePoint.
RoadSegment fallback = null;
float fallbackDist = float.MaxValue;
foreach (RoadSegment seg in map.Roads)
{
if (seg.Nodes == null || seg.Nodes.Count < 2) continue;
Vector3 mid = seg.Nodes[seg.Nodes.Count / 2];
- float dist = mid.x * mid.x + mid.z * mid.z;
+ float dx = mid.x - referencePoint.x;
+ float dz = mid.z - referencePoint.z;
+ float dist = dx * dx + dz * dz;
if (dist < fallbackDist)
{
fallbackDist = dist;
@@ -634,6 +646,41 @@ private RoadSegment FindBestRoadSegment(MapData map)
return fallback;
}
+ ///
+ /// Teleports the vehicle to the drivable road segment nearest to its current
+ /// XZ position, clears all velocity, and faces the car along the road.
+ /// This mirrors the initial spawn logic that runs when the scene first loads.
+ ///
+ public void ResetVehicle()
+ {
+ if (Vehicle == null || _builtMapData == null)
+ return;
+
+ Vector3 currentPos = Vehicle.position;
+ RoadSegment nearest = FindNearestRoadSegment(_builtMapData, currentPos);
+ if (nearest == null)
+ return;
+
+ int midIdx = nearest.Nodes.Count / 2;
+ Vector3 mid = nearest.Nodes[midIdx];
+ Vehicle.position = new Vector3(mid.x, mid.y + VehicleSpawnHeight, mid.z);
+
+ // Face the car along the road direction.
+ Vector3 a = nearest.Nodes[Mathf.Max(midIdx - 1, 0)];
+ Vector3 b = nearest.Nodes[Mathf.Min(midIdx + 1, nearest.Nodes.Count - 1)];
+ Vector3 dir = new Vector3(b.x - a.x, 0f, b.z - a.z);
+ if (dir.sqrMagnitude >= 0.0001f)
+ Vehicle.rotation = Quaternion.LookRotation(dir.normalized, Vector3.up);
+
+ // Stop all motion so the car doesn't carry over its previous velocity.
+ var rb = Vehicle.GetComponent();
+ if (rb != null)
+ {
+ rb.linearVelocity = Vector3.zero;
+ rb.angularVelocity = Vector3.zero;
+ }
+ }
+
///
/// Builds a minimal "box car" from primitives so the player has something
/// visible before a proper vehicle prefab is wired up.
diff --git a/Assets/Scripts/Hud/CoordinateEntryHud.cs b/Assets/Scripts/Hud/CoordinateEntryHud.cs
index ec919b0..a884e50 100644
--- a/Assets/Scripts/Hud/CoordinateEntryHud.cs
+++ b/Assets/Scripts/Hud/CoordinateEntryHud.cs
@@ -67,7 +67,7 @@ public class CoordinateEntryHud : MonoBehaviour
private CancellationTokenSource _cts;
// GUI window rect (computed once on first show)
- private static readonly Vector2 DialogSize = new Vector2(420f, 200f);
+ private static readonly Vector2 DialogSize = new Vector2(420f, 250f);
// Cached overlay texture to avoid per-frame allocations in OnGUI.
private Texture2D _overlayTexture;
@@ -204,6 +204,23 @@ private void DrawDialogContents(int _windowId)
GUILayout.EndHorizontal();
+ GUILayout.Space(4);
+
+ // ── Extra actions ──
+ GUILayout.BeginHorizontal();
+
+ GUI.enabled = !_isLoading;
+ if (GUILayout.Button("Reset Car", GUILayout.Height(26)))
+ {
+ ResetCar();
+ Hide();
+ }
+ if (GUILayout.Button("Exit Game", GUILayout.Height(26)))
+ QuitGame();
+ GUI.enabled = true;
+
+ GUILayout.EndHorizontal();
+
// ── Status message ──
if (!string.IsNullOrEmpty(_statusMessage))
{
@@ -325,5 +342,31 @@ private static Texture2D MakePixel(Color colour)
tex.Apply();
return tex;
}
+
+ ///
+ /// Teleports the vehicle to the nearest drivable road by delegating to
+ /// .
+ ///
+ private static void ResetCar()
+ {
+ var builder = FindFirstObjectByType();
+ if (builder != null)
+ builder.ResetVehicle();
+ else
+ Debug.LogWarning("[CoordinateEntryHud] ResetCar: no MapSceneBuilder found in scene.");
+ }
+
+ ///
+ /// Exits the game. In the Unity Editor this stops Play mode; in a
+ /// standalone build it calls .
+ ///
+ private static void QuitGame()
+ {
+#if UNITY_EDITOR
+ UnityEditor.EditorApplication.isPlaying = false;
+#else
+ Application.Quit();
+#endif
+ }
}
}
From 16f96731024f82fd5d73b4b76acc71d07641f013 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sat, 21 Mar 2026 19:51:10 +0000
Subject: [PATCH 3/8] Initial plan
From 746677e16f40bb92237bc36beb9d30415e19c616 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sat, 21 Mar 2026 19:57:13 +0000
Subject: [PATCH 4/8] Rework coordinates input to use single combined field
- Add OsmLevelLoader.TryParseCoordinates() static helper for parsing "lat, lon" strings
- Replace separate lat/lon fields with single Coordinates field in CoordinateEntryHud (IMGUI)
- Replace separate lat/lon TMP_InputFields with single Coordinates field in StartupMenuUi (uGUI)
- Add 11 unit tests for TryParseCoordinates covering valid/invalid/edge cases
Co-authored-by: adam133 <20442729+adam133@users.noreply.github.com>
Agent-Logs-Url: https://github.com/adam133/terradrive/sessions/bc83221f-b747-486e-8056-e5ceecfbbca7
---
Assets/Scripts/Core/OsmLevelLoader.cs | 34 ++++++
Assets/Scripts/Hud/CoordinateEntryHud.cs | 36 +++---
Assets/Scripts/Hud/StartupMenuUi.cs | 24 ++--
Tests/TerraDrive.Tests/OsmLevelLoaderTests.cs | 110 ++++++++++++++++++
4 files changed, 173 insertions(+), 31 deletions(-)
diff --git a/Assets/Scripts/Core/OsmLevelLoader.cs b/Assets/Scripts/Core/OsmLevelLoader.cs
index 956494f..3102f81 100644
--- a/Assets/Scripts/Core/OsmLevelLoader.cs
+++ b/Assets/Scripts/Core/OsmLevelLoader.cs
@@ -1,4 +1,5 @@
using System.Collections.Generic;
+using System.Globalization;
namespace TerraDrive.Core
{
@@ -89,5 +90,38 @@ public IReadOnlyList Validate()
/// Returns true when produces no errors.
///
public bool IsValid() => Validate().Count == 0;
+
+ // ── Coordinate parsing ─────────────────────────────────────────────────
+
+ ///
+ /// Tries to parse a coordinate string of the form "lat, lon" (whitespace
+ /// around the comma is ignored) into separate latitude and longitude values.
+ /// Both parts must be valid decimal numbers.
+ ///
+ /// Raw text entered by the user, e.g. "51.5074, -0.1278".
+ /// Parsed latitude on success; 0 otherwise.
+ /// Parsed longitude on success; 0 otherwise.
+ ///
+ /// true when contains exactly one comma that
+ /// separates two parseable decimal numbers; false otherwise.
+ ///
+ public static bool TryParseCoordinates(string input, out double lat, out double lon)
+ {
+ lat = 0;
+ lon = 0;
+
+ if (string.IsNullOrWhiteSpace(input))
+ return false;
+
+ int commaIndex = input.IndexOf(',');
+ if (commaIndex < 0)
+ return false;
+
+ string latPart = input.Substring(0, commaIndex).Trim();
+ string lonPart = input.Substring(commaIndex + 1).Trim();
+
+ return double.TryParse(latPart, NumberStyles.Float, CultureInfo.InvariantCulture, out lat)
+ && double.TryParse(lonPart, NumberStyles.Float, CultureInfo.InvariantCulture, out lon);
+ }
}
}
diff --git a/Assets/Scripts/Hud/CoordinateEntryHud.cs b/Assets/Scripts/Hud/CoordinateEntryHud.cs
index a884e50..6d8abb5 100644
--- a/Assets/Scripts/Hud/CoordinateEntryHud.cs
+++ b/Assets/Scripts/Hud/CoordinateEntryHud.cs
@@ -57,9 +57,8 @@ public class CoordinateEntryHud : MonoBehaviour
private bool _isVisible;
private bool _isLoading;
- private string _latStr = string.Empty;
- private string _lonStr = string.Empty;
- private string _radStr = string.Empty;
+ private string _coordsStr = string.Empty;
+ private string _radStr = string.Empty;
private string _statusMessage = string.Empty;
private bool _statusIsError;
@@ -67,7 +66,7 @@ public class CoordinateEntryHud : MonoBehaviour
private CancellationTokenSource _cts;
// GUI window rect (computed once on first show)
- private static readonly Vector2 DialogSize = new Vector2(420f, 250f);
+ private static readonly Vector2 DialogSize = new Vector2(420f, 230f);
// Cached overlay texture to avoid per-frame allocations in OnGUI.
private Texture2D _overlayTexture;
@@ -119,8 +118,7 @@ public void Show()
? GameManager.Instance.OriginLongitude
: DefaultLongitude;
- _latStr = lat.ToString("F6", CultureInfo.InvariantCulture);
- _lonStr = lon.ToString("F6", CultureInfo.InvariantCulture);
+ _coordsStr = $"{lat.ToString("F6", CultureInfo.InvariantCulture)}, {lon.ToString("F6", CultureInfo.InvariantCulture)}";
_radStr = DefaultRadius.ToString(CultureInfo.InvariantCulture);
_statusMessage = string.Empty;
@@ -161,21 +159,15 @@ private void DrawDialogContents(int _windowId)
{
GUILayout.Space(6);
- // ── Latitude ──
+ // ── Coordinates (lat, lon) ──
GUILayout.BeginHorizontal();
- GUILayout.Label("Latitude:", GUILayout.Width(110));
+ GUILayout.Label("Coordinates:", GUILayout.Width(110));
GUI.enabled = !_isLoading;
- _latStr = GUILayout.TextField(_latStr);
+ _coordsStr = GUILayout.TextField(_coordsStr);
GUI.enabled = true;
GUILayout.EndHorizontal();
- // ── Longitude ──
- GUILayout.BeginHorizontal();
- GUILayout.Label("Longitude:", GUILayout.Width(110));
- GUI.enabled = !_isLoading;
- _lonStr = GUILayout.TextField(_lonStr);
- GUI.enabled = true;
- GUILayout.EndHorizontal();
+ GUILayout.Label("e.g. 51.5074, -0.1278", new GUIStyle(GUI.skin.label) { fontSize = 10, normal = { textColor = new Color(0.6f, 0.6f, 0.6f) } });
// ── Radius ──
GUILayout.BeginHorizontal();
@@ -235,11 +227,15 @@ private void DrawDialogContents(int _windowId)
private void StartLoad()
{
- if (!double.TryParse(_latStr, NumberStyles.Float, CultureInfo.InvariantCulture, out double lat) ||
- !double.TryParse(_lonStr, NumberStyles.Float, CultureInfo.InvariantCulture, out double lon) ||
- !int.TryParse(_radStr, NumberStyles.Integer, CultureInfo.InvariantCulture, out int rad))
+ if (!OsmLevelLoader.TryParseCoordinates(_coordsStr, out double lat, out double lon))
+ {
+ SetStatus("Invalid coordinates — enter as \"lat, lon\", e.g. 51.5074, -0.1278", isError: true);
+ return;
+ }
+
+ if (!int.TryParse(_radStr, NumberStyles.Integer, CultureInfo.InvariantCulture, out int rad))
{
- SetStatus("Invalid number format — use decimal notation, e.g. 51.5074", isError: true);
+ SetStatus("Invalid radius — use a whole number, e.g. 500", isError: true);
return;
}
diff --git a/Assets/Scripts/Hud/StartupMenuUi.cs b/Assets/Scripts/Hud/StartupMenuUi.cs
index bb4bedf..362410a 100644
--- a/Assets/Scripts/Hud/StartupMenuUi.cs
+++ b/Assets/Scripts/Hud/StartupMenuUi.cs
@@ -46,8 +46,7 @@ public class StartupMenuUi : MonoBehaviour
private GameObject _downloadPanel;
private GameObject _loadingPanel;
- private TMP_InputField _latField;
- private TMP_InputField _lonField;
+ private TMP_InputField _coordsField;
private TMP_InputField _radField;
private TMP_Text _downloadStatus;
private Button _downloadBtn;
@@ -138,8 +137,7 @@ private void OnLoadDefault()
private void OnShowDownload()
{
- _latField.text = _defaultLatitude.ToString("F6", CultureInfo.InvariantCulture);
- _lonField.text = _defaultLongitude.ToString("F6", CultureInfo.InvariantCulture);
+ _coordsField.text = $"{_defaultLatitude.ToString("F6", CultureInfo.InvariantCulture)}, {_defaultLongitude.ToString("F6", CultureInfo.InvariantCulture)}";
_radField.text = _defaultRadius.ToString(CultureInfo.InvariantCulture);
_downloadStatus.text = string.Empty;
ShowDownload();
@@ -153,11 +151,15 @@ private void OnBack()
private void OnDownloadAndLoad()
{
- if (!double.TryParse(_latField.text, NumberStyles.Float, CultureInfo.InvariantCulture, out double lat) ||
- !double.TryParse(_lonField.text, NumberStyles.Float, CultureInfo.InvariantCulture, out double lon) ||
- !int.TryParse(_radField.text, NumberStyles.Integer, CultureInfo.InvariantCulture, out int rad))
+ if (!OsmLevelLoader.TryParseCoordinates(_coordsField.text, out double lat, out double lon))
{
- SetDownloadStatus("Invalid number format \u2014 use decimal notation, e.g. 51.5074", isError: true);
+ SetDownloadStatus("Invalid coordinates \u2014 enter as \u201clat, lon\u201d, e.g. 51.5074, -0.1278", isError: true);
+ return;
+ }
+
+ if (!int.TryParse(_radField.text, NumberStyles.Integer, CultureInfo.InvariantCulture, out int rad))
+ {
+ SetDownloadStatus("Invalid radius \u2014 use a whole number, e.g. 500", isError: true);
return;
}
@@ -329,7 +331,7 @@ private GameObject BuildSplashPanel(Transform canvasRoot)
private GameObject BuildDownloadPanel(Transform canvasRoot)
{
- var panel = CreateCenteredPanel("DownloadPanel", canvasRoot, 500f, 390f);
+ var panel = CreateCenteredPanel("DownloadPanel", canvasRoot, 500f, 350f);
AddPanelBackground(panel);
var vl = panel.AddComponent();
@@ -344,8 +346,8 @@ private GameObject BuildDownloadPanel(Transform canvasRoot)
AddLabel(panel.transform, "Download New Location", 28f, Color.white,
FontStyles.Bold, preferredHeight: 42f);
- _latField = AddInputRow(panel.transform, "Latitude", "e.g. 51.5074");
- _lonField = AddInputRow(panel.transform, "Longitude", "e.g. -0.1278");
+ _coordsField = AddInputRow(panel.transform, "Coordinates", "e.g. 51.5074, -0.1278");
+ _coordsField.contentType = TMP_InputField.ContentType.Standard;
_radField = AddInputRow(panel.transform, "Radius (m)", "e.g. 500");
_radField.contentType = TMP_InputField.ContentType.IntegerNumber;
diff --git a/Tests/TerraDrive.Tests/OsmLevelLoaderTests.cs b/Tests/TerraDrive.Tests/OsmLevelLoaderTests.cs
index f0a3dc2..162670e 100644
--- a/Tests/TerraDrive.Tests/OsmLevelLoaderTests.cs
+++ b/Tests/TerraDrive.Tests/OsmLevelLoaderTests.cs
@@ -232,5 +232,115 @@ public void Radius_SetValue_RoundTrips()
var loader = new OsmLevelLoader { Radius = 1234 };
Assert.That(loader.Radius, Is.EqualTo(1234));
}
+
+ // ── TryParseCoordinates ───────────────────────────────────────────────
+
+ [Test]
+ public void TryParseCoordinates_ValidInput_ReturnsTrueAndCorrectValues()
+ {
+ bool result = OsmLevelLoader.TryParseCoordinates("51.5074, -0.1278", out double lat, out double lon);
+
+ Assert.That(result, Is.True);
+ Assert.That(lat, Is.EqualTo(51.5074).Within(1e-9));
+ Assert.That(lon, Is.EqualTo(-0.1278).Within(1e-9));
+ }
+
+ [Test]
+ public void TryParseCoordinates_NoSpaces_ReturnsTrueAndCorrectValues()
+ {
+ bool result = OsmLevelLoader.TryParseCoordinates("48.8566,2.3522", out double lat, out double lon);
+
+ Assert.That(result, Is.True);
+ Assert.That(lat, Is.EqualTo(48.8566).Within(1e-9));
+ Assert.That(lon, Is.EqualTo(2.3522).Within(1e-9));
+ }
+
+ [Test]
+ public void TryParseCoordinates_NegativeLatAndLon_ReturnsTrueAndCorrectValues()
+ {
+ bool result = OsmLevelLoader.TryParseCoordinates("-33.8688, -70.6693", out double lat, out double lon);
+
+ Assert.That(result, Is.True);
+ Assert.That(lat, Is.EqualTo(-33.8688).Within(1e-9));
+ Assert.That(lon, Is.EqualTo(-70.6693).Within(1e-9));
+ }
+
+ [Test]
+ public void TryParseCoordinates_ExtraWhitespace_ReturnsTrueAndCorrectValues()
+ {
+ bool result = OsmLevelLoader.TryParseCoordinates(" 51.5074 , -0.1278 ", out double lat, out double lon);
+
+ Assert.That(result, Is.True);
+ Assert.That(lat, Is.EqualTo(51.5074).Within(1e-9));
+ Assert.That(lon, Is.EqualTo(-0.1278).Within(1e-9));
+ }
+
+ [Test]
+ public void TryParseCoordinates_NullInput_ReturnsFalse()
+ {
+ bool result = OsmLevelLoader.TryParseCoordinates(null, out double lat, out double lon);
+
+ Assert.That(result, Is.False);
+ Assert.That(lat, Is.EqualTo(0.0));
+ Assert.That(lon, Is.EqualTo(0.0));
+ }
+
+ [Test]
+ public void TryParseCoordinates_EmptyInput_ReturnsFalse()
+ {
+ bool result = OsmLevelLoader.TryParseCoordinates(string.Empty, out double lat, out double lon);
+
+ Assert.That(result, Is.False);
+ }
+
+ [Test]
+ public void TryParseCoordinates_NoComma_ReturnsFalse()
+ {
+ bool result = OsmLevelLoader.TryParseCoordinates("51.5074 -0.1278", out double lat, out double lon);
+
+ Assert.That(result, Is.False);
+ }
+
+ [Test]
+ public void TryParseCoordinates_SingleNumberOnly_ReturnsFalse()
+ {
+ bool result = OsmLevelLoader.TryParseCoordinates("51.5074", out double lat, out double lon);
+
+ Assert.That(result, Is.False);
+ }
+
+ [Test]
+ public void TryParseCoordinates_NonNumericParts_ReturnsFalse()
+ {
+ bool result = OsmLevelLoader.TryParseCoordinates("abc, def", out double lat, out double lon);
+
+ Assert.That(result, Is.False);
+ }
+
+ [Test]
+ public void TryParseCoordinates_OnlyComma_ReturnsFalse()
+ {
+ bool result = OsmLevelLoader.TryParseCoordinates(",", out double lat, out double lon);
+
+ Assert.That(result, Is.False);
+ }
+
+ [Test]
+ public void TryParseCoordinates_WhiteSpaceOnly_ReturnsFalse()
+ {
+ bool result = OsmLevelLoader.TryParseCoordinates(" ", out double lat, out double lon);
+
+ Assert.That(result, Is.False);
+ }
+
+ [Test]
+ public void TryParseCoordinates_IntegerCoordinates_ReturnsTrueAndCorrectValues()
+ {
+ bool result = OsmLevelLoader.TryParseCoordinates("51, 0", out double lat, out double lon);
+
+ Assert.That(result, Is.True);
+ Assert.That(lat, Is.EqualTo(51.0).Within(1e-9));
+ Assert.That(lon, Is.EqualTo(0.0).Within(1e-9));
+ }
}
}
From 2180617f30d3149a0f24b702d15b1b7a2cd3f48b Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sun, 22 Mar 2026 14:08:35 +0000
Subject: [PATCH 5/8] Initial plan
From 3acb4c353cbba89e429605b0d4e5d542c799dd27 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sun, 22 Mar 2026 14:15:29 +0000
Subject: [PATCH 6/8] Move default map data to StreamingAssets for standalone
build bundling
Co-authored-by: adam133 <20442729+adam133@users.noreply.github.com>
Agent-Logs-Url: https://github.com/adam133/terradrive/sessions/31fb9039-1f7e-4c19-9864-cbc426278d61
---
.gitignore | 1 +
Assets/Data/README.md | 5 +++-
Assets/Scenes/ProofOfConcept.unity | 4 +--
Assets/Scripts/Core/MapSceneBuilder.cs | 25 +++++++++++--------
Assets/Scripts/Core/README.md | 6 ++---
Assets/Scripts/Editor/LoadOsmMenuEditor.cs | 4 +--
Assets/StreamingAssets.meta | 8 ++++++
Assets/StreamingAssets/Data.meta | 8 ++++++
.../Data/map.elevation.csv | 0
.../Data/map.elevation.csv.meta | 2 +-
Assets/{ => StreamingAssets}/Data/map.osm.xml | 0
.../Data/map.osm.xml.meta | 2 +-
GETTING_STARTED.md | 2 +-
.../OSMParserRealDataTests.cs | 8 +++---
14 files changed, 49 insertions(+), 26 deletions(-)
create mode 100644 Assets/StreamingAssets.meta
create mode 100644 Assets/StreamingAssets/Data.meta
rename Assets/{ => StreamingAssets}/Data/map.elevation.csv (100%)
rename Assets/{ => StreamingAssets}/Data/map.elevation.csv.meta (75%)
rename Assets/{ => StreamingAssets}/Data/map.osm.xml (100%)
rename Assets/{ => StreamingAssets}/Data/map.osm.xml.meta (75%)
diff --git a/.gitignore b/.gitignore
index b05a152..1eb3362 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
# ── Downloaded map data ───────────────────────────────────────────────────────
Assets/Data/*.osm
+Assets/StreamingAssets/Data/downloaded.*
# ── Unity build artifacts ─────────────────────────────────────────────────────
[Ll]ibrary/
diff --git a/Assets/Data/README.md b/Assets/Data/README.md
index 19bebd8..f2abae7 100644
--- a/Assets/Data/README.md
+++ b/Assets/Data/README.md
@@ -1,3 +1,6 @@
-# Downloaded .osm map files are stored here at runtime.
+# Downloaded .osm map files may be stored here at runtime.
# They are intentionally excluded from version control — regenerate them with:
# dotnet run --project Tools/OsmDownloader -- --lat ... --lon ...
+#
+# Note: The default bundled map data (Ames, Iowa) lives in
+# Assets/StreamingAssets/Data/ so that it is included in standalone builds.
diff --git a/Assets/Scenes/ProofOfConcept.unity b/Assets/Scenes/ProofOfConcept.unity
index bb5a63a..6e3910a 100644
--- a/Assets/Scenes/ProofOfConcept.unity
+++ b/Assets/Scenes/ProofOfConcept.unity
@@ -407,8 +407,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0, type: 3}
m_Name:
m_EditorClassIdentifier:
- OsmFilePath: Assets/Data/map.osm.xml
- ElevationCsvPath: Assets/Data/map.elevation.csv
+ OsmFilePath: Data/map.osm.xml
+ ElevationCsvPath: Data/map.elevation.csv
OriginLatitude: 41.895720000000004
OriginLongitude: -93.588755
Registry: {fileID: 3003}
diff --git a/Assets/Scripts/Core/MapSceneBuilder.cs b/Assets/Scripts/Core/MapSceneBuilder.cs
index 650f275..04264e2 100644
--- a/Assets/Scripts/Core/MapSceneBuilder.cs
+++ b/Assets/Scripts/Core/MapSceneBuilder.cs
@@ -27,14 +27,16 @@ namespace TerraDrive.Core
///
///
/// File paths can be absolute or relative. Relative paths are resolved from
- /// Application.dataPath/.. (the project root in the Unity Editor;
- /// the executable folder in a standalone build).
+ /// Application.streamingAssetsPath, which is the Assets/StreamingAssets
+ /// folder in the Unity Editor and the <GameName>_Data/StreamingAssets
+ /// folder in a standalone build. This ensures the default map data is accessible
+ /// in both the editor and packaged releases.
///
///
/// Quick-start defaults (matching the bundled sample data):
///
- /// - : Assets/Data/map.osm.xml
- /// - : Assets/Data/map.elevation.csv
+ /// - : Data/map.osm.xml
+ /// - : Data/map.elevation.csv
/// -
/// Origin: taken from /
/// when both inspector fields are zero.
@@ -46,11 +48,11 @@ public class MapSceneBuilder : MonoBehaviour
// ── Inspector ──────────────────────────────────────────────────────────
[Header("Map Data")]
- [Tooltip("Path to the .osm XML file. Absolute, or relative to the project root.")]
- public string OsmFilePath = "Assets/Data/map.osm.xml";
+ [Tooltip("Path to the .osm XML file. Absolute, or relative to Application.streamingAssetsPath.")]
+ public string OsmFilePath = "Data/map.osm.xml";
- [Tooltip("Path to the companion .elevation.csv file. Absolute, or relative to the project root.")]
- public string ElevationCsvPath = "Assets/Data/map.elevation.csv";
+ [Tooltip("Path to the companion .elevation.csv file. Absolute, or relative to Application.streamingAssetsPath.")]
+ public string ElevationCsvPath = "Data/map.elevation.csv";
[Header("Origin (leave both 0 to inherit from GameManager)")]
[Tooltip("Latitude of the map origin (world 0,0,0). 0 = use GameManager.OriginLatitude.")]
@@ -909,15 +911,16 @@ private static Canvas GetOrCreateHudCanvas()
///
/// Resolves a file path. Absolute paths are returned unchanged.
- /// Relative paths are combined with Application.dataPath/..
- /// so they work from both the Unity Editor and standalone builds.
+ /// Relative paths are combined with Application.streamingAssetsPath
+ /// so the bundled default map data is found in both the Unity Editor and
+ /// standalone builds.
///
private static string ResolvePath(string path)
{
if (string.IsNullOrEmpty(path) || Path.IsPathRooted(path))
return path;
- return Path.GetFullPath(Path.Combine(Application.dataPath, "..", path));
+ return Path.GetFullPath(Path.Combine(Application.streamingAssetsPath, path));
}
}
}
diff --git a/Assets/Scripts/Core/README.md b/Assets/Scripts/Core/README.md
index 1fc4193..b93dff3 100644
--- a/Assets/Scripts/Core/README.md
+++ b/Assets/Scripts/Core/README.md
@@ -54,8 +54,8 @@ scene. Add it to any scene GameObject, configure the paths in the Inspector, an
| Inspector field | Default | Notes |
|---|---|---|
-| `OsmFilePath` | `Assets/Data/map.osm.xml` | Path to the `.osm` file (absolute or project-root-relative) |
-| `ElevationCsvPath` | `Assets/Data/map.elevation.csv` | Companion `.elevation.csv` file |
+| `OsmFilePath` | `Data/map.osm.xml` | Path to the `.osm` file (absolute or `streamingAssetsPath`-relative) |
+| `ElevationCsvPath` | `Data/map.elevation.csv` | Companion `.elevation.csv` file |
| `OriginLatitude` | `0` | Map origin latitude; `0` inherits from `GameManager` |
| `OriginLongitude` | `0` | Map origin longitude; `0` inherits from `GameManager` |
| `Registry` | *(scene ref)* | `MaterialRegistry` used to apply materials to generated meshes |
@@ -74,7 +74,7 @@ building footprint (with `Walls` and `Roof` children), and per water body (a sin
the heightfield mesh and a `MeshCollider`.
The `ProofOfConcept.unity` scene ships with `MapSceneBuilder` pre-wired to the bundled
-`Assets/Data/map.osm.xml` + `Assets/Data/map.elevation.csv` sample data (Ames, Iowa).
+`Assets/StreamingAssets/Data/map.osm.xml` + `Assets/StreamingAssets/Data/map.elevation.csv` sample data (Ames, Iowa).
## LocationMenuController
diff --git a/Assets/Scripts/Editor/LoadOsmMenuEditor.cs b/Assets/Scripts/Editor/LoadOsmMenuEditor.cs
index ed153c8..f71bd66 100644
--- a/Assets/Scripts/Editor/LoadOsmMenuEditor.cs
+++ b/Assets/Scripts/Editor/LoadOsmMenuEditor.cs
@@ -76,8 +76,8 @@ public static void Open()
private void OnEnable()
{
- // Default output directory: /Assets/Data/
- _outputDir = Path.Combine(Application.dataPath, "Data");
+ // Default output directory: /Assets/StreamingAssets/Data/
+ _outputDir = Path.Combine(Application.dataPath, "StreamingAssets", "Data");
}
private void OnDisable()
diff --git a/Assets/StreamingAssets.meta b/Assets/StreamingAssets.meta
new file mode 100644
index 0000000..e8d9d84
--- /dev/null
+++ b/Assets/StreamingAssets.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 4597807b5aef4a26beaa329bd7994b48
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/StreamingAssets/Data.meta b/Assets/StreamingAssets/Data.meta
new file mode 100644
index 0000000..af161c4
--- /dev/null
+++ b/Assets/StreamingAssets/Data.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 91459291824f422f8bf9ebc3adc4ec88
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Data/map.elevation.csv b/Assets/StreamingAssets/Data/map.elevation.csv
similarity index 100%
rename from Assets/Data/map.elevation.csv
rename to Assets/StreamingAssets/Data/map.elevation.csv
diff --git a/Assets/Data/map.elevation.csv.meta b/Assets/StreamingAssets/Data/map.elevation.csv.meta
similarity index 75%
rename from Assets/Data/map.elevation.csv.meta
rename to Assets/StreamingAssets/Data/map.elevation.csv.meta
index 32dbd8e..3189956 100644
--- a/Assets/Data/map.elevation.csv.meta
+++ b/Assets/StreamingAssets/Data/map.elevation.csv.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 6bab928b790a4894fa9564a0bfe18668
+guid: 14c0218270d94962b435cffb1910b633
TextScriptImporter:
externalObjects: {}
userData:
diff --git a/Assets/Data/map.osm.xml b/Assets/StreamingAssets/Data/map.osm.xml
similarity index 100%
rename from Assets/Data/map.osm.xml
rename to Assets/StreamingAssets/Data/map.osm.xml
diff --git a/Assets/Data/map.osm.xml.meta b/Assets/StreamingAssets/Data/map.osm.xml.meta
similarity index 75%
rename from Assets/Data/map.osm.xml.meta
rename to Assets/StreamingAssets/Data/map.osm.xml.meta
index be3d349..a410649 100644
--- a/Assets/Data/map.osm.xml.meta
+++ b/Assets/StreamingAssets/Data/map.osm.xml.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: bdf7b66593b93d8429f37d1d98a05406
+guid: 835e368c4bf94227a77476daea2988b9
TextScriptImporter:
externalObjects: {}
userData:
diff --git a/GETTING_STARTED.md b/GETTING_STARTED.md
index 9097023..0dc44c3 100644
--- a/GETTING_STARTED.md
+++ b/GETTING_STARTED.md
@@ -173,7 +173,7 @@ The scene contains:
- **Directional Light** — a sun-like light angled at (50°, −30°, 0°).
- **GameManager** — the singleton state machine, defaulting to `MainMenu` state and centred on Ames, Iowa (41.8957, −93.5888) — the geographic origin of the bundled sample data.
- **MaterialRegistry** — pre-populated with 25 assignable texture-ID slots (road surfaces, kerbs, building walls, building roofs). Each slot is empty by default; drag your Unity `Material` assets into the Inspector to wire them up (see §4a below). Water, terrain, and lane-marking slots are filled automatically with solid-colour placeholders at startup.
-- **MapSceneBuilder** — wired to `Assets/Data/map.osm.xml` + `Assets/Data/map.elevation.csv`. On Play it loads the map, builds the terrain/road/building/water geometry, and transitions the `GameManager` through `LoadingMap → GeneratingLevel → Racing` automatically.
+- **MapSceneBuilder** — wired to `Assets/StreamingAssets/Data/map.osm.xml` + `Assets/StreamingAssets/Data/map.elevation.csv`. On Play it loads the map, builds the terrain/road/building/water geometry, and transitions the `GameManager` through `LoadingMap → GeneratingLevel → Racing` automatically.
You still need to add a vehicle and camera manually (§4b–4e). The terrain mesh is generated automatically by `MapSceneBuilder`, so you no longer need to create a flat ground plane.
diff --git a/Tests/TerraDrive.Tests/OSMParserRealDataTests.cs b/Tests/TerraDrive.Tests/OSMParserRealDataTests.cs
index db63880..4da79ce 100644
--- a/Tests/TerraDrive.Tests/OSMParserRealDataTests.cs
+++ b/Tests/TerraDrive.Tests/OSMParserRealDataTests.cs
@@ -6,7 +6,7 @@
namespace TerraDrive.Tests
{
///
- /// Tests that parse the Assets/Data/map.osm.xml sample file to verify
+ /// Tests that parse the Assets/StreamingAssets/Data/map.osm.xml sample file to verify
/// the OSM parser handles real-world data correctly.
///
[TestFixture]
@@ -19,7 +19,7 @@ public class OSMParserRealDataTests
// ── helpers ────────────────────────────────────────────────────────────
///
- /// Locates Assets/Data/map.osm.xml by walking up the directory tree
+ /// Locates Assets/StreamingAssets/Data/map.osm.xml by walking up the directory tree
/// from the test assembly location.
///
private static string FindOsmMapFile()
@@ -30,7 +30,7 @@ private static string FindOsmMapFile()
for (int depth = 0; depth < 8; depth++)
{
- string candidate = Path.Combine(dir, "Assets", "Data", "map.osm.xml");
+ string candidate = Path.Combine(dir, "Assets", "StreamingAssets", "Data", "map.osm.xml");
if (File.Exists(candidate))
return candidate;
@@ -40,7 +40,7 @@ private static string FindOsmMapFile()
}
throw new FileNotFoundException(
- "Could not locate Assets/Data/map.osm.xml in the repository tree.");
+ "Could not locate Assets/StreamingAssets/Data/map.osm.xml in the repository tree.");
}
// ── tests ──────────────────────────────────────────────────────────────
From 66f03f17d0fb28abaf4f94124df1a92fc385bc1c Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sun, 22 Mar 2026 19:18:22 +0000
Subject: [PATCH 7/8] Initial plan
From 953793ee8bd4abc7271f50c7d5267c7f1e512185 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sun, 22 Mar 2026 19:23:31 +0000
Subject: [PATCH 8/8] Rename TerraDrive to VectorRoad across all assets and
files
Co-authored-by: adam133 <20442729+adam133@users.noreply.github.com>
Agent-Logs-Url: https://github.com/adam133/terradrive/sessions/d961d13b-1c67-415f-80e2-3e9d8381856d
---
.devcontainer/devcontainer.json | 6 +--
.github/workflows/release.yml | 18 ++++----
.github/workflows/tests.yml | 6 +--
Assets/Scripts/Core/CoordinateConverter.cs | 2 +-
Assets/Scripts/Core/GameManager.cs | 8 ++--
Assets/Scripts/Core/LocationLoadResult.cs | 2 +-
Assets/Scripts/Core/LocationMenuController.cs | 10 ++---
Assets/Scripts/Core/MapData.cs | 6 +--
Assets/Scripts/Core/MapLoader.cs | 6 +--
Assets/Scripts/Core/MapSceneBuilder.cs | 12 ++---
Assets/Scripts/Core/OsmLevelLoader.cs | 4 +-
Assets/Scripts/Core/README.md | 2 +-
Assets/Scripts/DataInversion/MapNode.cs | 2 +-
Assets/Scripts/DataInversion/MapWay.cs | 2 +-
Assets/Scripts/DataInversion/OSMParser.cs | 6 +--
Assets/Scripts/DataInversion/RegionType.cs | 2 +-
Assets/Scripts/DataInversion/RoadType.cs | 2 +-
Assets/Scripts/DataInversion/WaterBody.cs | 2 +-
Assets/Scripts/Editor/LoadOsmMenuEditor.cs | 20 ++++-----
Assets/Scripts/Editor/ProjectSetup.cs | 14 +++---
Assets/Scripts/Hud/CoordinateEntryHud.cs | 10 ++---
Assets/Scripts/Hud/MinimapHud.cs | 10 ++---
Assets/Scripts/Hud/MinimapRenderer.cs | 4 +-
Assets/Scripts/Hud/StartupMenuUi.cs | 14 +++---
Assets/Scripts/Procedural/BridgeElevator.cs | 2 +-
.../Scripts/Procedural/BuildingGenerator.cs | 4 +-
.../Scripts/Procedural/BuildingMeshResult.cs | 2 +-
Assets/Scripts/Procedural/MaterialRegistry.cs | 2 +-
.../Procedural/PlaceholderMaterialFactory.cs | 2 +-
Assets/Scripts/Procedural/PropPlacement.cs | 2 +-
Assets/Scripts/Procedural/PropType.cs | 2 +-
Assets/Scripts/Procedural/RegionTextures.cs | 4 +-
Assets/Scripts/Procedural/RoadMeshExtruder.cs | 4 +-
Assets/Scripts/Procedural/RoadMeshResult.cs | 2 +-
.../Scripts/Procedural/RoadSurfaceDeformer.cs | 4 +-
.../Scripts/Procedural/RoadsidePropPlacer.cs | 4 +-
Assets/Scripts/Procedural/SplineGenerator.cs | 2 +-
.../Scripts/Procedural/WaterMeshGenerator.cs | 4 +-
Assets/Scripts/Procedural/WaterMeshResult.cs | 2 +-
Assets/Scripts/Terrain/ElevationGrid.cs | 2 +-
Assets/Scripts/Terrain/IElevationSource.cs | 2 +-
Assets/Scripts/Terrain/OpenElevationSource.cs | 2 +-
.../Scripts/Terrain/TerrainMeshGenerator.cs | 4 +-
Assets/Scripts/Terrain/TerrainMeshResult.cs | 2 +-
Assets/Scripts/Tools/IOsmDownloader.cs | 4 +-
Assets/Scripts/Tools/OsmDownloader.cs | 4 +-
Assets/Scripts/Vehicle/CarController.cs | 2 +-
Assets/Scripts/Vehicle/ChaseCam.cs | 2 +-
Assets/Scripts/Vehicle/Speedometer.cs | 2 +-
Assets/Scripts/Vehicle/SpeedometerHud.cs | 4 +-
.../Tests/EditMode/ChaseCamEditModeTests.cs | 4 +-
.../EditMode/GameManagerEditModeTests.cs | 4 +-
.../PlayMode/CarControllerPlayModeTests.cs | 4 +-
.../Tests/PlayMode/ChaseCamPlayModeTests.cs | 4 +-
.../CoordinateEntryHudPlayModeTests.cs | 4 +-
.../PlayMode/GameManagerPlayModeTests.cs | 4 +-
.../PlayMode/SpeedometerHudPlayModeTests.cs | 4 +-
GETTING_STARTED.md | 44 +++++++++----------
ProjectSettings/ProjectSettings.asset | 6 +--
README.md | 42 +++++++++---------
.../BridgeElevatorTests.cs | 4 +-
.../BuildingGeneratorTests.cs | 6 +--
.../CoordinateConverterTests.cs | 4 +-
.../LocationMenuControllerTests.cs | 18 ++++----
.../MapLoaderTests.cs | 8 ++--
.../MapNodeTests.cs | 4 +-
.../MapWayTests.cs | 4 +-
.../MaterialRegistryTests.cs | 4 +-
.../MinimapRendererTests.cs | 6 +--
.../OSMParserRealDataTests.cs | 6 +--
.../OSMParserTests.cs | 6 +--
.../OpenElevationSourceTests.cs | 4 +-
.../OsmDownloaderTests.cs | 6 +--
.../OsmLevelLoaderTests.cs | 6 +--
.../PlaceholderMaterialFactoryTests.cs | 4 +-
.../RegionTypeTests.cs | 4 +-
.../RoadMeshExtruderTests.cs | 6 +--
.../RoadSurfaceDeformerTests.cs | 6 +--
.../RoadTypeTests.cs | 4 +-
.../RoadsidePropPlacerTests.cs | 6 +--
.../SpeedometerTests.cs | 4 +-
.../Stubs/UnityEngine.cs | 0
.../TerrainMeshGeneratorTests.cs | 6 +--
.../VectorRoad.Tests.csproj} | 0
.../WaterMeshGeneratorTests.cs | 6 +--
Tools/OsmDownloader/OsmDownloader.csproj | 2 +-
Tools/OsmDownloader/Program.cs | 4 +-
Tools/README.md | 2 +-
terradrive.slnx | 5 ---
vectorroad.slnx | 5 +++
90 files changed, 256 insertions(+), 256 deletions(-)
rename Tests/{TerraDrive.Tests => VectorRoad.Tests}/BridgeElevatorTests.cs (99%)
rename Tests/{TerraDrive.Tests => VectorRoad.Tests}/BuildingGeneratorTests.cs (99%)
rename Tests/{TerraDrive.Tests => VectorRoad.Tests}/CoordinateConverterTests.cs (99%)
rename Tests/{TerraDrive.Tests => VectorRoad.Tests}/LocationMenuControllerTests.cs (96%)
rename Tests/{TerraDrive.Tests => VectorRoad.Tests}/MapLoaderTests.cs (99%)
rename Tests/{TerraDrive.Tests => VectorRoad.Tests}/MapNodeTests.cs (98%)
rename Tests/{TerraDrive.Tests => VectorRoad.Tests}/MapWayTests.cs (98%)
rename Tests/{TerraDrive.Tests => VectorRoad.Tests}/MaterialRegistryTests.cs (99%)
rename Tests/{TerraDrive.Tests => VectorRoad.Tests}/MinimapRendererTests.cs (99%)
rename Tests/{TerraDrive.Tests => VectorRoad.Tests}/OSMParserRealDataTests.cs (96%)
rename Tests/{TerraDrive.Tests => VectorRoad.Tests}/OSMParserTests.cs (99%)
rename Tests/{TerraDrive.Tests => VectorRoad.Tests}/OpenElevationSourceTests.cs (99%)
rename Tests/{TerraDrive.Tests => VectorRoad.Tests}/OsmDownloaderTests.cs (99%)
rename Tests/{TerraDrive.Tests => VectorRoad.Tests}/OsmLevelLoaderTests.cs (99%)
rename Tests/{TerraDrive.Tests => VectorRoad.Tests}/PlaceholderMaterialFactoryTests.cs (99%)
rename Tests/{TerraDrive.Tests => VectorRoad.Tests}/RegionTypeTests.cs (97%)
rename Tests/{TerraDrive.Tests => VectorRoad.Tests}/RoadMeshExtruderTests.cs (99%)
rename Tests/{TerraDrive.Tests => VectorRoad.Tests}/RoadSurfaceDeformerTests.cs (99%)
rename Tests/{TerraDrive.Tests => VectorRoad.Tests}/RoadTypeTests.cs (98%)
rename Tests/{TerraDrive.Tests => VectorRoad.Tests}/RoadsidePropPlacerTests.cs (99%)
rename Tests/{TerraDrive.Tests => VectorRoad.Tests}/SpeedometerTests.cs (98%)
rename Tests/{TerraDrive.Tests => VectorRoad.Tests}/Stubs/UnityEngine.cs (100%)
rename Tests/{TerraDrive.Tests => VectorRoad.Tests}/TerrainMeshGeneratorTests.cs (99%)
rename Tests/{TerraDrive.Tests/TerraDrive.Tests.csproj => VectorRoad.Tests/VectorRoad.Tests.csproj} (100%)
rename Tests/{TerraDrive.Tests => VectorRoad.Tests}/WaterMeshGeneratorTests.cs (99%)
delete mode 100644 terradrive.slnx
create mode 100644 vectorroad.slnx
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 1b2e54d..d00d22a 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -1,5 +1,5 @@
{
- "name": "TerraDrive",
+ "name": "VectorRoad",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04",
// Install .NET 8 SDK via the official devcontainer feature
@@ -18,12 +18,12 @@
// GitHub Copilot – inline suggestions + chat panel
"github.copilot",
"github.copilot-chat",
- // C# language support and rich editing for the TerraDrive codebase
+ // C# language support and rich editing for the VectorRoad codebase
"ms-dotnettools.csdevkit",
"ms-dotnettools.csharp"
],
"settings": {
- "dotnet.defaultSolution": "terradrive.slnx",
+ "dotnet.defaultSolution": "vectorroad.slnx",
"github.copilot.enable": {
"*": true
}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 0d2b604..cd8a982 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -61,13 +61,13 @@ jobs:
dotnet-version: "8.0.x"
- name: Restore dependencies
- run: dotnet restore Tests/TerraDrive.Tests/TerraDrive.Tests.csproj
+ run: dotnet restore Tests/VectorRoad.Tests/VectorRoad.Tests.csproj
- name: Build
- run: dotnet build Tests/TerraDrive.Tests/TerraDrive.Tests.csproj --no-restore
+ run: dotnet build Tests/VectorRoad.Tests/VectorRoad.Tests.csproj --no-restore
- name: Run tests
- run: dotnet test Tests/TerraDrive.Tests/TerraDrive.Tests.csproj --no-build --verbosity normal
+ run: dotnet test Tests/VectorRoad.Tests/VectorRoad.Tests.csproj --no-build --verbosity normal
# ── 3. Build Unity project for each target platform ───────────────────────
build:
@@ -106,7 +106,7 @@ jobs:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
- buildMethod: TerraDrive.Editor.ProjectSetup.Configure
+ buildMethod: VectorRoad.Editor.ProjectSetup.Configure
allowDirtyBuild: true
- name: Build project
@@ -117,20 +117,20 @@ jobs:
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: ${{ matrix.targetPlatform }}
- buildName: TerraDrive
+ buildName: VectorRoad
versioning: Custom
version: ${{ needs.version.outputs.version }}
- name: Archive build output
run: |
cd build/${{ matrix.targetPlatform }}
- zip -r "../../TerraDrive-${{ needs.version.outputs.version }}-${{ matrix.targetPlatform }}.zip" .
+ zip -r "../../VectorRoad-${{ needs.version.outputs.version }}-${{ matrix.targetPlatform }}.zip" .
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
- name: TerraDrive-${{ needs.version.outputs.version }}-${{ matrix.targetPlatform }}
- path: TerraDrive-${{ needs.version.outputs.version }}-${{ matrix.targetPlatform }}.zip
+ name: VectorRoad-${{ needs.version.outputs.version }}-${{ matrix.targetPlatform }}
+ path: VectorRoad-${{ needs.version.outputs.version }}-${{ matrix.targetPlatform }}.zip
if-no-files-found: error
retention-days: 90
@@ -155,7 +155,7 @@ jobs:
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ needs.version.outputs.version }}
- name: TerraDrive v${{ needs.version.outputs.version }}
+ name: VectorRoad v${{ needs.version.outputs.version }}
draft: false
prerelease: false
generate_release_notes: true
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 85b2c4b..21c0fc1 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -23,13 +23,13 @@ jobs:
dotnet-version: "8.0.x"
- name: Restore dependencies
- run: dotnet restore Tests/TerraDrive.Tests/TerraDrive.Tests.csproj
+ run: dotnet restore Tests/VectorRoad.Tests/VectorRoad.Tests.csproj
- name: Build
- run: dotnet build Tests/TerraDrive.Tests/TerraDrive.Tests.csproj --no-restore
+ run: dotnet build Tests/VectorRoad.Tests/VectorRoad.Tests.csproj --no-restore
- name: Run tests
- run: dotnet test Tests/TerraDrive.Tests/TerraDrive.Tests.csproj --no-build --verbosity normal --filter "Category!=Integration"
+ run: dotnet test Tests/VectorRoad.Tests/VectorRoad.Tests.csproj --no-build --verbosity normal --filter "Category!=Integration"
osm-downloader-build:
name: Build OsmDownloader tool (.NET)
diff --git a/Assets/Scripts/Core/CoordinateConverter.cs b/Assets/Scripts/Core/CoordinateConverter.cs
index 56c1bdf..d07c7aa 100644
--- a/Assets/Scripts/Core/CoordinateConverter.cs
+++ b/Assets/Scripts/Core/CoordinateConverter.cs
@@ -1,6 +1,6 @@
using UnityEngine;
-namespace TerraDrive.Core
+namespace VectorRoad.Core
{
///
/// Converts WGS-84 GPS coordinates (latitude / longitude) to Unity world-space
diff --git a/Assets/Scripts/Core/GameManager.cs b/Assets/Scripts/Core/GameManager.cs
index cadee88..ab18ef9 100644
--- a/Assets/Scripts/Core/GameManager.cs
+++ b/Assets/Scripts/Core/GameManager.cs
@@ -1,7 +1,7 @@
using UnityEngine;
using UnityEngine.Events;
-namespace TerraDrive.Core
+namespace VectorRoad.Core
{
///
/// High-level game state values.
@@ -17,7 +17,7 @@ public enum GameState
}
///
- /// Singleton entry-point for TerraDrive. Owns the top-level game state machine
+ /// Singleton entry-point for VectorRoad. Owns the top-level game state machine
/// and exposes events so other systems can react to state transitions without
/// tight coupling.
///
@@ -67,7 +67,7 @@ public static GameManager Instance
/// When set, uses this path instead of its
/// inspector-configured OsmFilePath on the next scene load.
///
- /// Populated by after a
+ /// Populated by after a
/// successful in-game download so the reloaded scene picks up the new data.
/// Clear back to an empty string to restore the inspector default.
///
@@ -78,7 +78,7 @@ public static GameManager Instance
/// When set, uses this path instead of its
/// inspector-configured ElevationCsvPath on the next scene load.
///
- /// Populated by after a
+ /// Populated by after a
/// successful in-game download so the reloaded scene picks up the new data.
/// Clear back to an empty string to restore the inspector default.
///
diff --git a/Assets/Scripts/Core/LocationLoadResult.cs b/Assets/Scripts/Core/LocationLoadResult.cs
index 953be92..2447d2b 100644
--- a/Assets/Scripts/Core/LocationLoadResult.cs
+++ b/Assets/Scripts/Core/LocationLoadResult.cs
@@ -1,6 +1,6 @@
using UnityEngine;
-namespace TerraDrive.Core
+namespace VectorRoad.Core
{
///
/// Result returned by .
diff --git a/Assets/Scripts/Core/LocationMenuController.cs b/Assets/Scripts/Core/LocationMenuController.cs
index 5e20dbe..1dea4d2 100644
--- a/Assets/Scripts/Core/LocationMenuController.cs
+++ b/Assets/Scripts/Core/LocationMenuController.cs
@@ -2,10 +2,10 @@
using System.IO;
using System.Threading;
using System.Threading.Tasks;
-using TerraDrive.Terrain;
-using TerraDrive.Tools;
+using VectorRoad.Terrain;
+using VectorRoad.Tools;
-namespace TerraDrive.Core
+namespace VectorRoad.Core
{
///
/// Encapsulates the game-menu logic for choosing a new real-world location by
@@ -86,10 +86,10 @@ public LocationMenuController(IOsmDownloader downloader, string dataDirectory)
///
/// Initialises a new instance using the default and
- /// a terradrive subdirectory inside the system temp folder.
+ /// a vectorroad subdirectory inside the system temp folder.
///
public LocationMenuController()
- : this(new OsmDownloader(), Path.Combine(Path.GetTempPath(), "terradrive")) { }
+ : this(new OsmDownloader(), Path.Combine(Path.GetTempPath(), "vectorroad")) { }
///
/// Returns true when and
diff --git a/Assets/Scripts/Core/MapData.cs b/Assets/Scripts/Core/MapData.cs
index 939a6f2..aa0616c 100644
--- a/Assets/Scripts/Core/MapData.cs
+++ b/Assets/Scripts/Core/MapData.cs
@@ -1,8 +1,8 @@
using System.Collections.Generic;
-using TerraDrive.DataInversion;
-using TerraDrive.Terrain;
+using VectorRoad.DataInversion;
+using VectorRoad.Terrain;
-namespace TerraDrive.Core
+namespace VectorRoad.Core
{
///
/// Holds all data produced by : the parsed OSM
diff --git a/Assets/Scripts/Core/MapLoader.cs b/Assets/Scripts/Core/MapLoader.cs
index aa70054..7f99171 100644
--- a/Assets/Scripts/Core/MapLoader.cs
+++ b/Assets/Scripts/Core/MapLoader.cs
@@ -1,9 +1,9 @@
using System.Threading;
using System.Threading.Tasks;
-using TerraDrive.DataInversion;
-using TerraDrive.Terrain;
+using VectorRoad.DataInversion;
+using VectorRoad.Terrain;
-namespace TerraDrive.Core
+namespace VectorRoad.Core
{
///
/// Loads a full map scene from a pre-downloaded .osm and
diff --git a/Assets/Scripts/Core/MapSceneBuilder.cs b/Assets/Scripts/Core/MapSceneBuilder.cs
index 04264e2..92ac172 100644
--- a/Assets/Scripts/Core/MapSceneBuilder.cs
+++ b/Assets/Scripts/Core/MapSceneBuilder.cs
@@ -4,13 +4,13 @@
using TMPro;
using UnityEngine;
using UnityEngine.UI;
-using TerraDrive.DataInversion;
-using TerraDrive.Hud;
-using TerraDrive.Procedural;
-using TerraDrive.Terrain;
-using TerraDrive.Vehicle;
+using VectorRoad.DataInversion;
+using VectorRoad.Hud;
+using VectorRoad.Procedural;
+using VectorRoad.Terrain;
+using VectorRoad.Vehicle;
-namespace TerraDrive.Core
+namespace VectorRoad.Core
{
///
/// Loads a pre-downloaded OSM map at startup and instantiates all scene geometry
diff --git a/Assets/Scripts/Core/OsmLevelLoader.cs b/Assets/Scripts/Core/OsmLevelLoader.cs
index 3102f81..6e21431 100644
--- a/Assets/Scripts/Core/OsmLevelLoader.cs
+++ b/Assets/Scripts/Core/OsmLevelLoader.cs
@@ -1,11 +1,11 @@
using System.Collections.Generic;
using System.Globalization;
-namespace TerraDrive.Core
+namespace VectorRoad.Core
{
///
/// Holds the GPS-coordinate settings for a
- /// TerraDrive → Load OSM File / Generate Level operation and validates them
+ /// VectorRoad → Load OSM File / Generate Level operation and validates them
/// before the Editor downloads data and wires it into a
/// component.
///
diff --git a/Assets/Scripts/Core/README.md b/Assets/Scripts/Core/README.md
index b93dff3..dd0d808 100644
--- a/Assets/Scripts/Core/README.md
+++ b/Assets/Scripts/Core/README.md
@@ -9,7 +9,7 @@ Game-wide managers, state machines, coordinate utilities, and the map-loading pi
| `MapLoader.cs` | End-to-end async pipeline: loads `.osm` + `.elevation.csv`, parses with terrain elevation, returns a `MapData` object |
| `MapData.cs` | Container holding roads, buildings, water bodies, region type, terrain mesh, and elevation grid |
| `MapSceneBuilder.cs` | Unity MonoBehaviour that drives `MapLoader` at runtime and instantiates terrain, road, building, and water GameObjects in the scene |
-| `OsmLevelLoader.cs` | Pure C# GPS-coordinate settings/validator for the **TerraDrive → Load OSM File / Generate Level** editor menu item; holds `Latitude`, `Longitude`, `Radius` and exposes `Validate()` / `IsValid()` |
+| `OsmLevelLoader.cs` | Pure C# GPS-coordinate settings/validator for the **VectorRoad → Load OSM File / Generate Level** editor menu item; holds `Latitude`, `Longitude`, `Radius` and exposes `Validate()` / `IsValid()` |
| `LocationMenuController.cs` | Downloads OSM + elevation data for a GPS coordinate and generates the full `MapData` via `MapLoader`; entry point for an in-game "change location" menu |
| `LocationLoadResult.cs` | Result returned by `LocationMenuController.LoadLocationAsync`: contains `MapData`, `OriginLatitude`, `OriginLongitude`, and `PlayerSpawnPosition` (always world origin) |
diff --git a/Assets/Scripts/DataInversion/MapNode.cs b/Assets/Scripts/DataInversion/MapNode.cs
index d303e46..423a021 100644
--- a/Assets/Scripts/DataInversion/MapNode.cs
+++ b/Assets/Scripts/DataInversion/MapNode.cs
@@ -1,6 +1,6 @@
using System;
-namespace TerraDrive.DataInversion
+namespace VectorRoad.DataInversion
{
///
/// Represents a single OpenStreetMap node with geographic coordinates and elevation.
diff --git a/Assets/Scripts/DataInversion/MapWay.cs b/Assets/Scripts/DataInversion/MapWay.cs
index 3867665..9319c56 100644
--- a/Assets/Scripts/DataInversion/MapWay.cs
+++ b/Assets/Scripts/DataInversion/MapWay.cs
@@ -1,6 +1,6 @@
using System.Collections.Generic;
-namespace TerraDrive.DataInversion
+namespace VectorRoad.DataInversion
{
///
/// Represents a single OpenStreetMap way, holding raw geographic nodes and all OSM metadata.
diff --git a/Assets/Scripts/DataInversion/OSMParser.cs b/Assets/Scripts/DataInversion/OSMParser.cs
index 547fbf4..cf245ba 100644
--- a/Assets/Scripts/DataInversion/OSMParser.cs
+++ b/Assets/Scripts/DataInversion/OSMParser.cs
@@ -4,10 +4,10 @@
using System.Threading.Tasks;
using System.Xml.Linq;
using UnityEngine;
-using TerraDrive.Core;
-using TerraDrive.Terrain;
+using VectorRoad.Core;
+using VectorRoad.Terrain;
-namespace TerraDrive.DataInversion
+namespace VectorRoad.DataInversion
{
///
/// Represents a single OSM road way with its projected world-space nodes.
diff --git a/Assets/Scripts/DataInversion/RegionType.cs b/Assets/Scripts/DataInversion/RegionType.cs
index 7618ea3..33d1a8e 100644
--- a/Assets/Scripts/DataInversion/RegionType.cs
+++ b/Assets/Scripts/DataInversion/RegionType.cs
@@ -1,4 +1,4 @@
-namespace TerraDrive.DataInversion
+namespace VectorRoad.DataInversion
{
///
/// Classifies a map area by its broad climate zone or biome,
diff --git a/Assets/Scripts/DataInversion/RoadType.cs b/Assets/Scripts/DataInversion/RoadType.cs
index ae73d7f..e791878 100644
--- a/Assets/Scripts/DataInversion/RoadType.cs
+++ b/Assets/Scripts/DataInversion/RoadType.cs
@@ -1,6 +1,6 @@
#nullable enable
-namespace TerraDrive.DataInversion
+namespace VectorRoad.DataInversion
{
///
/// Classifies an OSM way by its road surface or functional category.
diff --git a/Assets/Scripts/DataInversion/WaterBody.cs b/Assets/Scripts/DataInversion/WaterBody.cs
index 8daa2b3..1974634 100644
--- a/Assets/Scripts/DataInversion/WaterBody.cs
+++ b/Assets/Scripts/DataInversion/WaterBody.cs
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using UnityEngine;
-namespace TerraDrive.DataInversion
+namespace VectorRoad.DataInversion
{
///
/// Represents a water body parsed from an OSM closed-way polygon (e.g. lake, pond,
diff --git a/Assets/Scripts/Editor/LoadOsmMenuEditor.cs b/Assets/Scripts/Editor/LoadOsmMenuEditor.cs
index f71bd66..853f899 100644
--- a/Assets/Scripts/Editor/LoadOsmMenuEditor.cs
+++ b/Assets/Scripts/Editor/LoadOsmMenuEditor.cs
@@ -5,13 +5,13 @@
using UnityEditor;
using UnityEditor.SceneManagement;
using UnityEngine;
-using TerraDrive.Core;
-using TerraDrive.Tools;
+using VectorRoad.Core;
+using VectorRoad.Tools;
-namespace TerraDrive.Editor
+namespace VectorRoad.Editor
{
///
- /// Editor window opened by TerraDrive → Load OSM File / Generate Level.
+ /// Editor window opened by VectorRoad → Load OSM File / Generate Level.
///
///
/// The user enters GPS coordinates and a search radius, then clicks
@@ -64,7 +64,7 @@ public sealed class LoadOsmMenuEditor : EditorWindow
// ── Menu item ──────────────────────────────────────────────────────────
- [MenuItem("TerraDrive/Load OSM File / Generate Level")]
+ [MenuItem("VectorRoad/Load OSM File / Generate Level")]
public static void Open()
{
var window = GetWindow("Load OSM / Generate Level");
@@ -189,7 +189,7 @@ private async Task DownloadAndConfigureAsync(
// 1. Download OSM road/building XML.
EditorUtility.DisplayProgressBar(
- "TerraDrive — Downloading", "Fetching OSM road data…", 0.15f);
+ "VectorRoad — Downloading", "Fetching OSM road data…", 0.15f);
var downloader = new OsmDownloader();
string osmXml = await downloader
@@ -201,9 +201,9 @@ private async Task DownloadAndConfigureAsync(
// 2. Download DEM elevation grid.
EditorUtility.DisplayProgressBar(
- "TerraDrive — Downloading", "Fetching elevation data…", 0.55f);
+ "VectorRoad — Downloading", "Fetching elevation data…", 0.55f);
- TerraDrive.Terrain.ElevationGrid elevGrid = await downloader
+ VectorRoad.Terrain.ElevationGrid elevGrid = await downloader
.DownloadElevationGridAsync(latitude, longitude, radius,
cancellationToken: ct)
.ConfigureAwait(true);
@@ -213,7 +213,7 @@ private async Task DownloadAndConfigureAsync(
// 3. Wire the downloaded files into the scene.
EditorUtility.DisplayProgressBar(
- "TerraDrive — Configuring", "Configuring scene…", 0.90f);
+ "VectorRoad — Configuring", "Configuring scene…", 0.90f);
ConfigureScene(osmPath, csvPath, latitude, longitude);
@@ -222,7 +222,7 @@ private async Task DownloadAndConfigureAsync(
// 4. Offer to enter Play mode.
bool enterPlay = EditorUtility.DisplayDialog(
- "TerraDrive — Generate Level",
+ "VectorRoad — Generate Level",
$"Files downloaded and scene configured.\n\n" +
$"• Lat: {latitude:F6} Lon: {longitude:F6} Radius: {radius} m\n\n" +
"Enter Play mode now to build the terrain, roads, and buildings?",
diff --git a/Assets/Scripts/Editor/ProjectSetup.cs b/Assets/Scripts/Editor/ProjectSetup.cs
index 5b98ab1..a528ce7 100644
--- a/Assets/Scripts/Editor/ProjectSetup.cs
+++ b/Assets/Scripts/Editor/ProjectSetup.cs
@@ -2,11 +2,11 @@
using UnityEditor;
using UnityEngine;
-namespace TerraDrive.Editor
+namespace VectorRoad.Editor
{
///
/// One-shot project configurator that can be invoked from the Unity CLI in batch
- /// mode via -executeMethod TerraDrive.Editor.ProjectSetup.Configure.
+ /// mode via -executeMethod VectorRoad.Editor.ProjectSetup.Configure.
///
/// What it does:
/// • Sets physics gravity to (0, -9.81, 0).
@@ -18,14 +18,14 @@ namespace TerraDrive.Editor
/// Windows:
/// "C:\Program Files\Unity\Hub\Editor\6000.3.x\Editor\Unity.exe" ^
/// -batchmode -quit ^
- /// -executeMethod TerraDrive.Editor.ProjectSetup.Configure ^
- /// -projectPath "C:\path\to\terradrive"
+ /// -executeMethod VectorRoad.Editor.ProjectSetup.Configure ^
+ /// -projectPath "C:\path\to\vectorroad"
///
/// macOS / Linux:
/// /Applications/Unity/Hub/Editor/6000.3.x/Unity.app/Contents/MacOS/Unity \
/// -batchmode -quit \
- /// -executeMethod TerraDrive.Editor.ProjectSetup.Configure \
- /// -projectPath "/path/to/terradrive"
+ /// -executeMethod VectorRoad.Editor.ProjectSetup.Configure \
+ /// -projectPath "/path/to/vectorroad"
///
public static class ProjectSetup
{
@@ -36,7 +36,7 @@ public static class ProjectSetup
// ── Menu item (only visible in the Editor, not in batch mode) ──────────
- [MenuItem("TerraDrive/Configure Project")]
+ [MenuItem("VectorRoad/Configure Project")]
public static void Configure()
{
try
diff --git a/Assets/Scripts/Hud/CoordinateEntryHud.cs b/Assets/Scripts/Hud/CoordinateEntryHud.cs
index 6d8abb5..508efb8 100644
--- a/Assets/Scripts/Hud/CoordinateEntryHud.cs
+++ b/Assets/Scripts/Hud/CoordinateEntryHud.cs
@@ -5,10 +5,10 @@
using System.Threading.Tasks;
using UnityEngine;
using UnityEngine.SceneManagement;
-using TerraDrive.Core;
-using TerraDrive.Tools;
+using VectorRoad.Core;
+using VectorRoad.Tools;
-namespace TerraDrive.Hud
+namespace VectorRoad.Hud
{
///
/// In-game HUD component that shows a coordinate-entry dialog so the player can
@@ -265,7 +265,7 @@ private async Task LoadAsync(
try
{
- string dataDir = Path.Combine(Path.GetTempPath(), "terradrive");
+ string dataDir = Path.Combine(Path.GetTempPath(), "vectorroad");
Directory.CreateDirectory(dataDir);
string osmPath = Path.Combine(dataDir, "current.osm");
@@ -283,7 +283,7 @@ private async Task LoadAsync(
// 2. Download DEM elevation grid.
SetStatus("Downloading elevation data…");
- TerraDrive.Terrain.ElevationGrid elevGrid = await downloader
+ VectorRoad.Terrain.ElevationGrid elevGrid = await downloader
.DownloadElevationGridAsync(lat, lon, rad, cancellationToken: ct)
.ConfigureAwait(true);
diff --git a/Assets/Scripts/Hud/MinimapHud.cs b/Assets/Scripts/Hud/MinimapHud.cs
index 18b8e1c..83d102a 100644
--- a/Assets/Scripts/Hud/MinimapHud.cs
+++ b/Assets/Scripts/Hud/MinimapHud.cs
@@ -1,9 +1,9 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
-using TerraDrive.DataInversion;
+using VectorRoad.DataInversion;
-namespace TerraDrive.Hud
+namespace VectorRoad.Hud
{
///
/// Renders the output onto a UI
@@ -11,9 +11,9 @@ namespace TerraDrive.Hud
///
///
/// Attach to any persistent GameObject (e.g. the same one that holds
- /// ), assign a
+ /// ), assign a
/// from the HUD Canvas to , then wait for
- /// to call once
+ /// to call once
/// the map has loaded.
///
///
@@ -47,7 +47,7 @@ public sealed class MinimapHud : MonoBehaviour
///
/// Supplies the vehicle used as the map centre and the
/// road segments to draw each frame.
- /// Called by after the map loads.
+ /// Called by after the map loads.
///
public void Init(Transform vehicle, IEnumerable roads)
{
diff --git a/Assets/Scripts/Hud/MinimapRenderer.cs b/Assets/Scripts/Hud/MinimapRenderer.cs
index d07c990..97d6592 100644
--- a/Assets/Scripts/Hud/MinimapRenderer.cs
+++ b/Assets/Scripts/Hud/MinimapRenderer.cs
@@ -1,9 +1,9 @@
using System;
using System.Collections.Generic;
using UnityEngine;
-using TerraDrive.DataInversion;
+using VectorRoad.DataInversion;
-namespace TerraDrive.Hud
+namespace VectorRoad.Hud
{
///
/// Renders a top-down minimap of nearby road segments relative to the player's
diff --git a/Assets/Scripts/Hud/StartupMenuUi.cs b/Assets/Scripts/Hud/StartupMenuUi.cs
index 362410a..4d9aef8 100644
--- a/Assets/Scripts/Hud/StartupMenuUi.cs
+++ b/Assets/Scripts/Hud/StartupMenuUi.cs
@@ -7,11 +7,11 @@
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
-using TerraDrive.Core;
-using TerraDrive.Terrain;
-using TerraDrive.Tools;
+using VectorRoad.Core;
+using VectorRoad.Terrain;
+using VectorRoad.Tools;
-namespace TerraDrive.Hud
+namespace VectorRoad.Hud
{
///
/// Programmatic uGUI startup menu shown when the game is in the
@@ -20,7 +20,7 @@ namespace TerraDrive.Hud
/// before building the level.
///
///
- /// Auto-created by when
+ /// Auto-created by when
/// is detected at startup — no prefab or
/// manual scene placement required.
///
@@ -187,7 +187,7 @@ private async Task DownloadAndLoadAsync(double lat, double lon, int rad, Cancell
try
{
- string dataDir = Path.Combine(Path.GetTempPath(), "terradrive");
+ string dataDir = Path.Combine(Path.GetTempPath(), "vectorroad");
Directory.CreateDirectory(dataDir);
string osmPath = Path.Combine(dataDir, "current.osm");
@@ -310,7 +310,7 @@ private GameObject BuildSplashPanel(Transform canvasRoot)
vl.childForceExpandWidth = true;
vl.childForceExpandHeight = false;
- AddLabel(panel.transform, "TerraDrive", 54f, Color.white,
+ AddLabel(panel.transform, "VectorRoad", 54f, Color.white,
FontStyles.Bold, preferredHeight: 72f);
AddLabel(panel.transform, "Choose how to start", 19f,
diff --git a/Assets/Scripts/Procedural/BridgeElevator.cs b/Assets/Scripts/Procedural/BridgeElevator.cs
index 2b8ea07..c837875 100644
--- a/Assets/Scripts/Procedural/BridgeElevator.cs
+++ b/Assets/Scripts/Procedural/BridgeElevator.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using UnityEngine;
-namespace TerraDrive.Procedural
+namespace VectorRoad.Procedural
{
///
/// Applies smooth vertical elevation to a spline to represent a bridge or overpass.
diff --git a/Assets/Scripts/Procedural/BuildingGenerator.cs b/Assets/Scripts/Procedural/BuildingGenerator.cs
index 6bb8bfe..5ae030b 100644
--- a/Assets/Scripts/Procedural/BuildingGenerator.cs
+++ b/Assets/Scripts/Procedural/BuildingGenerator.cs
@@ -1,9 +1,9 @@
using System;
using System.Collections.Generic;
using UnityEngine;
-using TerraDrive.DataInversion;
+using VectorRoad.DataInversion;
-namespace TerraDrive.Procedural
+namespace VectorRoad.Procedural
{
///
/// Extrudes OSM building footprint polygons into 3D wall and roof meshes,
diff --git a/Assets/Scripts/Procedural/BuildingMeshResult.cs b/Assets/Scripts/Procedural/BuildingMeshResult.cs
index 28e3d15..5ead39e 100644
--- a/Assets/Scripts/Procedural/BuildingMeshResult.cs
+++ b/Assets/Scripts/Procedural/BuildingMeshResult.cs
@@ -1,6 +1,6 @@
using UnityEngine;
-namespace TerraDrive.Procedural
+namespace VectorRoad.Procedural
{
///
/// Holds the set of meshes and region-appropriate texture identifiers produced by
diff --git a/Assets/Scripts/Procedural/MaterialRegistry.cs b/Assets/Scripts/Procedural/MaterialRegistry.cs
index 8d73099..0c3622f 100644
--- a/Assets/Scripts/Procedural/MaterialRegistry.cs
+++ b/Assets/Scripts/Procedural/MaterialRegistry.cs
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using UnityEngine;
-namespace TerraDrive.Procedural
+namespace VectorRoad.Procedural
{
///
/// Maps texture-ID strings (as returned by ) to Unity
diff --git a/Assets/Scripts/Procedural/PlaceholderMaterialFactory.cs b/Assets/Scripts/Procedural/PlaceholderMaterialFactory.cs
index 88b8fca..20a2853 100644
--- a/Assets/Scripts/Procedural/PlaceholderMaterialFactory.cs
+++ b/Assets/Scripts/Procedural/PlaceholderMaterialFactory.cs
@@ -1,6 +1,6 @@
using UnityEngine;
-namespace TerraDrive.Procedural
+namespace VectorRoad.Procedural
{
///
/// Creates solid-colour placeholder Material objects for every known texture
diff --git a/Assets/Scripts/Procedural/PropPlacement.cs b/Assets/Scripts/Procedural/PropPlacement.cs
index 2c171b8..49c8bcd 100644
--- a/Assets/Scripts/Procedural/PropPlacement.cs
+++ b/Assets/Scripts/Procedural/PropPlacement.cs
@@ -1,6 +1,6 @@
using UnityEngine;
-namespace TerraDrive.Procedural
+namespace VectorRoad.Procedural
{
///
/// Describes the world-space position, orientation, and type of a single roadside prop.
diff --git a/Assets/Scripts/Procedural/PropType.cs b/Assets/Scripts/Procedural/PropType.cs
index 015e38b..bccaea0 100644
--- a/Assets/Scripts/Procedural/PropType.cs
+++ b/Assets/Scripts/Procedural/PropType.cs
@@ -1,4 +1,4 @@
-namespace TerraDrive.Procedural
+namespace VectorRoad.Procedural
{
///
/// Classifies a roadside prop by its visual and functional category.
diff --git a/Assets/Scripts/Procedural/RegionTextures.cs b/Assets/Scripts/Procedural/RegionTextures.cs
index cf2b820..0facd8a 100644
--- a/Assets/Scripts/Procedural/RegionTextures.cs
+++ b/Assets/Scripts/Procedural/RegionTextures.cs
@@ -1,6 +1,6 @@
-using TerraDrive.DataInversion;
+using VectorRoad.DataInversion;
-namespace TerraDrive.Procedural
+namespace VectorRoad.Procedural
{
///
/// Provides region-appropriate texture identifiers for road and building meshes.
diff --git a/Assets/Scripts/Procedural/RoadMeshExtruder.cs b/Assets/Scripts/Procedural/RoadMeshExtruder.cs
index fab21d8..5a873e7 100644
--- a/Assets/Scripts/Procedural/RoadMeshExtruder.cs
+++ b/Assets/Scripts/Procedural/RoadMeshExtruder.cs
@@ -1,8 +1,8 @@
using System.Collections.Generic;
using UnityEngine;
-using TerraDrive.DataInversion;
+using VectorRoad.DataInversion;
-namespace TerraDrive.Procedural
+namespace VectorRoad.Procedural
{
///
/// Extrudes a UV-mapped road mesh along a sequence of spline positions.
diff --git a/Assets/Scripts/Procedural/RoadMeshResult.cs b/Assets/Scripts/Procedural/RoadMeshResult.cs
index 78a0d21..7eb8fc4 100644
--- a/Assets/Scripts/Procedural/RoadMeshResult.cs
+++ b/Assets/Scripts/Procedural/RoadMeshResult.cs
@@ -1,6 +1,6 @@
using UnityEngine;
-namespace TerraDrive.Procedural
+namespace VectorRoad.Procedural
{
///
/// Holds the set of meshes and region-appropriate texture identifiers produced by
diff --git a/Assets/Scripts/Procedural/RoadSurfaceDeformer.cs b/Assets/Scripts/Procedural/RoadSurfaceDeformer.cs
index 4a7c4c1..5ee9e61 100644
--- a/Assets/Scripts/Procedural/RoadSurfaceDeformer.cs
+++ b/Assets/Scripts/Procedural/RoadSurfaceDeformer.cs
@@ -1,9 +1,9 @@
using System;
using System.Collections.Generic;
using UnityEngine;
-using TerraDrive.DataInversion;
+using VectorRoad.DataInversion;
-namespace TerraDrive.Procedural
+namespace VectorRoad.Procedural
{
///
/// Applies procedural Y-axis imperfections to a road spline to simulate
diff --git a/Assets/Scripts/Procedural/RoadsidePropPlacer.cs b/Assets/Scripts/Procedural/RoadsidePropPlacer.cs
index 89814a9..7851a98 100644
--- a/Assets/Scripts/Procedural/RoadsidePropPlacer.cs
+++ b/Assets/Scripts/Procedural/RoadsidePropPlacer.cs
@@ -1,8 +1,8 @@
using System.Collections.Generic;
using UnityEngine;
-using TerraDrive.DataInversion;
+using VectorRoad.DataInversion;
-namespace TerraDrive.Procedural
+namespace VectorRoad.Procedural
{
///
/// Scatters roadside props (lamp posts, trees, sign posts, fences) along a road spline
diff --git a/Assets/Scripts/Procedural/SplineGenerator.cs b/Assets/Scripts/Procedural/SplineGenerator.cs
index 00be972..6c24068 100644
--- a/Assets/Scripts/Procedural/SplineGenerator.cs
+++ b/Assets/Scripts/Procedural/SplineGenerator.cs
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using UnityEngine;
-namespace TerraDrive.Procedural
+namespace VectorRoad.Procedural
{
///
/// Generates a smooth Catmull-Rom spline through a sequence of world-space control points.
diff --git a/Assets/Scripts/Procedural/WaterMeshGenerator.cs b/Assets/Scripts/Procedural/WaterMeshGenerator.cs
index 6ac2344..a53205b 100644
--- a/Assets/Scripts/Procedural/WaterMeshGenerator.cs
+++ b/Assets/Scripts/Procedural/WaterMeshGenerator.cs
@@ -1,8 +1,8 @@
using System.Collections.Generic;
using UnityEngine;
-using TerraDrive.DataInversion;
+using VectorRoad.DataInversion;
-namespace TerraDrive.Procedural
+namespace VectorRoad.Procedural
{
///
/// Generates flat water-surface meshes from polygon outlines
diff --git a/Assets/Scripts/Procedural/WaterMeshResult.cs b/Assets/Scripts/Procedural/WaterMeshResult.cs
index 5d817c8..afa1d12 100644
--- a/Assets/Scripts/Procedural/WaterMeshResult.cs
+++ b/Assets/Scripts/Procedural/WaterMeshResult.cs
@@ -1,6 +1,6 @@
using UnityEngine;
-namespace TerraDrive.Procedural
+namespace VectorRoad.Procedural
{
///
/// Holds the mesh and texture identifier produced by
diff --git a/Assets/Scripts/Terrain/ElevationGrid.cs b/Assets/Scripts/Terrain/ElevationGrid.cs
index f369165..44f0e04 100644
--- a/Assets/Scripts/Terrain/ElevationGrid.cs
+++ b/Assets/Scripts/Terrain/ElevationGrid.cs
@@ -6,7 +6,7 @@
using System.Threading;
using System.Threading.Tasks;
-namespace TerraDrive.Terrain
+namespace VectorRoad.Terrain
{
///
/// A regular lat/lon grid of terrain elevation samples.
diff --git a/Assets/Scripts/Terrain/IElevationSource.cs b/Assets/Scripts/Terrain/IElevationSource.cs
index 078a7f7..bfc640e 100644
--- a/Assets/Scripts/Terrain/IElevationSource.cs
+++ b/Assets/Scripts/Terrain/IElevationSource.cs
@@ -2,7 +2,7 @@
using System.Threading;
using System.Threading.Tasks;
-namespace TerraDrive.Terrain
+namespace VectorRoad.Terrain
{
///
/// Abstraction over a DEM (Digital Elevation Model) data source.
diff --git a/Assets/Scripts/Terrain/OpenElevationSource.cs b/Assets/Scripts/Terrain/OpenElevationSource.cs
index 47e0e08..bbe2022 100644
--- a/Assets/Scripts/Terrain/OpenElevationSource.cs
+++ b/Assets/Scripts/Terrain/OpenElevationSource.cs
@@ -7,7 +7,7 @@
using System.Threading;
using System.Threading.Tasks;
-namespace TerraDrive.Terrain
+namespace VectorRoad.Terrain
{
///
/// Fetches terrain elevation data from the Open-Elevation REST API, which is backed
diff --git a/Assets/Scripts/Terrain/TerrainMeshGenerator.cs b/Assets/Scripts/Terrain/TerrainMeshGenerator.cs
index dd770ae..3f40b43 100644
--- a/Assets/Scripts/Terrain/TerrainMeshGenerator.cs
+++ b/Assets/Scripts/Terrain/TerrainMeshGenerator.cs
@@ -1,8 +1,8 @@
using System;
using UnityEngine;
-using TerraDrive.Core;
+using VectorRoad.Core;
-namespace TerraDrive.Terrain
+namespace VectorRoad.Terrain
{
///
/// Generates a Unity-compatible heightfield mesh from an .
diff --git a/Assets/Scripts/Terrain/TerrainMeshResult.cs b/Assets/Scripts/Terrain/TerrainMeshResult.cs
index 91d8e92..6b0f12f 100644
--- a/Assets/Scripts/Terrain/TerrainMeshResult.cs
+++ b/Assets/Scripts/Terrain/TerrainMeshResult.cs
@@ -1,6 +1,6 @@
using UnityEngine;
-namespace TerraDrive.Terrain
+namespace VectorRoad.Terrain
{
///
/// Holds the mesh data produced by .
diff --git a/Assets/Scripts/Tools/IOsmDownloader.cs b/Assets/Scripts/Tools/IOsmDownloader.cs
index 4222549..7382c9c 100644
--- a/Assets/Scripts/Tools/IOsmDownloader.cs
+++ b/Assets/Scripts/Tools/IOsmDownloader.cs
@@ -1,8 +1,8 @@
using System.Threading;
using System.Threading.Tasks;
-using TerraDrive.Terrain;
+using VectorRoad.Terrain;
-namespace TerraDrive.Tools
+namespace VectorRoad.Tools
{
public interface IOsmDownloader
{
diff --git a/Assets/Scripts/Tools/OsmDownloader.cs b/Assets/Scripts/Tools/OsmDownloader.cs
index 75138a9..b456094 100644
--- a/Assets/Scripts/Tools/OsmDownloader.cs
+++ b/Assets/Scripts/Tools/OsmDownloader.cs
@@ -6,9 +6,9 @@
using System.Text;
using System.Threading;
using System.Threading.Tasks;
-using TerraDrive.Terrain;
+using VectorRoad.Terrain;
-namespace TerraDrive.Tools
+namespace VectorRoad.Tools
{
public class OsmDownloader : IOsmDownloader
{
diff --git a/Assets/Scripts/Vehicle/CarController.cs b/Assets/Scripts/Vehicle/CarController.cs
index 980eea9..c4f2c7f 100644
--- a/Assets/Scripts/Vehicle/CarController.cs
+++ b/Assets/Scripts/Vehicle/CarController.cs
@@ -1,6 +1,6 @@
using UnityEngine;
-namespace TerraDrive.Vehicle
+namespace VectorRoad.Vehicle
{
///
/// Semi-realistic car controller using Unity's API.
diff --git a/Assets/Scripts/Vehicle/ChaseCam.cs b/Assets/Scripts/Vehicle/ChaseCam.cs
index 6f6dcc5..fafafab 100644
--- a/Assets/Scripts/Vehicle/ChaseCam.cs
+++ b/Assets/Scripts/Vehicle/ChaseCam.cs
@@ -1,6 +1,6 @@
using UnityEngine;
-namespace TerraDrive.Vehicle
+namespace VectorRoad.Vehicle
{
///
/// Smooth chase-camera controller that follows a target vehicle from behind and
diff --git a/Assets/Scripts/Vehicle/Speedometer.cs b/Assets/Scripts/Vehicle/Speedometer.cs
index ed4a256..6decdbe 100644
--- a/Assets/Scripts/Vehicle/Speedometer.cs
+++ b/Assets/Scripts/Vehicle/Speedometer.cs
@@ -1,4 +1,4 @@
-namespace TerraDrive.Vehicle
+namespace VectorRoad.Vehicle
{
///
/// Speed conversion utilities used by the digital speedometer HUD.
diff --git a/Assets/Scripts/Vehicle/SpeedometerHud.cs b/Assets/Scripts/Vehicle/SpeedometerHud.cs
index 719ca0d..3a0b64e 100644
--- a/Assets/Scripts/Vehicle/SpeedometerHud.cs
+++ b/Assets/Scripts/Vehicle/SpeedometerHud.cs
@@ -1,7 +1,7 @@
using TMPro;
using UnityEngine;
-namespace TerraDrive.Vehicle
+namespace VectorRoad.Vehicle
{
///
/// HUD component that reads the vehicle speed and drives a
@@ -15,7 +15,7 @@ public class SpeedometerHud : MonoBehaviour
private Rigidbody _rb;
- /// Assigns the speed label at runtime (called by ).
+ /// Assigns the speed label at runtime (called by ).
public void Init(TMP_Text label) => _speedLabel = label;
private void Awake()
diff --git a/Assets/Tests/EditMode/ChaseCamEditModeTests.cs b/Assets/Tests/EditMode/ChaseCamEditModeTests.cs
index dd21ef8..4fa6d23 100644
--- a/Assets/Tests/EditMode/ChaseCamEditModeTests.cs
+++ b/Assets/Tests/EditMode/ChaseCamEditModeTests.cs
@@ -1,8 +1,8 @@
using NUnit.Framework;
using UnityEngine;
-using TerraDrive.Vehicle;
+using VectorRoad.Vehicle;
-namespace TerraDrive.Tests.EditMode
+namespace VectorRoad.Tests.EditMode
{
///
/// Edit-mode tests for .
diff --git a/Assets/Tests/EditMode/GameManagerEditModeTests.cs b/Assets/Tests/EditMode/GameManagerEditModeTests.cs
index a523b69..47f1260 100644
--- a/Assets/Tests/EditMode/GameManagerEditModeTests.cs
+++ b/Assets/Tests/EditMode/GameManagerEditModeTests.cs
@@ -1,8 +1,8 @@
using NUnit.Framework;
using UnityEngine;
-using TerraDrive.Core;
+using VectorRoad.Core;
-namespace TerraDrive.Tests.EditMode
+namespace VectorRoad.Tests.EditMode
{
///
/// Edit-mode tests for .
diff --git a/Assets/Tests/PlayMode/CarControllerPlayModeTests.cs b/Assets/Tests/PlayMode/CarControllerPlayModeTests.cs
index 1d1bd8c..8de5250 100644
--- a/Assets/Tests/PlayMode/CarControllerPlayModeTests.cs
+++ b/Assets/Tests/PlayMode/CarControllerPlayModeTests.cs
@@ -2,9 +2,9 @@
using NUnit.Framework;
using UnityEngine;
using UnityEngine.TestTools;
-using TerraDrive.Vehicle;
+using VectorRoad.Vehicle;
-namespace TerraDrive.Tests.PlayMode
+namespace VectorRoad.Tests.PlayMode
{
///
/// Play-mode tests for MonoBehaviour lifecycle.
diff --git a/Assets/Tests/PlayMode/ChaseCamPlayModeTests.cs b/Assets/Tests/PlayMode/ChaseCamPlayModeTests.cs
index 33f37f4..998ab81 100644
--- a/Assets/Tests/PlayMode/ChaseCamPlayModeTests.cs
+++ b/Assets/Tests/PlayMode/ChaseCamPlayModeTests.cs
@@ -2,9 +2,9 @@
using NUnit.Framework;
using UnityEngine;
using UnityEngine.TestTools;
-using TerraDrive.Vehicle;
+using VectorRoad.Vehicle;
-namespace TerraDrive.Tests.PlayMode
+namespace VectorRoad.Tests.PlayMode
{
///
/// Play-mode tests for .
diff --git a/Assets/Tests/PlayMode/CoordinateEntryHudPlayModeTests.cs b/Assets/Tests/PlayMode/CoordinateEntryHudPlayModeTests.cs
index 4f1b1bc..2d6b851 100644
--- a/Assets/Tests/PlayMode/CoordinateEntryHudPlayModeTests.cs
+++ b/Assets/Tests/PlayMode/CoordinateEntryHudPlayModeTests.cs
@@ -3,9 +3,9 @@
using NUnit.Framework;
using UnityEngine;
using UnityEngine.TestTools;
-using TerraDrive.Hud;
+using VectorRoad.Hud;
-namespace TerraDrive.Tests.PlayMode
+namespace VectorRoad.Tests.PlayMode
{
///
/// Play-mode tests for dialog toggle logic.
diff --git a/Assets/Tests/PlayMode/GameManagerPlayModeTests.cs b/Assets/Tests/PlayMode/GameManagerPlayModeTests.cs
index adc337a..09ca3dd 100644
--- a/Assets/Tests/PlayMode/GameManagerPlayModeTests.cs
+++ b/Assets/Tests/PlayMode/GameManagerPlayModeTests.cs
@@ -3,9 +3,9 @@
using NUnit.Framework;
using UnityEngine;
using UnityEngine.TestTools;
-using TerraDrive.Core;
+using VectorRoad.Core;
-namespace TerraDrive.Tests.PlayMode
+namespace VectorRoad.Tests.PlayMode
{
///
/// Play-mode tests for .
diff --git a/Assets/Tests/PlayMode/SpeedometerHudPlayModeTests.cs b/Assets/Tests/PlayMode/SpeedometerHudPlayModeTests.cs
index 34b0358..aae2922 100644
--- a/Assets/Tests/PlayMode/SpeedometerHudPlayModeTests.cs
+++ b/Assets/Tests/PlayMode/SpeedometerHudPlayModeTests.cs
@@ -2,9 +2,9 @@
using NUnit.Framework;
using UnityEngine;
using UnityEngine.TestTools;
-using TerraDrive.Vehicle;
+using VectorRoad.Vehicle;
-namespace TerraDrive.Tests.PlayMode
+namespace VectorRoad.Tests.PlayMode
{
///
/// Play-mode tests for .
diff --git a/GETTING_STARTED.md b/GETTING_STARTED.md
index 0dc44c3..6505ae8 100644
--- a/GETTING_STARTED.md
+++ b/GETTING_STARTED.md
@@ -1,6 +1,6 @@
-# Getting Started with TerraDrive
+# Getting Started with VectorRoad
-This guide walks you through running TerraDrive as a proof of concept — from verifying the
+This guide walks you through running VectorRoad as a proof of concept — from verifying the
core pipeline with the .NET test suite, through setting up a Unity scene, to producing a
playable standalone executable.
@@ -21,7 +21,7 @@ The C# logic (OSM parsing, mesh generation, coordinate conversion, vehicle camer
validated entirely outside Unity using the .NET test project.
```bash
-dotnet test Tests/TerraDrive.Tests/TerraDrive.Tests.csproj
+dotnet test Tests/VectorRoad.Tests/VectorRoad.Tests.csproj
```
A successful run confirms:
@@ -37,10 +37,10 @@ A successful run confirms:
> folder before running if you want to inspect the rendered output:
>
> ```bash
-> export CHASE_CAM_PREVIEW_DIR=/tmp/terradrive-previews
-> export MAP_PREVIEW_DIR=/tmp/terradrive-previews
-> mkdir -p /tmp/terradrive-previews
-> dotnet test Tests/TerraDrive.Tests/TerraDrive.Tests.csproj
+> export CHASE_CAM_PREVIEW_DIR=/tmp/vectorroad-previews
+> export MAP_PREVIEW_DIR=/tmp/vectorroad-previews
+> mkdir -p /tmp/vectorroad-previews
+> dotnet test Tests/VectorRoad.Tests/VectorRoad.Tests.csproj
> ```
---
@@ -109,34 +109,34 @@ CI server or a headless machine), use Unity's batch-mode flags:
:: Windows — create / import the project
"C:\Program Files\Unity\Hub\Editor\6000.3.10f1\Editor\Unity.exe" ^
-batchmode -quit ^
- -createProject "C:\Users\Adam\Documents\GitHub\terradrive"
+ -createProject "C:\Users\Adam\Documents\GitHub\vectorroad"
```
```bash
# macOS / Linux — create / import the project
/Applications/Unity/Hub/Editor/6000.3.x/Unity.app/Contents/MacOS/Unity \
-batchmode -quit \
- -projectPath "/path/to/terradrive" \
- -createProject "/path/to/terradrive"
+ -projectPath "/path/to/vectorroad" \
+ -createProject "/path/to/vectorroad"
```
-Once the project has been imported, apply the standard TerraDrive project settings
+Once the project has been imported, apply the standard VectorRoad project settings
(gravity = -9.81, Road and Terrain layers) by executing the bundled setup script:
```bat
:: Windows
"C:\Program Files\Unity\Hub\Editor\6000.3.10f1\Editor\Unity.exe" ^
-batchmode -quit ^
- -projectPath "C:\Users\Adam\Documents\GitHub\terradrive" ^
- -executeMethod TerraDrive.Editor.ProjectSetup.Configure
+ -projectPath "C:\Users\Adam\Documents\GitHub\vectorroad" ^
+ -executeMethod VectorRoad.Editor.ProjectSetup.Configure
```
```bash
# macOS / Linux
/Applications/Unity/Hub/Editor/6000.3.x/Unity.app/Contents/MacOS/Unity \
-batchmode -quit \
- -projectPath "/path/to/terradrive" \
- -executeMethod TerraDrive.Editor.ProjectSetup.Configure
+ -projectPath "/path/to/vectorroad" \
+ -executeMethod VectorRoad.Editor.ProjectSetup.Configure
```
The script configures the following defaults:
@@ -148,13 +148,13 @@ The script configures the following defaults:
| User layer 9 | `Road` |
You can also trigger the same setup interactively at any time from the Unity menu bar:
-**TerraDrive → Configure Project**.
+**VectorRoad → Configure Project**.
### 3b. Load an OSM map with the editor menu item
The quickest way to try any location — no manual file downloads or Inspector edits needed:
-1. Click **TerraDrive → Load OSM File / Generate Level** in the Unity menu bar.
+1. Click **VectorRoad → Load OSM File / Generate Level** in the Unity menu bar.
An editor window opens.
2. Enter the **Latitude** and **Longitude** of your chosen map centre (decimal degrees,
WGS-84). For example, central London: `51.5074`, `-0.1278`.
@@ -162,7 +162,7 @@ The quickest way to try any location — no manual file downloads or Inspector e
4. Optionally change the **Output Directory** where the downloaded files are saved
(default: `Assets/Data/`).
5. Click **Download & Generate Level**. A progress bar shows download status while
- TerraDrive fetches OSM road/building data from the Overpass API and the DEM elevation
+ VectorRoad fetches OSM road/building data from the Overpass API and the DEM elevation
grid from the Open-Elevation API.
6. After download the active scene's `MapSceneBuilder` and `GameManager` are configured
automatically. The scene is marked dirty — save it if you want to keep the settings.
@@ -261,9 +261,9 @@ Once the proof-of-concept scene works in Play mode you can export a standalone b
Unity will compile the project and produce:
-- **Windows:** `TerraDrive.exe` + `TerraDrive_Data/` folder
-- **macOS:** `TerraDrive.app` bundle
-- **Linux:** `TerraDrive.x86_64` binary + `TerraDrive_Data/` folder
+- **Windows:** `VectorRoad.exe` + `VectorRoad_Data/` folder
+- **macOS:** `VectorRoad.app` bundle
+- **Linux:** `VectorRoad.x86_64` binary + `VectorRoad_Data/` folder
Run the produced binary to play the game outside the editor.
@@ -304,7 +304,7 @@ Run the produced binary to play the game outside the editor.
| Car physics + chase camera | ✅ Working |
| Game state machine | ✅ Working |
| CLI project create + configure (batch mode) | ✅ Working — `ProjectSetup.Configure` via `-executeMethod` |
-| Editor menu: Load OSM File / Generate Level | ✅ Working — **TerraDrive → Load OSM File / Generate Level** opens an editor window, accepts lat/lon/radius, downloads OSM + elevation data via `OsmDownloader`, wires `MapSceneBuilder` and `GameManager`, and optionally enters Play mode |
+| Editor menu: Load OSM File / Generate Level | ✅ Working — **VectorRoad → Load OSM File / Generate Level** opens an editor window, accepts lat/lon/radius, downloads OSM + elevation data via `OsmDownloader`, wires `MapSceneBuilder` and `GameManager`, and optionally enters Play mode |
| Automated release builds (CI/CD) | ✅ Working — push to `release` branch triggers `release.yml` |
| Texture ID → Material wiring | ✅ Working — `MaterialRegistry` scene component + placeholder auto-fill via `PlaceholderMaterialFactory` |
| Runtime scene assembly | ✅ Working — `MapSceneBuilder` loads OSM + elevation data on Play, instantiates terrain / road / building / water GameObjects, and drives the `GameManager` state machine (`LoadingMap → GeneratingLevel → Racing`); pre-wired in `ProofOfConcept.unity` |
diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset
index e4019e9..aae35d2 100644
--- a/ProjectSettings/ProjectSettings.asset
+++ b/ProjectSettings/ProjectSettings.asset
@@ -13,7 +13,7 @@ PlayerSettings:
useOnDemandResources: 0
accelerometerFrequency: 60
companyName: DefaultCompany
- productName: terradrive
+ productName: VectorRoad
defaultCursor: {fileID: 0}
cursorHotspot: {x: 0, y: 0}
m_SplashScreenBackgroundColor: {r: 0.12156863, g: 0.12156863, b: 0.1254902, a: 1}
@@ -606,14 +606,14 @@ PlayerSettings:
editorAssembliesCompatibilityLevel: 1
m_RenderingPath: 1
m_MobileRenderingPath: 1
- metroPackageName: terradrive
+ metroPackageName: VectorRoad
metroPackageVersion:
metroCertificatePath:
metroCertificatePassword:
metroCertificateSubject:
metroCertificateIssuer:
metroCertificateNotAfter: 0000000000000000
- metroApplicationDescription: terradrive
+ metroApplicationDescription: VectorRoad
wsaImages: {}
metroTileShortName:
metroTileShowName: 0
diff --git a/README.md b/README.md
index a615548..62b63e6 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# TerraDrive
+# VectorRoad
A semi-realistic racing game built on real-world roads using OpenStreetMap data and locally generated 3D assets.
@@ -6,7 +6,7 @@ A semi-realistic racing game built on real-world roads using OpenStreetMap data
## Vision
-TerraDrive lets players race on procedurally generated tracks derived from actual GPS road data. Every road surface, building, and piece of roadside scenery is generated at runtime from real-world sources — so every location on Earth is a potential race track.
+VectorRoad lets players race on procedurally generated tracks derived from actual GPS road data. Every road surface, building, and piece of roadside scenery is generated at runtime from real-world sources — so every location on Earth is a potential race track.
---
@@ -25,7 +25,7 @@ TerraDrive lets players race on procedurally generated tracks derived from actua
## Project Structure
```
-/TerraDrive
+/VectorRoad
/Assets
/Scripts
/Core ← Game managers, state machines, coordinate helpers
@@ -125,7 +125,7 @@ See [`Assets/Scripts/Editor/ProjectSetup.cs`](Assets/Scripts/Editor/ProjectSetup
## Testing
-Unit tests live in [`Tests/TerraDrive.Tests/`](Tests/TerraDrive.Tests/) and use NUnit on .NET 8.
+Unit tests live in [`Tests/VectorRoad.Tests/`](Tests/VectorRoad.Tests/) and use NUnit on .NET 8.
They cover the following modules:
| Test file | Module(s) covered |
@@ -151,18 +151,18 @@ They cover the following modules:
| `PlaceholderMaterialFactoryTests.cs` | `PlaceholderMaterialFactory` |
| `SpeedometerTests.cs` | `Speedometer`, `SpeedometerHud` |
| `MinimapRendererTests.cs` | `MinimapRenderer`, `MinimapLine` |
-| `OsmLevelLoaderTests.cs` | `OsmLevelLoader` (GPS coordinate settings & validation for the **TerraDrive → Load OSM File / Generate Level** editor menu item) |
+| `OsmLevelLoaderTests.cs` | `OsmLevelLoader` (GPS coordinate settings & validation for the **VectorRoad → Load OSM File / Generate Level** editor menu item) |
| `LocationMenuControllerTests.cs` | `LocationMenuController`, `LocationLoadResult` |
```bash
-dotnet test Tests/TerraDrive.Tests/TerraDrive.Tests.csproj
+dotnet test Tests/VectorRoad.Tests/VectorRoad.Tests.csproj
```
---
## Getting Started
-For step-by-step instructions on running TerraDrive as a proof of concept — including
+For step-by-step instructions on running VectorRoad as a proof of concept — including
verifying the pipeline with the .NET test suite, assembling the Unity scene, and producing
a standalone executable — see **[GETTING_STARTED.md](GETTING_STARTED.md)**.
@@ -176,7 +176,7 @@ a standalone executable — see **[GETTING_STARTED.md](GETTING_STARTED.md)**.
#### Verify the pipeline (no Unity needed)
```bash
-dotnet test Tests/TerraDrive.Tests/TerraDrive.Tests.csproj
+dotnet test Tests/VectorRoad.Tests/VectorRoad.Tests.csproj
```
#### Download Map Data
@@ -201,7 +201,7 @@ dotnet run --project Tools/OsmDownloader -- --lat 51.5074 --lon -0.1278 --radius
## CLI — Create & Configure the Unity Project
-TerraDrive ships an Editor script ([`Assets/Scripts/Editor/ProjectSetup.cs`](Assets/Scripts/Editor/ProjectSetup.cs))
+VectorRoad ships an Editor script ([`Assets/Scripts/Editor/ProjectSetup.cs`](Assets/Scripts/Editor/ProjectSetup.cs))
that can be run from the command line in Unity's **batch mode** to create the project and
apply the standard project settings (gravity, layers) without opening the Unity Editor UI.
@@ -214,21 +214,21 @@ import the project. Pass `-createProject` to force it to generate all project me
:: Windows — adjust the path to your installed Unity version
"C:\Program Files\Unity\Hub\Editor\6000.3.x\Editor\Unity.exe" ^
-batchmode -quit ^
- -createProject "C:\path\to\terradrive"
+ -createProject "C:\path\to\vectorroad"
```
```bash
# macOS / Linux
/Applications/Unity/Hub/Editor/6000.3.x/Unity.app/Contents/MacOS/Unity \
-batchmode -quit \
- -projectPath "/path/to/terradrive" \
- -createProject "/path/to/terradrive"
+ -projectPath "/path/to/vectorroad" \
+ -createProject "/path/to/vectorroad"
```
### Step 2 — Apply project defaults
Once the project has been imported, run the `ProjectSetup.Configure` method to apply the
-standard TerraDrive settings:
+standard VectorRoad settings:
| Setting | Value |
|---|---|
@@ -240,20 +240,20 @@ standard TerraDrive settings:
:: Windows
"C:\Program Files\Unity\Hub\Editor\6000.3.x\Editor\Unity.exe" ^
-batchmode -quit ^
- -projectPath "C:\path\to\terradrive" ^
- -executeMethod TerraDrive.Editor.ProjectSetup.Configure
+ -projectPath "C:\path\to\vectorroad" ^
+ -executeMethod VectorRoad.Editor.ProjectSetup.Configure
```
```bash
# macOS / Linux
/Applications/Unity/Hub/Editor/6000.3.x/Unity.app/Contents/MacOS/Unity \
-batchmode -quit \
- -projectPath "/path/to/terradrive" \
- -executeMethod TerraDrive.Editor.ProjectSetup.Configure
+ -projectPath "/path/to/vectorroad" \
+ -executeMethod VectorRoad.Editor.ProjectSetup.Configure
```
You can also run the same configuration interactively from the Unity menu bar:
-**TerraDrive → Configure Project**.
+**VectorRoad → Configure Project**.
### Load OSM File / Generate Level (interactive)
@@ -261,7 +261,7 @@ Once the project is open in the Unity Editor you can download a real-world map a
generate the full level (terrain + roads + buildings) in a few clicks — no manual file
management required:
-1. Click **TerraDrive → Load OSM File / Generate Level** in the Unity menu bar.
+1. Click **VectorRoad → Load OSM File / Generate Level** in the Unity menu bar.
An editor window opens.
2. Enter the **Latitude** and **Longitude** of the map origin (decimal degrees, WGS-84).
3. Set the **Radius** (metres) that controls how large an area is downloaded
@@ -269,7 +269,7 @@ management required:
4. Optionally change the **Output Directory** where the downloaded files are saved
(default: `Assets/Data/`).
5. Click **Download & Generate Level**. A progress bar shows download status while
- TerraDrive fetches OSM road/building data from the Overpass API and the DEM
+ VectorRoad fetches OSM road/building data from the Overpass API and the DEM
elevation grid from the Open-Elevation API.
6. After download, the active scene's `MapSceneBuilder` component (created automatically
if absent) is wired to the downloaded files and the `GameManager` origin is synced.
@@ -315,7 +315,7 @@ The repository ships two GitHub Actions workflows.
- Build the project for **Windows 64-bit**, **macOS**, and **Linux 64-bit** via
[`game-ci/unity-builder`](https://game.ci/).
- Upload each platform zip as a workflow artifact.
- - Create a GitHub Release named `TerraDrive vX.Y.Z` with all three zips attached.
+ - Create a GitHub Release named `VectorRoad vX.Y.Z` with all three zips attached.
### Required secrets
diff --git a/Tests/TerraDrive.Tests/BridgeElevatorTests.cs b/Tests/VectorRoad.Tests/BridgeElevatorTests.cs
similarity index 99%
rename from Tests/TerraDrive.Tests/BridgeElevatorTests.cs
rename to Tests/VectorRoad.Tests/BridgeElevatorTests.cs
index c3d4cfa..fcce1db 100644
--- a/Tests/TerraDrive.Tests/BridgeElevatorTests.cs
+++ b/Tests/VectorRoad.Tests/BridgeElevatorTests.cs
@@ -1,9 +1,9 @@
using System.Collections.Generic;
using NUnit.Framework;
using UnityEngine;
-using TerraDrive.Procedural;
+using VectorRoad.Procedural;
-namespace TerraDrive.Tests
+namespace VectorRoad.Tests
{
[TestFixture]
public class BridgeElevatorTests
diff --git a/Tests/TerraDrive.Tests/BuildingGeneratorTests.cs b/Tests/VectorRoad.Tests/BuildingGeneratorTests.cs
similarity index 99%
rename from Tests/TerraDrive.Tests/BuildingGeneratorTests.cs
rename to Tests/VectorRoad.Tests/BuildingGeneratorTests.cs
index 6f9e406..7975a46 100644
--- a/Tests/TerraDrive.Tests/BuildingGeneratorTests.cs
+++ b/Tests/VectorRoad.Tests/BuildingGeneratorTests.cs
@@ -1,10 +1,10 @@
using System.Collections.Generic;
using NUnit.Framework;
using UnityEngine;
-using TerraDrive.DataInversion;
-using TerraDrive.Procedural;
+using VectorRoad.DataInversion;
+using VectorRoad.Procedural;
-namespace TerraDrive.Tests
+namespace VectorRoad.Tests
{
[TestFixture]
public class BuildingGeneratorTests
diff --git a/Tests/TerraDrive.Tests/CoordinateConverterTests.cs b/Tests/VectorRoad.Tests/CoordinateConverterTests.cs
similarity index 99%
rename from Tests/TerraDrive.Tests/CoordinateConverterTests.cs
rename to Tests/VectorRoad.Tests/CoordinateConverterTests.cs
index eb52262..b503466 100644
--- a/Tests/TerraDrive.Tests/CoordinateConverterTests.cs
+++ b/Tests/VectorRoad.Tests/CoordinateConverterTests.cs
@@ -1,9 +1,9 @@
using System;
using NUnit.Framework;
using UnityEngine;
-using TerraDrive.Core;
+using VectorRoad.Core;
-namespace TerraDrive.Tests
+namespace VectorRoad.Tests
{
///
/// Unit tests for .
diff --git a/Tests/TerraDrive.Tests/LocationMenuControllerTests.cs b/Tests/VectorRoad.Tests/LocationMenuControllerTests.cs
similarity index 96%
rename from Tests/TerraDrive.Tests/LocationMenuControllerTests.cs
rename to Tests/VectorRoad.Tests/LocationMenuControllerTests.cs
index 3604aa5..4005467 100644
--- a/Tests/TerraDrive.Tests/LocationMenuControllerTests.cs
+++ b/Tests/VectorRoad.Tests/LocationMenuControllerTests.cs
@@ -3,12 +3,12 @@
using System.Threading;
using System.Threading.Tasks;
using NUnit.Framework;
-using TerraDrive.Core;
-using TerraDrive.Terrain;
-using TerraDrive.Tools;
+using VectorRoad.Core;
+using VectorRoad.Terrain;
+using VectorRoad.Tools;
using UnityEngine;
-namespace TerraDrive.Tests
+namespace VectorRoad.Tests
{
///
/// Unit tests for and
@@ -301,11 +301,11 @@ public void LocationLoadResult_PlayerSpawnPosition_IsAlwaysZero()
{
// PlayerSpawnPosition must be Vector3.zero regardless of the origin used.
var fakeMap = new MapData(
- new System.Collections.Generic.List(),
- new System.Collections.Generic.List(),
- new System.Collections.Generic.List(),
- TerraDrive.DataInversion.RegionType.Unknown,
- new TerraDrive.Terrain.TerrainMeshResult(
+ new System.Collections.Generic.List(),
+ new System.Collections.Generic.List(),
+ new System.Collections.Generic.List(),
+ VectorRoad.DataInversion.RegionType.Unknown,
+ new VectorRoad.Terrain.TerrainMeshResult(
new Vector3[0], new int[0], new UnityEngine.Vector2[0]),
new ElevationGrid(0, 1, 0, 1, new double[2, 2]));
diff --git a/Tests/TerraDrive.Tests/MapLoaderTests.cs b/Tests/VectorRoad.Tests/MapLoaderTests.cs
similarity index 99%
rename from Tests/TerraDrive.Tests/MapLoaderTests.cs
rename to Tests/VectorRoad.Tests/MapLoaderTests.cs
index 4a9b492..8e3e6d4 100644
--- a/Tests/TerraDrive.Tests/MapLoaderTests.cs
+++ b/Tests/VectorRoad.Tests/MapLoaderTests.cs
@@ -3,11 +3,11 @@
using System.Threading;
using System.Threading.Tasks;
using NUnit.Framework;
-using TerraDrive.Core;
-using TerraDrive.DataInversion;
-using TerraDrive.Terrain;
+using VectorRoad.Core;
+using VectorRoad.DataInversion;
+using VectorRoad.Terrain;
-namespace TerraDrive.Tests
+namespace VectorRoad.Tests
{
///
/// Unit tests for .
diff --git a/Tests/TerraDrive.Tests/MapNodeTests.cs b/Tests/VectorRoad.Tests/MapNodeTests.cs
similarity index 98%
rename from Tests/TerraDrive.Tests/MapNodeTests.cs
rename to Tests/VectorRoad.Tests/MapNodeTests.cs
index 361ee25..a7fa846 100644
--- a/Tests/TerraDrive.Tests/MapNodeTests.cs
+++ b/Tests/VectorRoad.Tests/MapNodeTests.cs
@@ -1,7 +1,7 @@
using NUnit.Framework;
-using TerraDrive.DataInversion;
+using VectorRoad.DataInversion;
-namespace TerraDrive.Tests
+namespace VectorRoad.Tests
{
[TestFixture]
public class MapNodeTests
diff --git a/Tests/TerraDrive.Tests/MapWayTests.cs b/Tests/VectorRoad.Tests/MapWayTests.cs
similarity index 98%
rename from Tests/TerraDrive.Tests/MapWayTests.cs
rename to Tests/VectorRoad.Tests/MapWayTests.cs
index a2184f5..e4105b3 100644
--- a/Tests/TerraDrive.Tests/MapWayTests.cs
+++ b/Tests/VectorRoad.Tests/MapWayTests.cs
@@ -1,8 +1,8 @@
using System.Collections.Generic;
using NUnit.Framework;
-using TerraDrive.DataInversion;
+using VectorRoad.DataInversion;
-namespace TerraDrive.Tests
+namespace VectorRoad.Tests
{
[TestFixture]
public class MapWayTests
diff --git a/Tests/TerraDrive.Tests/MaterialRegistryTests.cs b/Tests/VectorRoad.Tests/MaterialRegistryTests.cs
similarity index 99%
rename from Tests/TerraDrive.Tests/MaterialRegistryTests.cs
rename to Tests/VectorRoad.Tests/MaterialRegistryTests.cs
index 256e690..4573bc9 100644
--- a/Tests/TerraDrive.Tests/MaterialRegistryTests.cs
+++ b/Tests/VectorRoad.Tests/MaterialRegistryTests.cs
@@ -1,8 +1,8 @@
using NUnit.Framework;
using UnityEngine;
-using TerraDrive.Procedural;
+using VectorRoad.Procedural;
-namespace TerraDrive.Tests
+namespace VectorRoad.Tests
{
[TestFixture]
public class MaterialRegistryTests
diff --git a/Tests/TerraDrive.Tests/MinimapRendererTests.cs b/Tests/VectorRoad.Tests/MinimapRendererTests.cs
similarity index 99%
rename from Tests/TerraDrive.Tests/MinimapRendererTests.cs
rename to Tests/VectorRoad.Tests/MinimapRendererTests.cs
index 94f1f73..0ec6ba6 100644
--- a/Tests/TerraDrive.Tests/MinimapRendererTests.cs
+++ b/Tests/VectorRoad.Tests/MinimapRendererTests.cs
@@ -1,10 +1,10 @@
using System.Collections.Generic;
using NUnit.Framework;
using UnityEngine;
-using TerraDrive.DataInversion;
-using TerraDrive.Hud;
+using VectorRoad.DataInversion;
+using VectorRoad.Hud;
-namespace TerraDrive.Tests
+namespace VectorRoad.Tests
{
[TestFixture]
public class MinimapRendererTests
diff --git a/Tests/TerraDrive.Tests/OSMParserRealDataTests.cs b/Tests/VectorRoad.Tests/OSMParserRealDataTests.cs
similarity index 96%
rename from Tests/TerraDrive.Tests/OSMParserRealDataTests.cs
rename to Tests/VectorRoad.Tests/OSMParserRealDataTests.cs
index 4da79ce..977976a 100644
--- a/Tests/TerraDrive.Tests/OSMParserRealDataTests.cs
+++ b/Tests/VectorRoad.Tests/OSMParserRealDataTests.cs
@@ -1,9 +1,9 @@
using System.IO;
using NUnit.Framework;
-using TerraDrive.Core;
-using TerraDrive.DataInversion;
+using VectorRoad.Core;
+using VectorRoad.DataInversion;
-namespace TerraDrive.Tests
+namespace VectorRoad.Tests
{
///
/// Tests that parse the Assets/StreamingAssets/Data/map.osm.xml sample file to verify
diff --git a/Tests/TerraDrive.Tests/OSMParserTests.cs b/Tests/VectorRoad.Tests/OSMParserTests.cs
similarity index 99%
rename from Tests/TerraDrive.Tests/OSMParserTests.cs
rename to Tests/VectorRoad.Tests/OSMParserTests.cs
index 7f5a4e0..b5afbc4 100644
--- a/Tests/TerraDrive.Tests/OSMParserTests.cs
+++ b/Tests/VectorRoad.Tests/OSMParserTests.cs
@@ -5,10 +5,10 @@
using System.Threading.Tasks;
using NUnit.Framework;
using UnityEngine;
-using TerraDrive.DataInversion;
-using TerraDrive.Terrain;
+using VectorRoad.DataInversion;
+using VectorRoad.Terrain;
-namespace TerraDrive.Tests
+namespace VectorRoad.Tests
{
///
/// Unit tests for .
diff --git a/Tests/TerraDrive.Tests/OpenElevationSourceTests.cs b/Tests/VectorRoad.Tests/OpenElevationSourceTests.cs
similarity index 99%
rename from Tests/TerraDrive.Tests/OpenElevationSourceTests.cs
rename to Tests/VectorRoad.Tests/OpenElevationSourceTests.cs
index e12bb5c..ae21553 100644
--- a/Tests/TerraDrive.Tests/OpenElevationSourceTests.cs
+++ b/Tests/VectorRoad.Tests/OpenElevationSourceTests.cs
@@ -6,9 +6,9 @@
using System.Threading;
using System.Threading.Tasks;
using NUnit.Framework;
-using TerraDrive.Terrain;
+using VectorRoad.Terrain;
-namespace TerraDrive.Tests
+namespace VectorRoad.Tests
{
///
/// Unit tests for , covering JSON building,
diff --git a/Tests/TerraDrive.Tests/OsmDownloaderTests.cs b/Tests/VectorRoad.Tests/OsmDownloaderTests.cs
similarity index 99%
rename from Tests/TerraDrive.Tests/OsmDownloaderTests.cs
rename to Tests/VectorRoad.Tests/OsmDownloaderTests.cs
index a97810b..b7c7e4a 100644
--- a/Tests/TerraDrive.Tests/OsmDownloaderTests.cs
+++ b/Tests/VectorRoad.Tests/OsmDownloaderTests.cs
@@ -8,10 +8,10 @@
using System.Threading;
using System.Threading.Tasks;
using NUnit.Framework;
-using TerraDrive.Terrain;
-using TerraDrive.Tools;
+using VectorRoad.Terrain;
+using VectorRoad.Tools;
-namespace TerraDrive.Tests
+namespace VectorRoad.Tests
{
///
/// Unit tests for .
diff --git a/Tests/TerraDrive.Tests/OsmLevelLoaderTests.cs b/Tests/VectorRoad.Tests/OsmLevelLoaderTests.cs
similarity index 99%
rename from Tests/TerraDrive.Tests/OsmLevelLoaderTests.cs
rename to Tests/VectorRoad.Tests/OsmLevelLoaderTests.cs
index 162670e..0ec06a3 100644
--- a/Tests/TerraDrive.Tests/OsmLevelLoaderTests.cs
+++ b/Tests/VectorRoad.Tests/OsmLevelLoaderTests.cs
@@ -1,12 +1,12 @@
using NUnit.Framework;
-using TerraDrive.Core;
+using VectorRoad.Core;
-namespace TerraDrive.Tests
+namespace VectorRoad.Tests
{
///
/// Unit tests for — the pure-C# helper that validates
/// GPS-coordinate settings for the
- /// TerraDrive → Load OSM File / Generate Level editor menu item.
+ /// VectorRoad → Load OSM File / Generate Level editor menu item.
///
[TestFixture]
public class OsmLevelLoaderTests
diff --git a/Tests/TerraDrive.Tests/PlaceholderMaterialFactoryTests.cs b/Tests/VectorRoad.Tests/PlaceholderMaterialFactoryTests.cs
similarity index 99%
rename from Tests/TerraDrive.Tests/PlaceholderMaterialFactoryTests.cs
rename to Tests/VectorRoad.Tests/PlaceholderMaterialFactoryTests.cs
index 68d6f77..e5aa8de 100644
--- a/Tests/TerraDrive.Tests/PlaceholderMaterialFactoryTests.cs
+++ b/Tests/VectorRoad.Tests/PlaceholderMaterialFactoryTests.cs
@@ -1,8 +1,8 @@
using NUnit.Framework;
using UnityEngine;
-using TerraDrive.Procedural;
+using VectorRoad.Procedural;
-namespace TerraDrive.Tests
+namespace VectorRoad.Tests
{
[TestFixture]
public class PlaceholderMaterialFactoryTests
diff --git a/Tests/TerraDrive.Tests/RegionTypeTests.cs b/Tests/VectorRoad.Tests/RegionTypeTests.cs
similarity index 97%
rename from Tests/TerraDrive.Tests/RegionTypeTests.cs
rename to Tests/VectorRoad.Tests/RegionTypeTests.cs
index f3a84c5..4137b75 100644
--- a/Tests/TerraDrive.Tests/RegionTypeTests.cs
+++ b/Tests/VectorRoad.Tests/RegionTypeTests.cs
@@ -1,8 +1,8 @@
using System;
using NUnit.Framework;
-using TerraDrive.DataInversion;
+using VectorRoad.DataInversion;
-namespace TerraDrive.Tests
+namespace VectorRoad.Tests
{
[TestFixture]
public class RegionTypeTests
diff --git a/Tests/TerraDrive.Tests/RoadMeshExtruderTests.cs b/Tests/VectorRoad.Tests/RoadMeshExtruderTests.cs
similarity index 99%
rename from Tests/TerraDrive.Tests/RoadMeshExtruderTests.cs
rename to Tests/VectorRoad.Tests/RoadMeshExtruderTests.cs
index c43f1aa..98463a6 100644
--- a/Tests/TerraDrive.Tests/RoadMeshExtruderTests.cs
+++ b/Tests/VectorRoad.Tests/RoadMeshExtruderTests.cs
@@ -1,10 +1,10 @@
using System.Collections.Generic;
using NUnit.Framework;
using UnityEngine;
-using TerraDrive.DataInversion;
-using TerraDrive.Procedural;
+using VectorRoad.DataInversion;
+using VectorRoad.Procedural;
-namespace TerraDrive.Tests
+namespace VectorRoad.Tests
{
[TestFixture]
public class RoadMeshExtruderTests
diff --git a/Tests/TerraDrive.Tests/RoadSurfaceDeformerTests.cs b/Tests/VectorRoad.Tests/RoadSurfaceDeformerTests.cs
similarity index 99%
rename from Tests/TerraDrive.Tests/RoadSurfaceDeformerTests.cs
rename to Tests/VectorRoad.Tests/RoadSurfaceDeformerTests.cs
index 0324d44..04a887d 100644
--- a/Tests/TerraDrive.Tests/RoadSurfaceDeformerTests.cs
+++ b/Tests/VectorRoad.Tests/RoadSurfaceDeformerTests.cs
@@ -2,10 +2,10 @@
using System.Linq;
using NUnit.Framework;
using UnityEngine;
-using TerraDrive.DataInversion;
-using TerraDrive.Procedural;
+using VectorRoad.DataInversion;
+using VectorRoad.Procedural;
-namespace TerraDrive.Tests
+namespace VectorRoad.Tests
{
[TestFixture]
public class RoadSurfaceDeformerTests
diff --git a/Tests/TerraDrive.Tests/RoadTypeTests.cs b/Tests/VectorRoad.Tests/RoadTypeTests.cs
similarity index 98%
rename from Tests/TerraDrive.Tests/RoadTypeTests.cs
rename to Tests/VectorRoad.Tests/RoadTypeTests.cs
index 68e899b..db621ae 100644
--- a/Tests/TerraDrive.Tests/RoadTypeTests.cs
+++ b/Tests/VectorRoad.Tests/RoadTypeTests.cs
@@ -1,8 +1,8 @@
using System;
using NUnit.Framework;
-using TerraDrive.DataInversion;
+using VectorRoad.DataInversion;
-namespace TerraDrive.Tests
+namespace VectorRoad.Tests
{
[TestFixture]
public class RoadTypeTests
diff --git a/Tests/TerraDrive.Tests/RoadsidePropPlacerTests.cs b/Tests/VectorRoad.Tests/RoadsidePropPlacerTests.cs
similarity index 99%
rename from Tests/TerraDrive.Tests/RoadsidePropPlacerTests.cs
rename to Tests/VectorRoad.Tests/RoadsidePropPlacerTests.cs
index b12b676..14cb441 100644
--- a/Tests/TerraDrive.Tests/RoadsidePropPlacerTests.cs
+++ b/Tests/VectorRoad.Tests/RoadsidePropPlacerTests.cs
@@ -3,10 +3,10 @@
using System.Linq;
using NUnit.Framework;
using UnityEngine;
-using TerraDrive.DataInversion;
-using TerraDrive.Procedural;
+using VectorRoad.DataInversion;
+using VectorRoad.Procedural;
-namespace TerraDrive.Tests
+namespace VectorRoad.Tests
{
[TestFixture]
public class RoadsidePropPlacerTests
diff --git a/Tests/TerraDrive.Tests/SpeedometerTests.cs b/Tests/VectorRoad.Tests/SpeedometerTests.cs
similarity index 98%
rename from Tests/TerraDrive.Tests/SpeedometerTests.cs
rename to Tests/VectorRoad.Tests/SpeedometerTests.cs
index 2657a09..09b5488 100644
--- a/Tests/TerraDrive.Tests/SpeedometerTests.cs
+++ b/Tests/VectorRoad.Tests/SpeedometerTests.cs
@@ -1,7 +1,7 @@
using NUnit.Framework;
-using TerraDrive.Vehicle;
+using VectorRoad.Vehicle;
-namespace TerraDrive.Tests
+namespace VectorRoad.Tests
{
[TestFixture]
public class SpeedometerTests
diff --git a/Tests/TerraDrive.Tests/Stubs/UnityEngine.cs b/Tests/VectorRoad.Tests/Stubs/UnityEngine.cs
similarity index 100%
rename from Tests/TerraDrive.Tests/Stubs/UnityEngine.cs
rename to Tests/VectorRoad.Tests/Stubs/UnityEngine.cs
diff --git a/Tests/TerraDrive.Tests/TerrainMeshGeneratorTests.cs b/Tests/VectorRoad.Tests/TerrainMeshGeneratorTests.cs
similarity index 99%
rename from Tests/TerraDrive.Tests/TerrainMeshGeneratorTests.cs
rename to Tests/VectorRoad.Tests/TerrainMeshGeneratorTests.cs
index 3bcaf9b..2b33e61 100644
--- a/Tests/TerraDrive.Tests/TerrainMeshGeneratorTests.cs
+++ b/Tests/VectorRoad.Tests/TerrainMeshGeneratorTests.cs
@@ -4,10 +4,10 @@
using System.Threading.Tasks;
using NUnit.Framework;
using UnityEngine;
-using TerraDrive.Core;
-using TerraDrive.Terrain;
+using VectorRoad.Core;
+using VectorRoad.Terrain;
-namespace TerraDrive.Tests
+namespace VectorRoad.Tests
{
///
/// Unit tests for , ,
diff --git a/Tests/TerraDrive.Tests/TerraDrive.Tests.csproj b/Tests/VectorRoad.Tests/VectorRoad.Tests.csproj
similarity index 100%
rename from Tests/TerraDrive.Tests/TerraDrive.Tests.csproj
rename to Tests/VectorRoad.Tests/VectorRoad.Tests.csproj
diff --git a/Tests/TerraDrive.Tests/WaterMeshGeneratorTests.cs b/Tests/VectorRoad.Tests/WaterMeshGeneratorTests.cs
similarity index 99%
rename from Tests/TerraDrive.Tests/WaterMeshGeneratorTests.cs
rename to Tests/VectorRoad.Tests/WaterMeshGeneratorTests.cs
index 242dc32..7078601 100644
--- a/Tests/TerraDrive.Tests/WaterMeshGeneratorTests.cs
+++ b/Tests/VectorRoad.Tests/WaterMeshGeneratorTests.cs
@@ -1,10 +1,10 @@
using System.Collections.Generic;
using NUnit.Framework;
using UnityEngine;
-using TerraDrive.DataInversion;
-using TerraDrive.Procedural;
+using VectorRoad.DataInversion;
+using VectorRoad.Procedural;
-namespace TerraDrive.Tests
+namespace VectorRoad.Tests
{
///
/// Unit tests for .
diff --git a/Tools/OsmDownloader/OsmDownloader.csproj b/Tools/OsmDownloader/OsmDownloader.csproj
index 3ab2b1c..7c55eff 100644
--- a/Tools/OsmDownloader/OsmDownloader.csproj
+++ b/Tools/OsmDownloader/OsmDownloader.csproj
@@ -5,7 +5,7 @@
net8.0
enable
OsmDownloader
- TerraDrive.Tools
+ VectorRoad.Tools
diff --git a/Tools/OsmDownloader/Program.cs b/Tools/OsmDownloader/Program.cs
index 3908392..dca241e 100644
--- a/Tools/OsmDownloader/Program.cs
+++ b/Tools/OsmDownloader/Program.cs
@@ -1,8 +1,8 @@
using System;
using System.Net.Http;
using System.Threading.Tasks;
-using TerraDrive.Terrain;
-using TerraDrive.Tools;
+using VectorRoad.Terrain;
+using VectorRoad.Tools;
///
/// Entry point for the OsmDownloader command-line tool.
diff --git a/Tools/README.md b/Tools/README.md
index 095ae15..cb7f702 100644
--- a/Tools/README.md
+++ b/Tools/README.md
@@ -1,6 +1,6 @@
# Tools
-Editor and command-line utilities for the TerraDrive pipeline.
+Editor and command-line utilities for the VectorRoad pipeline.
---
diff --git a/terradrive.slnx b/terradrive.slnx
deleted file mode 100644
index 3bb209a..0000000
--- a/terradrive.slnx
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/vectorroad.slnx b/vectorroad.slnx
new file mode 100644
index 0000000..d3b1951
--- /dev/null
+++ b/vectorroad.slnx
@@ -0,0 +1,5 @@
+
+
+
+
+