mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Revert "Refresh cache only one scene change"
This reverts commit 127f8f62c576aedd92765792392a3703671bf50b.
This commit is contained in:
parent
50d483b731
commit
0ba8502398
@ -58,7 +58,6 @@ namespace NewHorizons
|
|||||||
private string _defaultStarSystem = "SolarSystem";
|
private string _defaultStarSystem = "SolarSystem";
|
||||||
private string _currentStarSystem = "SolarSystem";
|
private string _currentStarSystem = "SolarSystem";
|
||||||
private bool _isChangingStarSystem = false;
|
private bool _isChangingStarSystem = false;
|
||||||
private bool _refreshCacheOnLoad = false; // Will refresh when changing systems
|
|
||||||
private bool _firstLoad = true;
|
private bool _firstLoad = true;
|
||||||
private ShipWarpController _shipWarpController;
|
private ShipWarpController _shipWarpController;
|
||||||
|
|
||||||
@ -170,20 +169,10 @@ namespace NewHorizons
|
|||||||
|
|
||||||
private void OnSceneUnloaded(Scene scene)
|
private void OnSceneUnloaded(Scene scene)
|
||||||
{
|
{
|
||||||
// Always clear this one because the game objects will be null now
|
|
||||||
SearchUtilities.ClearCache();
|
SearchUtilities.ClearCache();
|
||||||
|
ImageUtilities.ClearCache();
|
||||||
// Clear caches if we've left the actual game scene or if we've specified to do it
|
AudioUtilities.ClearCache();
|
||||||
// Refresh cache of load should only be true if the new system isnt the same as the last one
|
AssetBundleUtilities.ClearCache();
|
||||||
if (_refreshCacheOnLoad || !_isChangingStarSystem)
|
|
||||||
{
|
|
||||||
ImageUtilities.ClearCache();
|
|
||||||
AudioUtilities.ClearCache();
|
|
||||||
AssetBundleUtilities.ClearCache();
|
|
||||||
}
|
|
||||||
|
|
||||||
_refreshCacheOnLoad = false;
|
|
||||||
|
|
||||||
IsSystemReady = false;
|
IsSystemReady = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -466,8 +455,6 @@ namespace NewHorizons
|
|||||||
sceneToLoad = OWScene.SolarSystem;
|
sceneToLoad = OWScene.SolarSystem;
|
||||||
}
|
}
|
||||||
|
|
||||||
_refreshCacheOnLoad = _currentStarSystem != newStarSystem;
|
|
||||||
|
|
||||||
_currentStarSystem = newStarSystem;
|
_currentStarSystem = newStarSystem;
|
||||||
|
|
||||||
LoadManager.LoadSceneAsync(sceneToLoad, true, LoadManager.FadeType.ToBlack, 0.1f, true);
|
LoadManager.LoadSceneAsync(sceneToLoad, true, LoadManager.FadeType.ToBlack, 0.1f, true);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user