In my scenario, I have a BehaviorGraphAgent on a “Spawner” GameObject. Its graph is responsible for spawning prefabs. (hereafter referred to as SpawnerGraph)
A spawned prefab will add a “BehaviorGraphAgent” component at runtime, and assign a referenced Graph to it. (hereafter referred to as Graph)
The referenced Graph also contains a Sub-Graph. (hereafter referred to as SubGraph)
Any spawned prefab will correctly have its BehaviorGraphAgent added to it. The Graph on it will work as well, however when it reaches the first node of the SubGraph, it stops and the SubGraph remains pending.
I’ve been able to reproduce it on a clean project:
We’ve not documented this very well or added any warnings to alert you to what’s happening so I’ll talk to the team and see if we can get this improved.
Just adding here that @David and I are looking to simplify the API a bit so Init is implicitly called and Start isn’t called if it wasn’t initialised, but you can at least use the workaround for now
Thank you very much, this works indeed. I would have never thought it would be caused by not initializing the agent because the first node was being executed successfully. Anyway thanks for your help and thank you for working on the package.