From 2bcd1c5a89da2284245ec73d8e5550a085c919f0 Mon Sep 17 00:00:00 2001 From: Syntriax Date: Mon, 30 Sep 2024 19:55:14 +0300 Subject: [PATCH] fix: BehaviourController Manual AddBehaviour Assign Exceptions --- Engine.Core/BehaviourController.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Engine.Core/BehaviourController.cs b/Engine.Core/BehaviourController.cs index efda6d7..cddf92d 100644 --- a/Engine.Core/BehaviourController.cs +++ b/Engine.Core/BehaviourController.cs @@ -32,6 +32,9 @@ public class BehaviourController : IBehaviourController { InsertBehaviourByPriority(behaviour); + behaviour.Assign(this); + behaviour.Assign(GameObject.StateEnable); + behaviour.Initialize(); behaviour.OnPriorityChanged += OnPriorityChange; OnBehaviourAdded?.Invoke(this, behaviour);