Motion Controller crashes editor when added in c++

Hi guys,
i seem to have this problem in which whenever i add this to my cpp file my editor crashes on compile is there anything that i missed ? i have already added the header file and added the “SteamVRController” module to my project file

MotionControllerRight = CreateDefaultSubobject<UMotionControllerComponent>(TEXT("MotionControllerRight"));

Yes I did. i did a few more testing and realised it crashes when i put 2 motion controller components but one is just fine any idea why?

Have you added to the top of your .cpp file?

#include "Public/MotionControllerComponent.h"

Also make sure that the name you give it, “MotionControllerRight” is only used once in the components. If you create two components with the same name, itll cause a error.