Class For
Loops between a first and last index at a specified step.
Inherited Members
Namespace: Ludiq.Bolt
Syntax
[UnitDisplay("For Loop")]
[UnitCategory("Flow", "Loops", 20)]
public sealed class For : LoopUnit, IUnit, IGraphElementWithDebugData, IGraphElement, IGraphChild, IObservableDisposable, IDisposable, INotifiedCollectionChild<IGraph>, ICollectionChild<IGraph>, IPrewarmable, IIdentifiable, INotifyPropertyChanged, ISerializationCallbackReceiver
Properties
currentIndex
The current index of the loop.
Declaration
[UnitPortDisplay("Index")]
[DoNotSerialize]
public ValueOutput currentIndex { get; }
Property Value
| Type | Description |
|---|---|
| ValueOutput |
firstIndex
The index at which to start the loop (inclusive).
Declaration
[UnitPortDisplay("First")]
[DoNotSerialize]
public ValueInput firstIndex { get; }
Property Value
| Type | Description |
|---|---|
| ValueInput |
lastIndex
The index at which to end the loop (exclusive).
Declaration
[UnitPortDisplay("Last")]
[DoNotSerialize]
public ValueInput lastIndex { get; }
Property Value
| Type | Description |
|---|---|
| ValueInput |
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
| Type | Description |
|---|---|
| ValueInput |
Methods
Definition()
Declaration
protected override void Definition()
Overrides
Loop(Flow)
Declaration
protected override ControlOutput Loop(Flow flow)
Parameters
| Type | Name | Description |
|---|---|---|
| Flow | flow |
Returns
| Type | Description |
|---|---|
| ControlOutput |
Overrides
LoopCoroutine(Flow)
Declaration
protected override IEnumerator LoopCoroutine(Flow flow)
Parameters
| Type | Name | Description |
|---|---|---|
| Flow | flow |
Returns
| Type | Description |
|---|---|
| IEnumerator |