How to set short description on an action node/leaf

Forums 💬 NodeCanvas 🗨️ General Discussion How to set short description on an action node/leaf

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #13678
    bzwill
    Participant

      Hi there,

      I just bought this asset, and I must say, it’s really, really fantastic. I love the attention to UX and design as well, which makes it very enjoyable to explore – Great work!

      My question is, how can I control the short text description I see on nodes? When making my own custom actions it displays the class name by default. But I would love to display a description which all pulled a key variable such as the wait action.

      Thanks for your help 🙂

      #13682
      bzwill
      Participant

        ugh.. I don’t believe I missed this – I have solved my problem thanks –

        For anyone else looking you can override the string property ‘info’.

        Thanks again 🙂

        #13681
        Gavalakis
        Keymaster

          Hey,

          Thanks a lot for your kind words. I am really glad you like NodeCanvas!
          I am also glad you’ve found the solution. Indeed. You just need to override the “info” property. 😉
          When doing so, remember that BBParameters already override ToString on their own to return a nicely formatted text depending on whether a direct value is set, or a variable is linked to them, so when using a BBParameter in your information to be shown, you can just do something like this:
          get {return string.Format("Wait {0} sec.", waitTime);}

          Thanks again!

          #13680
          bzwill
          Participant

            Perfect!
            Thanks for the extra information as well. I intended to leave a review on the asset store as well, I just want to spend a few more days with NC first to ensure it’s comprehensive

            – Thanks for authoring such a great tool, I hope you can keep it up for a long time! Let us all know if there’s anything we can do to help you too 🙂

            #13679
            Gavalakis
            Keymaster

              You are very welcome and thanks a lot for your very positive feedback!
              I am really glad you like NodeCanvas. Don’t worry. I do plan to keep NC up, running and updated for a long time ahead indeed 🙂

              Thanks again!

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