Class "AController" has no member "SetupInputComponent"

I used a top down template to do this. I see many people have been getting the same question. Also GENERATEDBODY in the .h file is not working. This is for the player controller.

#include "TextCodingPlayerController.generated.h" has to be moved down as the last thing you include.
Move it down below #include "InputActionValue.h"

It didn’t work


Show the output of the Unreal Build Tool when you build.

I switched to VS Code and it stopped

I’m having the same issue as well. Have you been able to resolve the problem you described?

What do you mean here, “switched to VS code”? I’m having this same issue.

  1. Try using APlayerController::SetupInputComponent() rather than Super::SetupInputComponent()
  2. Put your cursor on the line: GENERATED_BODY, and click the “hint” :Add the macro to the new C++ prompt file

Those errors in the editor don’t mean anything. I get them too and I have almost the exact same code (and the same errors in the editor).

We need to see the compiler and linker output.

If you add your missing Constructor, it should build.