Huge Lag when instantiate AI in runtime

Forums 💬 NodeCanvas ⚙️ Support Huge Lag when instantiate AI in runtime

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #18295
    anarkito
    Participant

      We are experimenting a huge lag every time we try to intantiate any AI in runtime.

      Unity version (5.1.3f1)
      NodeCanvas version 2.5.6

      Hope you can help us.

      Thank you in advance.

      #18300
      Gavalakis
      Keymaster

        Hello,

        When a gameobject with a graph is instantiated, there is bound to be some slow down due to initialization, but maybe you are experience more than it should. Does this happen for you with any graph, or just a specific one?

        Thanks.

        #18299
        anarkito
        Participant

          Sorry for the delay.

          The problem happens with specific one. We try to use a generic FSM for all our enemies just changing the BTs that are inside the fsm.

          Thank you in advance.

          #18298
          Gavalakis
          Keymaster

            Hello,
            Could you please post a screenshot of that FSM to check it out?
            Also, it’s generally much better to pre-instantiate your AI and use them when needed if possible (enable/disable), instead of instantiating them on the fly while player is playing, since unfortunately, instantiation and thus initialization will always create a bit of overhead the more complex the graphs are due to deserialization.
            Thanks.

            #18297
            anarkito
            Participant

              Hi there, we just update to new version of node and now that huge lag have been decrease a lot.

              We still experiment a bit of lag. But we are going to check it out to see if we can improve the performce of our FSM.

              I will post if we can fix it or we still need help.

              Again thank you very much.

              #18296
              Gavalakis
              Keymaster

                Hey,
                Thanks for letting me know. There were some improvements up from the previous version 2.5.6 you were using before.
                Of course, if you need any further help or have any potential fixed, please let me know.
                Thanks!

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