Hi, I have an interface that I wish to expose a “GetSaveFlags” function to the caller to return certain save flags. However no matter what syntax I define the interface function, the enum parameter always gives me a single drop down item as if it was a regular enum.
Here is my enum declaration:
UENUM(BlueprintType, meta = (Bitflags, UseEnumValuesAsMaskValuesInEditor = "true"))
enum class ESavableFlags : uint8
{
None = 0,
SaveTransform = 1<<0,
SaveTest = 1<<1,
};
ENUM_CLASS_FLAGS(ESavableFlags);
Here is my interface functions:
UFUNCTION(BlueprintCallable, BlueprintNativeEvent)
void GetSaveFlags(UPARAM(meta=(Bitmask, BitmaskEnum=ESavableFlags)) uint8& SaveFlags);
UFUNCTION(BlueprintCallable, BlueprintNativeEvent)
UPARAM(meta=(Bitmask, BitmaskEnum="ESavableFlags")) uint8 GetSaveFlagsTest();
I tried UPARAM on both the return value and an out parameter, neither worked. Tried uint8 as the type and ESavableMask, neither worked.
However, if I have a field with UPROPERTY(meta=(Bitmask, BitmaskEnum=ESavableFlags))
that seems to work as intended. Just doesn’t work with function parameters.
What am I missing?
Thanks for any help!