I have an enumeration declared in separate .h file in my “Locomotion” module, declared as such:
#include "CoreMinimal.h"
#include "WallEntryType.generated.h"
UENUM(BlueprintType)
enum class EWallEntryType : uint8
{
Bottom UMETA(DisplayName = "Bottom"),
Top UMETA(DisplayName = "Top")
};
I want to include this enumeration in a different module, “InterfaceUtilities.” Nevertheless, trying to compile it, UHT complains that it can’t find the generated and header files and so on, since it is missing the “MODULENAME_API” macro. Nonetheless, adding the macro and changing the above to this:
#include "CoreMinimal.h"
#include "WallEntryType.generated.h"
UENUM(BlueprintType)
enum class LOCOMOTION_API EWallEntryType : uint8
{
Bottom UMETA(DisplayName = "Bottom"),
Top UMETA(DisplayName = "Top")
};
Spews out the error that the enum is of the wrong base type…
Is there a way to have simple enums like this usable across different modules?