mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Fix it breaking between loops if it didnt finish
This commit is contained in:
parent
31ada350b4
commit
c9d4125f95
@ -6,6 +6,7 @@ using System.Linq;
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Events;
|
using UnityEngine.Events;
|
||||||
using UnityEngine.Networking;
|
using UnityEngine.Networking;
|
||||||
|
using UnityEngine.SceneManagement;
|
||||||
|
|
||||||
namespace NewHorizons.Utility.Files;
|
namespace NewHorizons.Utility.Files;
|
||||||
|
|
||||||
@ -134,6 +135,14 @@ public class SlideReelAsyncImageLoader
|
|||||||
public void Awake()
|
public void Awake()
|
||||||
{
|
{
|
||||||
Instance = this;
|
Instance = this;
|
||||||
|
SceneManager.sceneUnloaded += OnSceneUnloaded;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnSceneUnloaded(Scene _)
|
||||||
|
{
|
||||||
|
StopAllCoroutines();
|
||||||
|
_loaders.Clear();
|
||||||
|
_isLoading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Load(SlideReelAsyncImageLoader loader)
|
public void Load(SlideReelAsyncImageLoader loader)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user