UE5 Enum can be added one by one after each other just by clicking the plus button , but My Enums are not like that. i have to change it then add another one.
and sorry if i don’t know how to talk or talk in a way u may don’t like, i don’t communicate much with people
hello.
i don’t know the answer but it’s an interesting question.
a hypothesis is that it might be a cpp thing. maybe a meta tag, or the one for iterating.
You set the first and last part of the enum to be able to restrict the enum auto add process.
If you want the full range then just set the first element and last element of the enum.
you have to create it yourself.
take a look at what 3draven did and pretty much copy it.
thouigh i would use another name for the files. though “enums” is all right.
i think he even attached the file that you can just download and put on your Source folder.
(also i prefer using the Count field, but that requires some extra knowledge)
then i’d say supporting enums on cpp will be more a headache than it’s worth for you.
i’d recommend you to wait a bit.
now, to address your need. what i’d recommend you is to define an default value that it’s unused. for example NONE, and put it first on the enum.
so when you add a value it always add None, then you change it.
at least it will allow you to work correctly.
And there are some cases where having None is good for your logic (for example checking default or invalid values).
I’ve use that in several cases.
example taken from another thread
UENUM(BlueprintType)
enum class GroundDirection : uint8 {
NONE,
DOWN,
LEFT,
UP,
RIGHT
}