From 3e65568338d611abb77a81b86c14b10bf45e9855 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 5 Aug 2022 23:52:27 +0000 Subject: [PATCH 1/2] Updated Schemas --- NewHorizons/Schemas/body_schema.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NewHorizons/Schemas/body_schema.json b/NewHorizons/Schemas/body_schema.json index 51b5bc9c..fece6448 100644 --- a/NewHorizons/Schemas/body_schema.json +++ b/NewHorizons/Schemas/body_schema.json @@ -1016,6 +1016,10 @@ "parentPath": { "type": "string", "description": "The path (not including the root planet object) of the parent of this game object. Optional (will default to the root sector)." + }, + "keepLoaded": { + "type": "boolean", + "description": "Should this detail stay loaded even if you're outside the sector (good for very large props)" } } }, From 2b6bb6c5d25e7c90b9890a4d1e7bf028f2ece110 Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 5 Aug 2022 19:57:14 -0400 Subject: [PATCH 2/2] Probably less laggy --- NewHorizons/Handlers/StreamingHandler.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/NewHorizons/Handlers/StreamingHandler.cs b/NewHorizons/Handlers/StreamingHandler.cs index 56d455a6..4a8664e5 100644 --- a/NewHorizons/Handlers/StreamingHandler.cs +++ b/NewHorizons/Handlers/StreamingHandler.cs @@ -83,8 +83,10 @@ namespace NewHorizons.Handlers { sector.OnOccupantEnterSector += _ => { - foreach (var assetBundle in assetBundles) - StreamingManager.LoadStreamingAssets(assetBundle); + // If both are already in then it already loaded + if (sector.ContainsOccupant(DynamicOccupant.Player) && sector.ContainsOccupant(DynamicOccupant.Probe)) return; + + foreach (var assetBundle in assetBundles) StreamingManager.LoadStreamingAssets(assetBundle); }; /* sector.OnOccupantExitSector += _ =>