And the issues continue.
I have a couple of constant values that are defined in the C++ code that I want exposed to blueprints so that they can use them. My current plan is to stick them as const values inside my derived GameMode class and use the UPROPERTY macro to flag them as BlueprintReadOnly. What I would really like is to make them “static” as well, but I’ll take constant instance variables. The problem however is UPROPERTY seems to be buggered with const. More specifically, the documentation mentions a Const specifier that I assume I need to use to tell Unreal that the variable is const. But when I attempt to do the following:
const float ConstantParameter = 924375700.f;
I get the error:
Unknown variable specifier ‘Const’
As if UPROPERTY does not know what Const is. Which is, mildly irritating to say the least. This is in Unreal 4.6. My alternative is to specify the variables inside the class and provide Getter methods that are then exported with the UFUNCTION macro, but that seems heavy handed considering using UPROPERTY should by all rights just work. Anyone know if this is a bug or if I’m just misunderstanding how to use UPROPERTY?