refactor!: IGameObject removed
This commit is contained in:
@@ -57,7 +57,7 @@ public static class BehaviourControllerExtensions
|
||||
if (behaviourController.GetBehaviour<T>() is T behaviour)
|
||||
return behaviour;
|
||||
|
||||
controller = controller.GameObject.Transform.Parent?.GameObject.BehaviourController;
|
||||
controller = controller.HierarchyObject.Parent?.BehaviourController;
|
||||
}
|
||||
|
||||
return default;
|
||||
@@ -87,8 +87,8 @@ public static class BehaviourControllerExtensions
|
||||
if (behaviourController.GetBehaviour<T>() is T localBehaviour)
|
||||
return localBehaviour;
|
||||
|
||||
foreach (ITransform transform in behaviourController.GameObject.Transform)
|
||||
if (GetBehaviourInChildren<T>(transform.GameObject.BehaviourController) is T behaviour)
|
||||
foreach (IHierarchyObject child in behaviourController.HierarchyObject)
|
||||
if (GetBehaviourInChildren<T>(child.BehaviourController) is T behaviour)
|
||||
return behaviour;
|
||||
|
||||
return default;
|
||||
|
Reference in New Issue
Block a user