From 2094ef711fb3afda9d9eac700a44c3d73b4e792b Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Sun, 22 May 2022 13:09:58 -0700 Subject: [PATCH] find AstroObject instead of GameObject to hopefully not be as slow --- NewHorizons/Utility/AstroObjectLocator.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/NewHorizons/Utility/AstroObjectLocator.cs b/NewHorizons/Utility/AstroObjectLocator.cs index 8d33aa59..428e0f4b 100644 --- a/NewHorizons/Utility/AstroObjectLocator.cs +++ b/NewHorizons/Utility/AstroObjectLocator.cs @@ -132,7 +132,9 @@ namespace NewHorizons.Utility if (primary._customName.Equals("Sun Station")) { // there are multiple debris with the same name - otherChildren.AddRange(GameObject.FindObjectsOfType().Where(x => x.name == "SS_Debris_Body")); + otherChildren.AddRange(Object.FindObjectsOfType() + .Select(x => x.gameObject) + .Where(x => x.name == "SS_Debris_Body")); } break; default: