Simple replace line 3 with:
enum class EMyState : uint8
This ensures your enum derives from uint8, just like 4.15 wants.
Simple replace line 3 with:
enum class EMyState : uint8
This ensures your enum derives from uint8, just like 4.15 wants.
I am following one of the ue4 c++ tutorials but in 4.15 I get the following error
error : Invalid BlueprintType enum base - currently only uint8 supported
//enum to store the current state of gameplay
UENUM(BlueprintType)
enum class EMyState
{
EPlaying,
EGameOver,
EWon,
EUnknown
};
I am a beginner and don’t know how I must replace this to make it work for 4.15
Just a note for others. If you are still getting an error like “error : Invalid BlueprintType enum base - currently only uint8 supported”, it seems 4.26 may have changed how this all works although I see the engine uses this syntax still.
I am managing to get the following to compile:
UENUM(BlueprintType)
enum ESomethingSomethingEnum {
TopRight
UMETA(DisplayName = "Top Right"),
BottomRight
UMETA(DisplayName = "Bottom Right"),
}
but cannot get:
UENUM(BlueprintType)
enum class SOMETHING_API ESomethingSomethingEnum : uint8 {
...
to compile.