fix: GetBehaviourInParent not working properly

This commit is contained in:
Syntriax 2025-04-06 15:50:21 +03:00
parent 04d325f38b
commit 98c9dde98a

View File

@ -54,7 +54,7 @@ public static class BehaviourControllerExtensions
while (controller is not null)
{
if (behaviourController.GetBehaviour<T>() is T behaviour)
if (controller.GetBehaviour<T>() is T behaviour)
return behaviour;
controller = controller.HierarchyObject.Parent?.BehaviourController;