LINK2019 error in UMotionControllerComponent setup C++

Hi!

I’m pretty new using unreal and in VR programming

I’m trying to setup the UMotionControllerComponent in C++ but i get a linker error when i put this line in the .cpp:
https://i.gyazo.com/7980039e1aa16971b273a9cb80d787b8.png

My header file:
https://i.gyazo.com/683b4ee09fdb3f9f2d36afdcde32a54a.png

The error:
https://i.gyazo.com/0a06b98cabe1b838b2188df51c2d5f17.png

Thanks!!

Missing HeadMountedDisplay in your builds.cs file. Open YourProject.build.cs and find the add Modules lines and add HeadMounted Display, similar to this:

PublicDependencyModuleNames.AddRange(new string[]
{
“Core”,
“CoreUObject”,
“Engine”,
“InputCore”,
“UMG”,
“HeadMountedDisplay”
});

1 Like

Thanks it works :slight_smile: