I am doing the CryptRaider Project and I’m stuck on the Grabber component. I created the C++ component and VS Code opened the .cpp and .h file. Suddenly I get a bunch of red squiggly lines underneath not only my includes but everything. It tells me that it can’t find the
#include "CoreMinimal.h"
#include "Components/SceneComponent.h"
#include "Grabber.generated.h"
header files and as a consequence doesn’t know what all that Unreal Code is supposed to be.
I added the location
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\Core\Public
to the C++ configurations for both Win32 and the CryptRaider configurations. If I add it for Win32, then for a short moment the squiggly lines disappear, only to reappear after a few seconds. I restarted the IDE and the same thing happens again.
It tells me:
“Grabber.cpp” wurde in “${workspaceFolder}.vscode\compileCommands_Default.json” nicht gefunden. Stattdessen wird “includePath” aus “c_cpp_properties.json” im Ordner “CryptRaider” für diese Datei verwendet.
In English that means "Grabber.cpp wasn’t found in the "${workspaceFolder}.vscode\compileCommands_Default.json. Instead “includePath” from “c_cpp_properties.json” in the folder “CryptRaider” will be used for this file.
So I went into the project folder and re-generated the VS Project files.
I launched the UE editor and VS Code again to see if that fixed the issue. And it did! Yay for me, I guess.
My question is the following, and forgive my bluntness which is the result of absolute, seething frustration: Is Visual Studio such absolute hot flaming garbage that I need to regenerate the VS project files each time I create a new C++ class? How does it break that god damn frequently??? I’ve had nothing but headaches since I started using this steaming pile of bloatware. It takes a full minute to go through the few lines of code of my .h and .cpp files for Intellisense to do it’s thing and realise something is off. Can I not get a nice tutorial on how to run C++ for Unreal from Sublime Text? How do the .h and .cpp files for the Mover component, that I made just one video ago, not have this problem, yet the Grabber suddenly has it?!
I haven’t been this unhinged for over a damn year now and all it took was a few hours with VS Code to push me over the edge…I have lost hours to this stupidity while my deadlines are drawing ever closer…
Am I just stupid? Did I miss a short sentence in the setup of this program and it’s all my fault? I feel like I’m losing it.