I’m currently doing some work in VR and I want to move some blueprint stuff over to C++.
The blueprint is calling the C++ code in HeadMountedDisplayFunctionLibrary.
So I thought to include its header (with its functions being static) and use it as is:
#include "Kismet/HeadMountedDisplayFunctionLibrary.h" UHeadMountedDisplayFunctionLibrary::GetPositionalTrackingCameraParameters( ... ); //some example call
However this would give me linker error LNK2019 because it does not know the definition of said functions.
I’ve seen people just including “Engine.h” & “Runtime/HeadMountedDisplay/Public/HeadMountedDisplay.h”,
adding “HeadMountedDisplay” to the PublicDependencyModuleNames in the build.cs file and just duplicating the source code.
This works, but doesn’t seem to be much of an elegant solution. If it’s already there why can’t I use it ?
Could anyone give me some advice on how to do this ? My C++ is a bit rusty and I’m still new to the unreal 4 programming side.