Class While
Loops as long as a given condition is true.
Inherited Members
Namespace: Unity.VisualScripting
Syntax
[UnitTitle("While Loop")]
[UnitCategory("Control")]
[UnitOrder(11)]
public class While : LoopUnit, IUnit, IGraphElementWithDebugData, IGraphElement, IGraphItem, INotifiedCollectionItem, IDisposable, IPrewarmable, IAotStubbable, IIdentifiable, IAnalyticsIdentifiable
Properties
condition
The condition to check at each iteration to determine whether the loop should continue.
Declaration
[DoNotSerialize]
public ValueInput condition { 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 |