Overridden OnDrawGizmosSelected() in custom task never called

Forums 💬 NodeCanvas ⚙️ Support Overridden OnDrawGizmosSelected() in custom task never called

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #15819
    roffy437
    Participant

      Hi,

      I created a task that extends ActionTask and added an override of the method OnDrawGizmosSelected().

      In the Task class (where the virtual OnDrawGizmosSelected() is declared), the comment above the method says “Draw gizmos when the element containing the task is selected”.

      However my overridden OnDrawGizmosSelected() is never called even when my agent is selected (I’m sure of it because I tried to breakpoint into this method).

      Have I made something wrong? Thank you.

      #15821
      roffy437
      Participant

        Ok it’s weird but it seems sometimes it doesn’t work and sometimes it does.

        I think it is related to the fact my graph is bound to a prefab and when I look an instance the BT doesn’t like it very much (I have other “refresh” issues, I generally “fix” them by checking/unchecking the “Pre Initialize Sub Graphs” checkbox).

        It is probably not an issue anyway.

        #15820
        Gavalakis
        Keymaster

          Hello,

          The “DrawGizmosSelected” refers to the “NODE” or “CONNECTION” specifically being selected, not just the gameobject. 🙂

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