DocsNodesModifiers

Switch

Shows one of two branches, depending on a condition.

if, toggle, either or, condition, show when, gate, boolean
Category
Modifiers
Outputs
mesh
Runs live in
Godot, Roblox

Win and lose banners, toggles, anything that should appear only under some condition. The condition is compared against a threshold, and whichever side wins is what comes out.

Leaving one branch empty turns it into a show-when gate: the thing appears or it does not.

Inputs

SocketTypeWiring
ifTruegeometry, optional
ifFalsegeometry, optional
conditionvalue, optional

Parameters

NameTypeDefaultAvailable whenWhat it does
Thresholdnumber0.5always

Built with this node

Nothing in the manual is built around this node yet.

See also

  • indexSwitchFor more than two options.
  • compareTo build the condition from something that varies.

Open the editor and try it