mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
fix find again by not including prefabs
This commit is contained in:
parent
e874f5b012
commit
680314645d
@ -119,9 +119,9 @@ namespace NewHorizons.Utility
|
||||
|
||||
var name = names.Last();
|
||||
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
|
||||
// also includes prefabs but hopefully thats okay
|
||||
go = FindResourceOfTypeAndName<GameObject>(name);
|
||||
// 3: find resource to include inactive objects (but skip prefabs
|
||||
go = Resources.FindObjectsOfTypeAll<GameObject>()
|
||||
.FirstOrDefault(x => x.scene.name != null && x.name == name);
|
||||
if (go)
|
||||
{
|
||||
CachedGameObjects.Add(path, go);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user