Previously we had floats everywhere.
Now it seems like we support either float or double depending on if large world coordinates are used.
Is there a good standard way to write C++ code? I’d think it’d be convenient if there was some define in C++ like this:
#ifdef LWC_ENABLED
typedef Real double
#else
typedef Real float
#endif
I noticed unreal has templated versions of TVector now and some UE_DECLARE_LWC_TYPE macros, but it’s not obvious how they work.
Actually I did find an article and tried something like this:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Rotation")
FRotator::FReal AnimationSpeed = FRotator::FReal(5);
I get some crazy compiler errors. Looks like Unreal Header Tool is having an issue with those types. I saw most unreal UPROPERTY values still use float.
RDBaseHierarchicalRotationController.h(121): [] Missing variable name
Error reentered: Assertion failed: SuperClassDef->GetClassWithin() [File:C:\Code\Experimental\UnrealEngine\Engine\Source\Programs\UnrealHeaderTool\Private\HeaderParser.cpp] [Line: 8611]
=== Critical error: ===
Error reentered: Assertion failed: SuperClassDef->GetClassWithin() [File:C:\Code\Experimental\UnrealEngine\Engine\Source\Programs\UnrealHeaderTool\Private\HeaderParser.cpp] [Line: 8611]
HandleError re-entered.
Assertion failed: SuperClassDef->GetClassWithin() [File:C:\Code\Experimental\UnrealEngine\Engine\Source\Programs\UnrealHeaderTool\Private\HeaderParser.cpp] [Line: 8611]
The article itself: