From b1fc3ac24aeca1801bc2f07666f08499ca3eb5fb Mon Sep 17 00:00:00 2001 From: trubkokrtek Date: Sun, 30 Nov 2025 08:46:19 +0100 Subject: [PATCH] Coroutines patch --- Assets/Scripts/GPSManager.cs | 6 +----- Assets/Scripts/MapRenderer.cs | 1 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Assets/Scripts/GPSManager.cs b/Assets/Scripts/GPSManager.cs index d12dfb3..214738a 100644 --- a/Assets/Scripts/GPSManager.cs +++ b/Assets/Scripts/GPSManager.cs @@ -14,11 +14,6 @@ public class GPSManager : MonoBehaviour private double? LastTime; void Start() - { - - } - - void Update() { StartCoroutine(UpdateGPS()); } @@ -68,5 +63,6 @@ public class GPSManager : MonoBehaviour Debug.Log("GPS location: " + LastCoords[0] + ", " + LastCoords[1] + " (time: " + LastTime + ")"); } + yield return StartCoroutine(UpdateGPS()); } } diff --git a/Assets/Scripts/MapRenderer.cs b/Assets/Scripts/MapRenderer.cs index 92d7941..c27ae52 100644 --- a/Assets/Scripts/MapRenderer.cs +++ b/Assets/Scripts/MapRenderer.cs @@ -94,6 +94,7 @@ public class MapRenderer : MonoBehaviour Debug.Log("Map generation complete: " + parsedWays.Count + " ways, " + nodes.Count + " nodes."); } + yield return StartCoroutine(RenderMap()); } void ClearChildren()