[TIP] Red squiggles on successful compiles? Here was my solution

Hey all, I was getting an Intellisense error where I would get red squiggles even on successful compiles, which was A) distracting, and B) bloats the code when looking for actual errors. After looking online the solution I found was the Include What You Use (IWYU) method recommended by Epic. The IWYU method basically states that you should explicitly include header files even if the code works without it.

For example in this lecture we started using this line of code

FCollisionQueryParams TraceParams(FName....)

This should successfully compile still and your game should still work correctly, however you may (at least it happened for me) begin getting red squiggles underneath things like




or even in the header file with GENERATED_BODY macro. Intellisense would say UObject has no method BeginPlay() or something along those lines. The error never went away even when rebuilding the entirety of the code. What did fix it was one line

#include "CollisionQueryParams.h"

Like I said, I didn’t need to include it, as it still worked without it, but if you remember back to the documentation it did state to include this header file. So my recommendation for anyone getting erroneous errors would be to include the header file. Hope this helps anyone else who comes across this and is profusely annoyed by it!

1 Like

Privacy & Terms