Class ToggleFlow
Toggles the control flow with on and off triggers.
Implements
Inherited Members
Namespace: Unity.VisualScripting
Assembly: Unity.VisualScripting.Flow.dll
Syntax
[UnitCategory("Control")]
[UnitOrder(18)]
public sealed class ToggleFlow : Unit, IUnit, IGraphElementWithDebugData, IGraphElementWithData, IGraphElement, IGraphItem, INotifiedCollectionItem, IDisposable, IPrewarmable, IAotStubbable, IIdentifiable, IAnalyticsIdentifiable
Properties
enter
Entry point to the toggle.
Declaration
[DoNotSerialize]
public ControlInput enter { get; }
Property Value
Type | Description |
---|---|
Control |
exitOff
Triggered on entry if the flow is off.
Declaration
[DoNotSerialize]
[PortLabel("Off")]
public ControlOutput exitOff { get; }
Property Value
Type | Description |
---|---|
Control |
exitOn
Triggered on entry if the flow is on.
Declaration
[DoNotSerialize]
[PortLabel("On")]
public ControlOutput exitOn { get; }
Property Value
Type | Description |
---|---|
Control |
isOn
Whether the flow is currently on.
Declaration
[DoNotSerialize]
public ValueOutput isOn { get; }
Property Value
Type | Description |
---|---|
Value |
startOn
Whether the toggle should start in the on state.
Declaration
[Serialize]
[Inspectable]
[UnitHeaderInspectable("Start On")]
[InspectorToggleLeft]
public bool startOn { get; set; }
Property Value
Type | Description |
---|---|
bool |
toggle
Trigger to toggle the flow through the toggle.
Declaration
[DoNotSerialize]
public ControlInput toggle { get; }
Property Value
Type | Description |
---|---|
Control |
turnOff
Trigger to turn off the flow through the toggle.
Declaration
[DoNotSerialize]
[PortLabel("Off")]
public ControlInput turnOff { get; }
Property Value
Type | Description |
---|---|
Control |
turnOn
Trigger to turn on the flow through the toggle.
Declaration
[DoNotSerialize]
[PortLabel("On")]
public ControlInput turnOn { get; }
Property Value
Type | Description |
---|---|
Control |
turnedOff
Triggered when the flow gets turned off.
Declaration
[DoNotSerialize]
public ControlOutput turnedOff { get; }
Property Value
Type | Description |
---|---|
Control |
turnedOn
Triggered when the flow gets turned on.
Declaration
[DoNotSerialize]
public ControlOutput turnedOn { get; }
Property Value
Type | Description |
---|---|
Control |
Methods
CreateData()
Declaration
public IGraphElementData CreateData()
Returns
Type | Description |
---|---|
IGraph |
Definition()
Declaration
protected override void Definition()