I’ve been trying to follow the coding standards of Unreal, and I’m curious about a few things. I’ve been declaring structs and classes with a specified module API. What is the benefit of doing this? Is there any difference if I just leave it out?
USTRUCT(BlueprintType)
struct STEAMMATCHMAKING_API FSteamSessionSettings
{
GENERATED_BODY()
// ...
};
I wanted to follow the pattern above and declare an enum with module API, but the compile always fails. Is there a way (or a reason) to declare an enum with a module API? I know I can just remove the module API and it would work, but I’m curious why.
UENUM()
enum class STEAMMATCHMAKING_API ESteamReservationResponse : uint8
{
// Getting compile error : Missing '{' in 'Enum'
};
Interestingly enough, Epic usually declares enums like this:
UENUM()
namespace EPartyReservationResult
{
enum Type
{
// ...
};
}