From df2c1c9533464622bb4f53cef7c04f85b3859ee8 Mon Sep 17 00:00:00 2001 From: Phantomical Date: Thu, 16 Jul 2026 12:30:53 -0700 Subject: [PATCH] Include kspedia bundles placed directly in GameData The parallel walk over all the directories missed this, so we need to explicitly add any bundles in the root. Fixes #407 --- KSPCommunityFixes/Performance/FastLoader.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/KSPCommunityFixes/Performance/FastLoader.cs b/KSPCommunityFixes/Performance/FastLoader.cs index fe50afb..1c1b047 100644 --- a/KSPCommunityFixes/Performance/FastLoader.cs +++ b/KSPCommunityFixes/Performance/FastLoader.cs @@ -3222,11 +3222,18 @@ static void PreloadAssetDefinitions() .AsParallel() .AsOrdered() .SelectMany(dir => dir.GetFiles(glob, SearchOption.AllDirectories)) + .Concat( + // Make sure to also grab bundles in the root directory + assetDir + .GetFiles(glob, SearchOption.TopDirectoryOnly) + .AsParallel() + .AsOrdered() + ) .Where(file => !assetBlacklist.Contains(file.Name)) .AsSequential(); - loader.allFilesList = new List(); - AssetBundleRequestCache = new List(); + loader.allFilesList = []; + AssetBundleRequestCache = []; var seen = new HashSet(); var requestCache = AssetBundleRequestCache;