Class ForEach
Loops over each element of a collection.
Syntax
[UnitTitle("For Each Loop")]
[UnitCategory("Control")]
[UnitOrder(10)]
public class ForEach : LoopUnit, IUnit, IGraphElementWithDebugData, IGraphElement, IGraphItem, INotifiedCollectionItem, IDisposable, IPrewarmable, IAotStubbable, IIdentifiable, IAnalyticsIdentifiable
Properties
collection
The collection over which to loop.
Declaration
[DoNotSerialize]
public ValueInput collection { get; }
Property Value
currentIndex
The current index of the loop.
Declaration
[DoNotSerialize]
[PortLabel("Index")]
public ValueOutput currentIndex { get; }
Property Value
currentItem
The current item of the loop.
Declaration
[DoNotSerialize]
[PortLabel("Item")]
public ValueOutput currentItem { get; }
Property Value
currentKey
The key of the current item of the loop.
Declaration
[DoNotSerialize]
[PortLabel("Key")]
public ValueOutput currentKey { get; }
Property Value
dictionary
Declaration
[Serialize]
[Inspectable]
[UnitHeaderInspectable("Dictionary")]
[InspectorToggleLeft]
public bool dictionary { get; set; }
Property Value
Methods
Definition()
Declaration
protected override void Definition()
Overrides
Loop(Flow)
Declaration
protected override ControlOutput Loop(Flow flow)
Parameters
Type |
Name |
Description |
Flow |
flow |
|
Returns
Overrides
LoopCoroutine(Flow)
Declaration
protected override IEnumerator LoopCoroutine(Flow flow)
Parameters
Type |
Name |
Description |
Flow |
flow |
|
Returns
Overrides
Extension Methods