private static void UnloadRace(Scene scene) { if (!RaceStarted) { return; } Debug.LogWarning("Unloading Race"); Instance.Reset(); Instance.raceUiPrefab.ReleaseAsset(); }
public static void UnloadRace() { Debug.LogWarning("Unloading Race"); if (Instance.raceUiPrefab != null && Instance.raceUiPrefab.IsValid()) { Instance.raceUiPrefab.ReleaseAsset(); } Instance.Reset(); AppSettings.LoadScene(0, LoadSceneMode.Single); }