mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
oops
This commit is contained in:
parent
89a58c2a93
commit
ece07be2d6
@ -127,13 +127,13 @@ namespace NewHorizons.Utility
|
||||
}
|
||||
Profiler.EndSample();
|
||||
|
||||
Profiler.BeginSample("1");
|
||||
Profiler.BeginSample("2");
|
||||
// 2: find inactive using root + transform.find
|
||||
var names = path.Split('/');
|
||||
|
||||
// Cache the root objects so we don't loop through all of them each time
|
||||
var rootName = names[0];
|
||||
if (!CachedRootGameObjects.TryGetValue(rootName, out var root))
|
||||
if (!CachedRootGameObjects.TryGetValue(rootName, out var root))
|
||||
{
|
||||
root = SceneManager.GetActiveScene().GetRootGameObjects().FirstOrDefault(x => x.name == rootName);
|
||||
if (root != null)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user