Godot Version
4.3
Question
I have resources that have:
@export var enum_val : ENUM
The issue I’m having with this is that whenever I update the list of enum values the resources reference the enum value by index in the enum causing things to break if I add a an entry at the top of the enum.
I know I can solve this by assigning each enum entry with a value i.e
enum ENUM
{
foo = 0,
bar = 1,
}
Or by only adding to the bottom only.
Both of these feel error prone, so I think the ideal solution would be if the Resource tracked its value via “foo” or “bar” instead of exporting as 0 or 1.
Idk if this is possible with the given export options though…
Thanks.