I’m just experimenting with using a BT on an agent of which there will be 100s in game at any time. When all agents are first initialized there’s a huge spike, caused by calling Resources.FindObjectsOfTypeAll();
I have a few questions:
Can i work around this? Is this only called when in editor?
Are FSMs going to be faster than BTs for this many agents (if other things remain the same).
Any other tips when wanting to use 100s to 1000+ BTs?
This is only called in editor, yes.
This is only to support the icons in the hierarchy to be highlighted when a GraphOwner “state” change to enabled/disabled.
You can however disable this feature (and thus save the spike caused in the editor due to this), by disabling the option called “Highlight Active In Hierarchy” under the “Prefs” dropdown menu of the NodeCanvas editor toolbar.