Hello,
I’m trying to wrap my head around an IntelliSense issue I have with Visual Studio Community 2022 version and Unreal Engine 5.6.1 Epic Games Launcher version.
I’ve done everything Setting Up Visual Studio Development Environment for C++ Projects in Unreal Engine | Unreal Engine 5.6 Documentation | Epic Developer Community and everything works in the following sense:
- Adding C++ to an existing Blueprint project works as intended and creating a new C++ project works as intended. VSC2022 correctly associates all the files as it should.
- I can create new C++ classes, edit them, and compile and build the project without any hitches.
However, and I’ve read many have this issue in one form or another, the IntelliSense doesn’t work as intended.
For example, in my custom.cpp files, e.g., CustomPlayerController.cpp, the IntelliSense correctly suggests Engine source’s class header files and their corresponding directories such as GameFramework/Actor.hif I so wish to include and write.
However, in my custom .h files, e.g., CustomPlayerController.h the IntelliSense doesn’t. Starting to write Game… gives the IntelliSense suggestion of GameEngine.generated.h. This doesn’t matter whether the header file is inside Private/Public/Root directory of my project source files.
I seem to be able to manually fix this by adding the [PathToUE5.6]\UE_5.6\Engine\Source\Runtime\Engine\Classes to my Include Directories when editing my GameProject.sln Properties > VC++ Directories > General > Include Directories. This is a very temporary solution, however, as generating the Visual Studio project files naturally overrides this back to the default state where readjusting the include directories manually would have to be done again.
This is not an issue in Rider that I felt obligated to try after spending the better part of yesterday trying to google this issue and trying to find answers from this forum, Reddit, StackOverflow and also testing out the Developer Assistant here in UE Dev Community + asking from Gemini. And yes, Rider works out of the box, and is also an option but I would generally like to understand how to fix this issue specifically in VSC2022 before throwing down the gloves and accepting that Rider just got this in a lot better shape than VS.
Is there generally some specific setting or tooling in Visual Studio Community 2022 I would be missing for this be the case?