fix: behaviour controller initializing added behaviours when it itself is not initialized
This commit is contained in:
@@ -29,6 +29,7 @@ public class BehaviourController : BaseEntity, IBehaviourController
|
||||
behaviour.Assign(this);
|
||||
behaviour.Assign(Factory.StateEnableFactory.Instantiate(behaviour));
|
||||
|
||||
if (IsInitialized)
|
||||
behaviour.Initialize();
|
||||
behaviour.OnPriorityChanged += OnPriorityChange;
|
||||
OnBehaviourAdded?.InvokeSafe(this, behaviour);
|
||||
|
Reference in New Issue
Block a user