Download

Remove squiggles under component pointers

Hello, I am a beginner in UE4 and currently following the official C++ tutorial: Player Input and Pawns. The problem is when I call:


InputComponent->BindAction("Grow", IE_Pressed, this, &AMyPawn::StartGrowing);

There is an annoying squiggle under InputComponent, but I can successfully compile the code through UE4 editor.
It seems that this problem doesn’t affect compilation and execution, but how could I remove these squiggles?
I assume that this problem happens because the current file has no idea about the class UInputComponent.
Do I need to write something else in the code or do more setting in my IDE or UE4 editor?
My Visual Studio version is 2015, and my Unreal version is 4.16.
Thanks.
Here is a screenshot of these annoying squiggles.
e5c76534369c787cd966ec51524a5ebf17ea47a7.png

The parameter for the function is called PlayerInputComponent and not InputComponent

Correct. The “squiggles” are Intellisense saying it failed to find whatever that class was when it was parsing things.

If you add



#include "Components/InputComponent.h"


It should find it and those will go away (maybe… Intellisense isn’t the brightest bulb out there). It’s likely that header is included elsewhere since your compile is succeeding, it’s just Intellisense being dumb and not finding the reference properly.