From 20126dfe91d4e4150fd173a5f6620900a33fddf6 Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Sat, 19 Jul 2025 00:59:47 -0700 Subject: [PATCH] unload streaming in custom systems --- NewHorizons/Handlers/PlanetCreationHandler.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/NewHorizons/Handlers/PlanetCreationHandler.cs b/NewHorizons/Handlers/PlanetCreationHandler.cs index 1528151d..4730e58e 100644 --- a/NewHorizons/Handlers/PlanetCreationHandler.cs +++ b/NewHorizons/Handlers/PlanetCreationHandler.cs @@ -42,6 +42,15 @@ namespace NewHorizons.Handlers public static void Init(List 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) {