Class SelectUnit
Selects a value from a set by checking if a condition is true or false.
Inherited Members
Namespace: Unity.VisualScripting
Syntax
[UnitCategory("Control")]
[UnitTitle("Select")]
[TypeIcon(typeof(ISelectUnit))]
[UnitOrder(6)]
public sealed class SelectUnit : Unit, ISelectUnit, IUnit, IGraphElementWithDebugData, IGraphElement, IGraphItem, INotifiedCollectionItem, IDisposable, IPrewarmable, IAotStubbable, IIdentifiable, IAnalyticsIdentifiable
Properties
condition
The condition to check.
Declaration
[DoNotSerialize]
public ValueInput condition { get; }
Property Value
Type | Description |
---|---|
ValueInput |
ifFalse
The value to return if the condition is false.
Declaration
[DoNotSerialize]
[PortLabel("False")]
public ValueInput ifFalse { get; }
Property Value
Type | Description |
---|---|
ValueInput |
ifTrue
The value to return if the condition is true.
Declaration
[DoNotSerialize]
[PortLabel("True")]
public ValueInput ifTrue { get; }
Property Value
Type | Description |
---|---|
ValueInput |
selection
The returned value.
Declaration
[DoNotSerialize]
public ValueOutput selection { get; }
Property Value
Type | Description |
---|---|
ValueOutput |
Implements
Methods
Branch(Flow)
Declaration
public object Branch(Flow flow)
Parameters
Type | Name | Description |
---|---|---|
Flow | flow |
Returns
Type | Description |
---|---|
Object |
Definition()
Declaration
protected override void Definition()