The only way I found to do this is with UPROPERTY(BlueprintReadOnly) and value initialized in native CTor. This means it’s not really a constant, but those using blueprints have a safety net.
In fact what I did is making an helper class with static functions.
/**
* Helper class for constants
* @remark When there will be a way to expose constants in Blueprint
* this class will be useless
*/
UCLASS()
class KSGM_API UKConstantHelper : public UBlueprintFunctionLibrary
{
GENERATED_UCLASS_BODY()
public:
/**
* @brief Helper function to get the Helium color (Orange).
*
* @return The Helium FLinearColor.
*/
UFUNCTION(BlueprintCallable, Category = "Helper|Colors")
static FLinearColor& GetHeliumColor();
/**
* @brief Helper function to get the Neon color (Yellow).
*
* @return The Neon FLinearColor.
*/
UFUNCTION(BlueprintCallable, Category = "Helper|Colors")
static FLinearColor& GetNeonColor();
....
....
}
It is not perfect since I had preferred to have just a constant.