Initializing 30 behavior trees at the same time stalls and takes 100ms

Forums 💬 NodeCanvas ⚙️ Support Initializing 30 behavior trees at the same time stalls and takes 100ms

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #15808
    lizhi
    Participant

      Initializing 30 behavior trees at the same time stalls and takes 100ms, when the behavior tree is deleted, it only takes 10ms, what is the solution

       

      <audio style=”display: none;” controls=”controls”></audio>

      #15809
      Gavalakis
      Keymaster

        Hello there,

        Instantiating objects in realtime will naturally have a performance hit because of the object (and the graph it has) being deserialized. However for these situations, you can enabled the “Async” initialization for graphs. To do this, please select your BehaviourTreeOwners that you are instantiating and change the parameters named “First Activation” to be “Async” (instead of “On Enable”). This will make the graphs deserialize and initialize in a separate thread and thus will minimize the performance hit.

        Let me know if that works for you.

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