[REQUEST] Custom warning/error icons in custom nodes (from other assemblies)

Forums 💬 NodeCanvas ⚙️ Support [REQUEST] Custom warning/error icons in custom nodes (from other assemblies)

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #16059
    andy miira
    Participant

      Is there any public way to do custom error checking (with visual feedback) in custom Tasks? (similar to Playmaker’s ErrorCheck() override)

      I noticed that in Task.cs, there’s the virtual method GetWarningOrError(), that does exactly what I want if I override it. (for example, to display a custom warning in the node, if some task validation fails)
      But that method’s access modifier is defined as “internal”, so I can’t override it from custom Tasks in other assemblies (outside of the ParadoxNotion assembly).

      Shouldn’t GetWarningOrError() be defined as virtual protected/public, instead?
      Or is there any other way to do my custom warnings in the node/task GUI?

      #16062
      Gavalakis
      Keymaster

        Hello again,

        Right now there is only the [RequiredField] attribute which checks for whether or not a field is null (or string.Empty). With that said however, I went ahead and added your request by adding a new virtual method named “OnErrorCheck” that you can override to achieve what you are after.

        Please open up Task.cs and add the following in GetWarningOrError method:

        Then of course, also add this somewhere in the same class:

        The above changes will of course exist in the next version update.
        Please let me know if that works for you.
        Thank you 🙂

        #16061
        andy miira
        Participant

          Okay, the OnErrorCheck override worked perfectly 🙂

          Thanks for adding my feature request!

          #16060
          Gavalakis
          Keymaster

            You are welcome! I am glad this works for you. It will be there in the next version of course 🙂

            Happy new year!

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