I’m trying to create a new enum to keep track of the player’s current state, and I’m having trouble with the definition:
UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class LEARNINGPROJECT_API ULexicon : public UActorComponent
{
GENERATED_BODY()
public:
// Called when the game starts
virtual void BeginPlay() override;
// Called every frame
virtual void TickComponent( float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction ) override;
};
UENUM()
enum class ECharacterState : uint8{
Locomotion
Attacking
Grabbing
Dodging
};
This produces boatloads of syntax errors on compile, so I assume I’m doing something slightly wrong, but it looks identical to my example in A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums , the only difference is the lack of BlueprintType in the UENUM(), which is unnecessary since I’m only using this enum in code.