Can't get a character to compile after binding a key to the InputComponent

Hi! I’m trying to make a simple character just to test the input system and I’ve ran into some problems. Here’s what I’ve got.



The compiler error I get:

My findings:
After I remove line 36 from PlayerCharacter.cpp the character compiles so my wild guess would be that that’s what causing issues but I’m unable to figure out why.

That did the trick, tysm stranger.

I found this thread that should be of use to you: Why does BindKey cause Link error? - #2 by Pierdek.

It seems that you need to include some dependencies in your file, which is labeled as [YourProjectName.Build.cs] and should be found in your project’s root source folder.

In this file, there should be a section called PublicDependencyModuleNames.AddRange(new string[] {}); in this you should add ‘SlateCore’ and ‘Slate’ based on what this thread is saying. Here is an example of what mine looks like, as a reference.

  PublicDependencyModuleNames.AddRange(new string[] { "GameplayAbilities", "GameplayTags", "GameplayTasks", "Core", "CoreUObject", "Engine", "InputCore", "HeadMountedDisplay", "UMG", "Slate", "SlateCore", "AIModule"});

I hope this helps, and good luck :slight_smile: