mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
womp womp
This commit is contained in:
parent
1961076664
commit
011cd4b44a
@ -36,6 +36,11 @@ namespace NewHorizons.Builder.Props
|
||||
}
|
||||
}
|
||||
|
||||
static DetailBuilder()
|
||||
{
|
||||
SceneManager.sceneUnloaded += SceneManager_sceneUnloaded;
|
||||
}
|
||||
|
||||
#region obsolete
|
||||
// Never change method signatures, people directly reference the NH dll and it can break backwards compatibility
|
||||
// In particular, Outer Wives needs this method signature
|
||||
@ -49,8 +54,9 @@ namespace NewHorizons.Builder.Props
|
||||
=> Make(go, sector, mod: null, detail);
|
||||
#endregion
|
||||
|
||||
public static void ClearCache()
|
||||
private static void SceneManager_sceneUnloaded(Scene scene)
|
||||
{
|
||||
// would be nice to only clear when system changes, but fixed prefabs rely on stuff in the scene
|
||||
foreach (var prefab in _fixedPrefabCache.Values)
|
||||
{
|
||||
UnityEngine.Object.Destroy(prefab.prefab);
|
||||
|
||||
@ -308,7 +308,6 @@ namespace NewHorizons
|
||||
ImageUtilities.ClearCache();
|
||||
AudioUtilities.ClearCache();
|
||||
AssetBundleUtilities.ClearCache();
|
||||
DetailBuilder.ClearCache();
|
||||
}
|
||||
|
||||
IsSystemReady = false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user