fix: BehaviourController Manual AddBehaviour Assign Exceptions

This commit is contained in:
Syntriax 2024-09-30 19:55:14 +03:00
parent 40d1ce7c68
commit 2bcd1c5a89
1 changed files with 3 additions and 0 deletions

View File

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