mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Update SearchUtilities.cs
This commit is contained in:
parent
680314645d
commit
5cf4150deb
@ -121,7 +121,7 @@ namespace NewHorizons.Utility
|
|||||||
if (warn) Logger.LogWarning($"Couldn't find object in path {path}, will look for potential matches for name {name}");
|
if (warn) Logger.LogWarning($"Couldn't find object in path {path}, will look for potential matches for name {name}");
|
||||||
// 3: find resource to include inactive objects (but skip prefabs
|
// 3: find resource to include inactive objects (but skip prefabs
|
||||||
go = Resources.FindObjectsOfTypeAll<GameObject>()
|
go = Resources.FindObjectsOfTypeAll<GameObject>()
|
||||||
.FirstOrDefault(x => x.scene.name != null && x.name == name);
|
.FirstOrDefault(x.name == name && x => x.scene.name != null);
|
||||||
if (go)
|
if (go)
|
||||||
{
|
{
|
||||||
CachedGameObjects.Add(path, go);
|
CachedGameObjects.Add(path, go);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user