An enumeration is just a series of integers. There is no guarantee that those series of integers will be in sequential order – in fact, don’t ever count on that! enums can often be used for bitmask flags. Enums are really just a more “people friendly” way to associate meaning to numbers.
Here’s a good example:
Enum CoinValue
{
Penny = 1,
Nickle = 5,
Dime = 10,
Quarter = 25,
HalfDollar = 50,
Dollar = 100
};
Within UE4, all enum values are going to be unsigned integers with 8 bits, so the range of values is 0 → 255.
As far as looping through the enums, I’d continue using the foreach enum node as you’re doing. Just be aware that enum values won’t be guaranteed to be sequential. You can also cast an enum value to an integer value. I’m not sure what happens to a existing enum byte values when you delete an enum from the list – I think the byte values stay the same? And then adding a new enum continues where the last value left off? I’d have to test this more (I personally use C++ enums).