Hi,
In Unreal 5.3 notes, there is the sentence :
The Unreal Header Tool (UHT ) will interpret any Blueprint-accessible floating-point type in code as a Blueprint Float with the appropriate single (C++ float) or double (C++ double) precision subtype, enabling automatic conversion of Float values of either precision supplied by any Blueprint node. Large World Coordinates
I am rewriting some Blueprints to C++ and even C++ Header Preview suggests using double for my UPROPERTY as below:
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Config|Procedural", meta = (ExposeOnSpawn = "true"))
double SomeMemberExposedVariable;
but it doesn’t compile with:
error: ExposeOnSpawn - Property cannot be exposed
So, what should I do? If I understand correctly, “double” here should be compiled without errors, and UE should make its own Float (double-precision) in Blueprints.
The other way I can understand the sentence above is to place float type for my UProperty(then it compiles correctly) and then UE will decide if it will be interpreted as double or float. This interpretation feels less probable as it would cause a lot of trouble in reading C++ code which makes calculations like for double but the written type of member is float.
Please tell me how UPROPERTY for floating type should be done correctly. Some calculations in my project are using it with FVector(which is TVector from UE5.0, double type, not float) and I want to avoid narrow casting.