mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
find AstroObject instead of GameObject to hopefully not be as slow
This commit is contained in:
parent
d2009f7637
commit
2094ef711f
@ -132,7 +132,9 @@ namespace NewHorizons.Utility
|
|||||||
if (primary._customName.Equals("Sun Station"))
|
if (primary._customName.Equals("Sun Station"))
|
||||||
{
|
{
|
||||||
// there are multiple debris with the same name
|
// there are multiple debris with the same name
|
||||||
otherChildren.AddRange(GameObject.FindObjectsOfType<GameObject>().Where(x => x.name == "SS_Debris_Body"));
|
otherChildren.AddRange(Object.FindObjectsOfType<AstroObject>()
|
||||||
|
.Select(x => x.gameObject)
|
||||||
|
.Where(x => x.name == "SS_Debris_Body"));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user