For some reason, I have to make my project runs for both UE 4.11 and UE 4.12.
I’m looking for some version macro for UE4, like UE_VERSION
listed below.
void Attach(USceneComponent* component, USceneComponent* parent)
{
#if UE_VERSION == 41100
component->AttachTo(parent); // UE 4.11
#elif UE_VERSION == 41200
component->AttachToComponent(parent, FAttachmentTransformRules::KeepRelativeTransform); // UE 4.12
#endif
}
Is there any macro define in UE4 that I can use?