Visual Script: Enum Nodes
Enums
Enum nodes allow you to work with enumeration values in visual scripts. Enumerations are predefined sets of named constants that make scripts more readable and less error-prone than using magic numbers.
For each enum type, visual scripts provide two categories of nodes:
- Value nodes - Return a specific enum constant. Use these to pass enum values to other nodes or compare against enum properties.
- Switch nodes - Branching nodes that execute different code paths based on an enum value. Similar to a switch statement in programming, these nodes have one execution pin for each possible enum value.