Can't open source file CableComponent.h

Hey All!

I’ve been having an issue using CableComponent in custom C++ classes.

I set up Dependencies in MyProject.build.cs as follows:

PrivateDependencyModuleNames.AddRange(new string[] { "CableComponent" });
 PrivateIncludePathModuleNames.AddRange(new string[] { "CableComponent" });

but I still get the following error in Visual Studio:

50402-cantfind.png

Furthermore, the project still builds with no errors, but Visual Studio keeps the red squigglies and treats the cpp file for this class as if the class isn’t a valid type:

50403-screwedup.png

Does anyone know why I am getting these errors? This is in the C++ First Person Template, unmodified except for adding this class from the editor and adding the dependencies in MyProject.build.cs

Need to generate project files when you add modules. Right click your project icon in your project folder and select “Generate Visual Studio Files”. It worked for me when I had this issue.

coming here in 2023 still doesnt work did you ever figure it out?