Anim BP Blend by UENUM wrong values

Hey there, In an animation blueprint I try to use a blend poses node controlled by a variable of a UENUM type. The type is defined as follows (I tried other variations including dirrect assignment by literals, the problem persists)

UENUM(BlueprintType) enum class EMacroState : uint8
{
	LAX = 1 << 3,
	LAND = 2 << 3,
	WALL = 3 << 3,
	AIR = 4 << 3,
	WATER = 5 << 3
};

UENUM(BlueprintType) enum class EBehaveState : uint8
{
	NO = 0,				
	 dead = (uint8)EMacroState::LAX + 0,	
	 relax = (uint8)EMacroState::LAX + 1,	
	 held = (uint8)EMacroState::LAX + 2,	
	 stand = (uint8)EMacroState::LAND + 0,				
	 walk = (uint8)EMacroState::LAND + 1,	
	 run = (uint8)EMacroState::LAND + 2,	
	 crouch = (uint8)EMacroState::LAND + 3,	
	 ropewalk = (uint8)EMacroState::LAND + 4,
	 turn = (uint8)EMacroState::LAND + 5,	
	 stuck = (uint8)EMacroState::WALL + 0,	
	 clung = (uint8)EMacroState::WALL + 1,	
	 climb = (uint8)EMacroState::WALL + 2,	
	 slide = (uint8)EMacroState::WALL + 3,	
	 fall = (uint8)EMacroState::AIR + 0,	
	 soar = (uint8)EMacroState::AIR + 1,	
	 fly  = (uint8)EMacroState::AIR + 2,	
	 drawn = (uint8)EMacroState::WATER + 0,	
	 swim = (uint8)EMacroState::WATER + 1,	
	 dive = (uint8)EMacroState::WATER + 2,	
	TRANSIT_PREPARE = 254,	
	TRANSIT_AT_ONCE = 255	
};

On the pictures below the value of the variable is assigned in defaults (I tried any type of assignment, all the same). We can see that the way the animation goes does not coincide with the variable value. Two examples are shown (Relax / Turn, Walk / Drawn), other values are similar random mess.

The issue was first noticed in version 4.21, in 4.22 it’s still active. The screenshots are made in a fresh empty project (4.22.3) with the uenum, 1 skeleton, 1 animbp, and 1 sequence added.

Digging deeper, the issue is obviously related to the explicit assignment of uenum values. Seemingly the reflection system ignores those explicit numbers and assigns some internal values depending on the order the keywords are declared. Anyway what is it if not a bug?

Hello,

We’ve recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.

https://epicsupport.force.com/unrealengine/s/

Thanks