I’m sending an event from an FSM that works fine when it’s a global event but when directed to an agent their graph member is always null (debugging in VS). Tried send after a delay too, but same problem.
The agent has a graph type of Behaviour tree, so it knows what it should have in place, it’s just null.
Is it valid for the agent to have graph == null in this case?
When sent globally (i.e. iterate runningGraphs) it works fine, and the graph is there, with the given agent assigned ok.
Could this be a timing issue? The event is being sent for a triggerEnter and I know Unity can send its events at weird times.
aaaand we found the problem: The prefab had both FSM Owner (valid FSM set) and a BT Owner (no tree set) component.
Removing the empty BTO component sorted it.
Hello,
Sorry for the late reply and thanks for the follow up. I am glad that you’ve found the problem 🙂
If you encounter anything else, please let me know.