GraphEditor.DrawGrid fix performance

Forums 💬 NodeCanvas 🗨️ General Discussion GraphEditor.DrawGrid fix performance

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #13837
    psykaw
    Participant

      Hello,

      I have huge perfomance issues cause by GraphEditor.DrawGrid so I rewrited the DrawGrid function which have execution time divided by 10:
      Replace in GraphEditor.cs DrawGrid function by this piece of code:

      Of course @Gavalakis you can use it for next update if you want!

      #13840
      Gavalakis
      Keymaster

        Hello,

        Indeed the grid function was way too slow because of many lines drawn and being part of the zoom group.
        I have already changed the way it works to be faster, but of course also using GL directly is probably going to be further better as well, so thank you for that!
        What version of unity is this code on? I am asking because it seems that the method “s_applyWireMaterialMethod” can not be found.

        Thank you!

        #13839
        psykaw
        Participant

          Oh :(. So try something like that:

          It should works!

          #13838
          Gavalakis
          Keymaster

            Thanks for the follow up!

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