How to iterate on Transform children?

FlowCanvas Forums Support How to iterate on Transform children?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #2226
    yakdoggames
    Participant

    Hi, new to FlowCanvas.

    What I’m trying to do is to iterate on all the children of a Transform, this is very easily achieved in C# doing:

    But it seems I can’t make it to work on FlowCanvas, tried both Iterate nodes and I only get Null.

    Screenshot attached.

    Thanks.

    Attachments:
    You must be logged in to view attached files.
    #2228
    yakdoggames
    Participant

    Unity 2018.3.2f1
    FlowCanvas latest installed yesterday from assetstore (doesn’t say version number anywhere I can see)

    #2230
    Gavalakis
    Keymaster

    Hello and welcome,

    You should use the normal ForEach node instead of ForEach (T) node like so:
    ForEachTransform

    With that said though, there is a bug in the latest version which I’ve just fixed.
    I have attached for you here a unitypackage with the fix for your convenience.

    Please let me know if this works for you with the fix package imported.
    (The version by the way, can be seen on the top right corner of the Graph Editor toolbar)

    Thanks!

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

    Attachments:
    You must be logged in to view attached files.
    #2234
    yakdoggames
    Participant

    Thanks, will this fix be in the next asset store update?

    #2235
    yakdoggames
    Participant

    There is a compilation problem now:

    Assets\ParadoxNotion\FlowCanvas\Modules\FlowGraphs\TypeConverter.cs(58,88): error CS0117: 'ReflectionTools' does not contain a definition for 'SingleTempArgsArray'

    When importing the package you sent it only updates 1 file, TypeConverter.cs, maybe you forgot to add the changes in ReflectionTools.cs ?

    #2236
    yakdoggames
    Participant

    My Bad, I didn’t update FlowCanvas to the latest version from the AssetStore.

    But I’m still having troubles after updating and importing this custom package.

    From the for each to Log Value I’m getting a Transform.

    But at the same time if I connect it to the AddForce I’m getting NULL, Even if I use extract Transform I also Get NULL.

    Any Idea?

    Thanks.

    Attachments:
    You must be logged in to view attached files.
    #2239
    yakdoggames
    Participant

    Solved: Got help on the discord server and it seems I had to explicitly cast to Transform. My mind block was that Log Value was already showing it as Transform and the connection said Null instead of an Error on the AddForce so it never came to my mind that I had to force the Cast.

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