Class SwitchUnit<T>
Inheritance
SwitchUnit<T>
Assembly: Unity.VisualScripting.Flow.dll
Syntax
[TypeIcon(typeof(IBranchUnit))]
public abstract class SwitchUnit<T> : Unit, IBranchUnit, IUnit, IGraphElementWithDebugData, IGraphElement, IGraphItem, INotifiedCollectionItem, IDisposable, IPrewarmable, IAotStubbable, IIdentifiable, IAnalyticsIdentifiable
Type Parameters
Properties
branches
Declaration
[DoNotSerialize]
public List<KeyValuePair<T, ControlOutput>> branches { get; }
Property Value
canDefine
Gets a value indicating whether this unit can be defined.
Declaration
public override bool canDefine { get; }
Property Value
Overrides
default
The branch to take if the input value does not match any other option.
Declaration
[DoNotSerialize]
public ControlOutput @default { get; }
Property Value
enter
The entry point for the switch.
Declaration
[DoNotSerialize]
public ControlInput enter { get; }
Property Value
options
Declaration
[Inspectable]
[Serialize]
public List<T> options { get; set; }
Property Value
selector
The value on which to switch.
Declaration
[DoNotSerialize]
public ValueInput selector { get; }
Property Value
Methods
Definition()
Declaration
protected override void Definition()
Overrides
Enter(Flow)
Declaration
public ControlOutput Enter(Flow flow)
Parameters
Type |
Name |
Description |
Flow |
flow |
|
Returns
Matches(T, T)
Declaration
protected virtual bool Matches(T a, T b)
Parameters
Type |
Name |
Description |
T |
a |
|
T |
b |
|
Returns
Implements
Extension Methods