Loading dynamic libraries for different platforms and architectures

It depends on the engine version you are using.

For 5.3 specifically I was able to use Target.Architecture inside the module’s Build.cs file. If you need it inside the .cpp/.h files. you can make certain macros using PublicDefinitions.Add("YOUR_DEFINE_ARHITECTURENAME"); and make #ifdef/#if conditions. If you have a different engine versions, you can still access the information in the module build file, but the type of variable is different.

Here is an example of a third-party plugin I’ve worked on: unreal-engine-sdk/Source/ThirdParty/ConfigCatCppSDK/ConfigCatCppSdk.Build.cs at 61f85c4014a5112081261109b330f1dbc4b9c8eb · configcat/unreal-engine-sdk · GitHub