feat: removed IEnumerable from IUniverseObject for intellisense clarity
Use IUniverseObject.Children to access children
This commit is contained in:
@@ -140,7 +140,7 @@ public static class BehaviourControllerExtensions
|
||||
if (behaviourController.GetBehaviour<T>() is T localBehaviour)
|
||||
return localBehaviour;
|
||||
|
||||
foreach (IUniverseObject child in behaviourController.UniverseObject)
|
||||
foreach (IUniverseObject child in behaviourController.UniverseObject.Children)
|
||||
if (GetBehaviourInChildren<T>(child.BehaviourController) is T behaviour)
|
||||
return behaviour;
|
||||
|
||||
@@ -176,7 +176,7 @@ public static class BehaviourControllerExtensions
|
||||
foreach (T behaviour in cache)
|
||||
behaviours.Add(behaviour);
|
||||
|
||||
foreach (IUniverseObject child in universeObject)
|
||||
foreach (IUniverseObject child in universeObject.Children)
|
||||
TraverseChildrenForBehaviour(child, behaviours, cache);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user