Hello everyone.
I try to use USteamVRChaperoneComponent::GetBounds() from SteamVR plugin in my c++ project, but always get link error when build with Development Editor x64. But in Unreal Editor, I can use GetBounds normally in a Blueprint. Why?
My code and error is shown below:
in “.h”:
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (AllowPrivateAccess = true))
USteamVRChaperoneComponent* SteamVRChaperone;
in “.cpp”:
SteamVRChaperone = CreateDefaultSubobject(TEXT(“SteamVRChaperone”));
// Test
int n = SteamVRChaperone->GetBounds().Num();
link error:
error LNK2019: unresolved external symbol "public: class TArray __cdecl USteamVRChaperoneComponent::GetBounds(void)const " (?GetBounds@USteamVRChaperoneComponent@@QEBA?AV?$TArray@UFVector@@VFDefaultAllocator@@@@XZ) referenced in function “public: void __cdecl AMotionControllerActor::SetupRoomScaleOutline(void)” (?SetupRoomScaleOutline@AMotionControllerActor@@QEAAXXZ)
I’m totally sure I already add the “SteamVR” module dependency in “xxx.build.cs”.
Anyone knows why?
Is there missing something in the SteamVR built-in version library?