I've got a similar issue to https://www.opsive.com/forum/index.php?threads/event-system-examples.4221/ but couldn't fix it with the answer there nor the examples in the documentation.
I am trying to build a behavior where the AI continues with a given task until it receives an event to start a new task. Each task is a tree with conditional abort, like this:
I'm trying to execute events, i.e. switch to the relevant branch, by sending an event and some parameters, which differ per branch, like this:
The HasReceivedEvents never go green. I've tried without the explicit cast as well. I've tried sending the event inside the tree using the SendEvent task and that works. What am I doing wrong?
I am trying to build a behavior where the AI continues with a given task until it receives an event to start a new task. Each task is a tree with conditional abort, like this:
I'm trying to execute events, i.e. switch to the relevant branch, by sending an event and some parameters, which differ per branch, like this:
C#:
behaviorTree.SendEvent<object, object>("StartTask", (object)spot.gameObject, (object)"walking");
The HasReceivedEvents never go green. I've tried without the explicit cast as well. I've tried sending the event inside the tree using the SendEvent task and that works. What am I doing wrong?