Performance instantiating hundreds of BTs

NodeCanvas Forums General Discussion Performance instantiating hundreds of BTs

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #13275
    bzwill
    Participant

    Hi there,

    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?

    Thanks

    Attachments:
    You must be logged in to view attached files.
    #13282
    Gavalakis
    Keymaster

    Hello,

    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.

    Thanks!

    Join us on Discord: https://discord.gg/97q2Rjh

    #13290
    bzwill
    Participant

    Ah thank you so much! That’s great!

    If its not already (I tried to check) this might be a good thing to put in documentation 🙂

    #13295
    Gavalakis
    Keymaster

    Thanks! 🙂
    I’ve just added this info in the docs.

    Join us on Discord: https://discord.gg/97q2Rjh

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.