If you enable behavior and send event in the same scope, it won't be received. Probably because HasReceivedEvent tasks register their events OnStart.
I fixed this issue just by moving to OnAwake inside the task, and it works.
It is convenient to initialize variables in the tree with events when enabling, so I suggest to make this default.
I fixed this issue just by moving to OnAwake inside the task, and it works.
C#:
namespace BehaviorDesigner.Runtime.Tasks
{
public class HasReceivedEventFixed : HasReceivedEvent
{
public override void OnAwake()
{
base.OnStart();
}
}
}
It is convenient to initialize variables in the tree with events when enabling, so I suggest to make this default.