unload streaming in custom systems

This commit is contained in:
JohnCorby 2025-07-19 00:59:47 -07:00
parent 01866cc6be
commit 20126dfe91

View File

@ -42,6 +42,15 @@ namespace NewHorizons.Handlers
public static void Init(List<NewHorizonsBody> bodies)
{
// TH gets preloaded in title screen. custom systems dont need this
if (Main.Instance.CurrentStarSystem is not ("SolarSystem" or "EyeOfTheUniverse"))
{
foreach (var bundle in StreamingManager.s_activeBundles)
{
StreamingManager.UnloadStreamingAssets(bundle.assetBundleName);
}
}
// Start by destroying all planets if need be
if (Main.SystemDict[Main.Instance.CurrentStarSystem].Config.destroyStockPlanets)
{