fix for Loader state management

This commit is contained in:
in0finite 2022-03-24 17:06:01 +01:00
parent ea5fbb001b
commit 1a9efae6b8

View file

@ -149,6 +149,9 @@ namespace SanAndreasUnity.Behaviours
if (IsLoading)
return;
CleanupState();
IsLoading = true;
AddLoadingSteps();
s_coroutine = CoroutineManager.Start(LoadCoroutine(), OnLoadCoroutineFinishedOk, OnLoadCoroutineFinishedWithError);
@ -202,9 +205,6 @@ namespace SanAndreasUnity.Behaviours
private static IEnumerator LoadCoroutine ()
{
CleanupState();
IsLoading = true;
var stopwatch = System.Diagnostics.Stopwatch.StartNew ();
Debug.Log("Started loading GTA");