Length of a list

FlowCanvas Forums Support Length of a list

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #3335
    wahn
    Participant

    Hello

    I try to find a node that can return the length of a list and can’t find anything useful :-/
    My flow instantiate gameobjects on a trigger but I don’t want them to exceed a certain number. I list before the creation with a GameObject find with tag node (that works great) the complete gameobjects but after I can’t figure how to get the size of that list. Is there a simple way ? (I am really bad at coding by the way..)

    Thx

    #3337
    Gavalakis
    Keymaster

    Hello and sorry for the late reply.

    If you have a node with a list or array output, you can drag and drop the output in the canvas and from the menu that will pop up, search and select the Get Count property (for lists), or the Get Length property (for array).

    The Find GameObjects With Tag returns an array, so you will want to use the Array Get Length property node.

    GetLength

    Let me know if that works for you.

    Thanks.

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

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