Adding any additional includes to any class causes the entire class, and thus, intellisense, to break entirely ONLY in visual studio. The project still compiles fine, assuming the code is valid. I have used some google-fu to look for answers, but no solutions to this have been able to fix the problem, and it is impacting productivity because, well, no intellisense.
I can provide the code, if needed.
EDIT: If anyone else has this problem, VISUAL ASSIST X seems to fix it. It also just all around improves working with C++.
What is the error message from VS’s output pane?
What additional includes are you adding?
What are your current #include
s, in order, and where are you putting the new #include
?
current includes are the default ones that come with a file generated by Unreal, the additional include is of a component and an actor classes that I have, the error is “This declaration has not storage or type specifier” (something along those lines, i dont have access to my computer at the moment) on the UCLASS macro. The rest of the errors are too many to list here. the #includes are before the “[classname].generated.h”.
With compile-time errors, usually the first one is the only important one. Does the header file you’re including possibly #include
the header file you’re trying to include it from?
Nope. However, there are no compile-time errors, it compiles fine in fact. The issue comes with the fact that it completely destroys intellisense, which makes it extremely hard to work with
I’ll try to get a screenshot for a better explanation once I have access to my project.
This is just a cosmetic issue, and you can safely ignore it, and in my experience, it often goes away on its own.
Apparently, changing the build config can resolve this.
Something else which might work is to right click your project in the Solution Explorer and choose rescan solution.
The build config didn’t help, though I suppose if it’s only cosmetic I can live with it. It’s just annoying that intellisense doesn’t work because of it.