I’m instantiating a Prefab which contains a BehaviorAgent without a Graph assigned. Upon instantiation, I’d like to choose a suitable BehaviorGraph from a list of graphs, however simply using “BehaviorAgent.Graph” property’s setter is incredibly slow and the game will noticeably freeze for a bit. Are there any plans to improve the performance in this aspect? I can see that having a BehaviorGraph pre-assigned inside the prefab will not cause a freeze upon instantiation.
Hi,
We’re aware of some performance issues with this workflow and will investigate. Is the graph you’re assigning particularly complex?
Thanks,
Hi David, the graph I’m assigning is very simple:
Main graph:
It runs a sub-graph, which looks like this:
Ok thanks, we’ll take a look.
1 Like
Hi,
I can’t reproduce this locally. Would you be happy to send us your project?
Thanks
Well that’s embarassing… After I’ve restarted Unity, the issue I had completely vanished. To be fair, I’ve been keeping the editor open for quite a while…
It seems like everything works fine. Sorry for wasting your time and thank you very much for your eager troubleshooting. Oops!
Don’t worry about it, we’re happy to help! ![]()
Hopefully it doesn’t come back.
1 Like

