refactor!: IGameObject removed

This commit is contained in:
2025-03-28 17:47:05 +03:00
parent d825bb55d3
commit 4ec1a32db2
58 changed files with 937 additions and 1187 deletions

View File

@@ -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;