Getting error squiggles after adding the Mover component

So, you’ve successfully added your mover component and compiled it.
But, you’re getting error squiggles that don’t seem to influence your code, except that it screws up the built-in syntax highlighting.

image
The parts of code that would get error squiggles for example even if it was the correct mover.h header
image
(Almost) correct code that would not get the appropriate syntax highlighting

I don’t know why this happens, I do however know how to fix it, the issue seems to be related to not being able to load a source-file, but the easy fix is to:

  1. Go to the .uproject file related to your project.
  2. Right click, and click « Generate Visual Studio project files ».

image

This should fix the error squiggles and load everything correctly in Visual Studio Code, which prompty also fixes the syntax highlighting due to your code being interpreted correctly now according to mover.h and its dependencies.

I do not know if this is a bug in UE5 or some other compiling issue, but I thought I’d share my fix here since it took me quite a while to figure out why this was happening and how to fix it. (I ended up finding an old post on stackexchange for UE4)

PS: This is my first community post, so if I did anything that isn’t appropriate here normally, please do tell.

Edit: What also seems to work is going to the Tools bar in UE5 and clicking « Refresh Visual Studio Code Project »

5 Likes

Jibster, thank you for this!
I got this error, then went to VS Codes settings and was desperately trying to find if I had a path missing somewhere.

What a guy, this fixed my issues with Syntax Highlighting as well. Thanks!

Privacy & Terms