Is anyone using the Meta XR plugin in their C++ code?
In my project, I'd like to write some of the functionality in C++ vs. blueprints.
However, I'm unable to get past linker errors when calling functions from the Meta XR plugin. Specifically, I'm trying to create the custom Pawn, with the Oculus Controller Component.
I've added the following to the .Build.cs file:
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "EnhancedInput", "XRBase", "OculusXRInput", "OculusXRHMD" });
But adding this code (along with the relevant #include):
UOculusXRControllerComponent* MyController = CreateDefaultSubobject<UOculusXRControllerComponent>(TEXT("MotionControllerRight"));
Results in this compile error:
XRPawn.cpp.obj : error LNK2019: unresolved external symbol "private: static class UClass * __cdecl UOculusXRControllerComponent::GetPrivateStaticClass(void)" (?GetPrivateStaticClass@UOculusXRControllerComponent@@CAPEAVUClass@@XZ) referenced in function "public: __cdecl AXRPawn::AXRPawn(void)" (??0AXRPawn@@QEAA@XZ)
C:\Users\XYZ\Documents\Unreal Projects\XR_Switch\Binaries\Win64\UnrealEditor-XR_Switch.patch_0.exe : fatal error LNK1120: 1 unresolved externals
