fuck it we ball

This commit is contained in:
JohnCorby 2022-06-30 21:07:22 -07:00
parent a6b3911e93
commit b5fafc59c8

View File

@ -92,6 +92,9 @@ namespace NewHorizons.Utility
{ {
if (CachedGameObjects.TryGetValue(path, out var go)) return go; if (CachedGameObjects.TryGetValue(path, out var go)) return go;
go = GameObject.Find(path);
if (go != null) return go;
var names = path.Split('/'); var names = path.Split('/');
var rootName = names[0]; var rootName = names[0];
var root = SceneManager.GetActiveScene().GetRootGameObjects().FirstOrDefault(x => x.name == rootName); var root = SceneManager.GetActiveScene().GetRootGameObjects().FirstOrDefault(x => x.name == rootName);