Is bitmask enum supported as parameters in Blueprintcallable function?

I’ve bitmask enum:

UENUM(BlueprintType, meta=(Bitflags))
enum class EPIPCameraType : uint8
{
    PIP_CAMERA_TYPE_NONE = 0	UMETA(DisplayName="None"),
    PIP_CAMERA_TYPE_SCENE = 1	UMETA(DisplayName="Scene"),
    PIP_CAMERA_TYPE_DEPTH = 2	UMETA(DisplayName="Depth"),
    PIP_CAMERA_TYPE_SEG = 4 	UMETA(DisplayName="Segmentation")
};
ENUM_CLASS_FLAGS(EPIPCameraType)

And function:

UFUNCTION(BlueprintCallable, Category = "Cameras")
void SetEnableCameraTypes(EPIPCameraType types);

But I’m getting compile error:

error : Missing ‘*’ in Expected a pointer type

Note: Enum is defined outside of class.

This is a little old but I was just trying to figure this out (in 4.17). It looks like you can use UPARAM(meta=(Bitmask, BitmaskEnum=EYourEnum)) before the param if you’re trying to pass a bitmask.

UFUNCTION(BlueprintCallable, Category = "Cameras")
void SetEnableCameraTypes(UPARAM(meta=(Bitmask, BitmaskEnum=EPIPCameraType)) int32 types);

AppleARKitCameraComponent has an example of this

UFUNCTION( BlueprintCallable, Category="AppleARKit|Session" )
bool HitTestAtScreenPosition( const FVector2D ScreenPosition, UPARAM(DisplayName="Flags", meta=(Bitmask, BitmaskEnum=EAppleARKitHitTestResultType)) int32 Types, TArray< FAppleARKitHitTestResult >& OutResults );
1 Like