How to properly return object from node?

FlowCanvas Forums Support How to properly return object from node?

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2497
    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?

    #2498
    Gavalakis
    Keymaster

    Hello and welcome 🙂

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

    Join us on Discord: https://discord.gg/97q2Rjh

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