ProtoFlux:TryEnumToNumber
From Resonite Wiki
More actions
TryEnumToNumber
Enums
The TryEnumToNumber node takes in an enum and a fail value, then returns the value after attempting to get the enum, or failing that, returns the fail value. Similar to EnumToNumber but without the FailValue field.
This node has the following variants, with their respective outputs:
| Variant | Node Type | Output |
|---|---|---|
| Try Enum To Number (Byte) | EnumToByte |
provided Value (Enum) as a Byte |
| Try Enum To Number (Int) | EnumToInt |
provided Value (Enum) as an Int |
| Try Enum To Number (Long) | EnumToLong |
provided Value (Enum) as a Long |
| Try Enum To Number (Sbyte) | EnumToSbyte |
provided Value (Enum) as a Sbyte |
| Try Enum To Number (Short) | EnumToShort |
provided Value (Enum) as a Short |
| Try Enum To Number (Uint) | EnumToUint |
provided Value (Enum) as an Uint |
| Try Enum To Number (Ulong) | EnumToUlong |
provided Value (Enum) as an Ulong |
| Try Enum To Number (Ushort) | EnumToUshort |
provided Value (Enum) as a Ushort |
Inputs
Value (Enum Generic)
The enum value to attempt to get.
FailValue (Generic)
The value that will be used if getting the enum value failed.
Outputs
* (Generic)
Either the enum value or the failed value if the enum value could not be retrieved.