Class For
Loops between a first and last index at a specified step.
Syntax
[UnitTitle("For Loop")]
[UnitCategory("Control")]
[UnitOrder(9)]
public sealed class For : LoopUnit, IUnit, IGraphElementWithDebugData, IGraphElement, IGraphItem, INotifiedCollectionItem, IDisposable, IPrewarmable, IAotStubbable, IIdentifiable
Properties
currentIndex
The current index of the loop.
Declaration
[PortLabel("Index")]
[DoNotSerialize]
public ValueOutput currentIndex { get; }
Property Value
firstIndex
The index at which to start the loop (inclusive).
Declaration
[PortLabel("First")]
[DoNotSerialize]
public ValueInput firstIndex { get; }
Property Value
lastIndex
The index at which to end the loop (exclusive).
Declaration
[PortLabel("Last")]
[DoNotSerialize]
public ValueInput lastIndex { get; }
Property Value
step
The value by which the index will be incremented (or decremented, if negative) after each loop.
Declaration
[DoNotSerialize]
public ValueInput step { get; }
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