Update SearchUtilities.cs

This commit is contained in:
Will Corby 2022-09-02 21:27:30 -07:00 committed by GitHub
parent 5cf4150deb
commit 7f801039ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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}");
// 3: find resource to include inactive objects (but skip prefabs
go = Resources.FindObjectsOfTypeAll<GameObject>()
.FirstOrDefault(x.name == name && x => x.scene.name != null);
.FirstOrDefault(x => x.name == name && x.scene.name != null);
if (go)
{
CachedGameObjects.Add(path, go);