mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
fix find again (#346)
dont include prefabs in search or else distant proxies break horribly
This commit is contained in:
commit
e602354ac7
@ -119,9 +119,9 @@ namespace NewHorizons.Utility
|
|||||||
|
|
||||||
var name = names.Last();
|
var name = names.Last();
|
||||||
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
|
// 3: find resource to include inactive objects (but skip prefabs
|
||||||
// also includes prefabs but hopefully thats okay
|
go = Resources.FindObjectsOfTypeAll<GameObject>()
|
||||||
go = FindResourceOfTypeAndName<GameObject>(name);
|
.FirstOrDefault(x => x.name == name && 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