How to properly return object from node?

Forums 💬 FlowCanvas ⚙️ Support How to properly return object from node?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #12676
    sanec9999
    Participant

      Hi.

      I want to create custom node, which would return random object from the list, but i cant figure out how to make this node universal as the “Get random list item” node. “Get random list item” can input list of objects of any type and can output object of any type.

      What is a proper way to create input and output for node which could be any type of object?

      I’ve created my node like this:

      And used it like this:

      But when i got these errors:

      What am i doing wrong?

      #12677
      Gavalakis
      Keymaster

        Hello and welcome 🙂

        You basically need to use the “T” generic parameter in place where you have used “object” 🙂

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