Error "can't open InputActionValue.h"

Hey there, I’m working on an Empty Project in UE5 and when I try to add the enhanced input system I get error: “can’t open InputActionValue.h” and I have already added the “EnhancedInput” string to the Build.cs file. What else am I missing?


1 Like

have you added the module “EnhancedInput” to you build file in PublicDependencyModuleNames?

example part inside of build file:

PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "HeadMountedDisplay", "EnhancedInput" });

Always look at the module segment in the documentation to see what you need

2 Likes

Yes. I stated that in the OP but I have updated the images to show that more clearly. The only thing I am not including is the “HeadMountedDisplay” since it is not needed for my build.

Is InputActionValue.h in your path:

Your Unreal engine install directory\Engine\Plugins\EnhancedInput\Source\EnhancedInput\Public\InputActionValue.h

Do you have your game config set to use Enhanced input?

in DefaultInput.ini

[/Script/Engine.InputSettings]
// lots of earlier config
DefaultPlayerInputClass=/Script/EnhancedInput.EnhancedPlayerInput

Yes. It is enabled by default in 5.1.1.

It works fine if I build one of the templates (third person or first person). I only have the issue on an empty project. I have been dissecting a third person project to see what else I could be missing. So far, I am at a loss.

I think you just need to recompile your project.
I did a test empty project and before recompile VS also underlined the inputactionvalue.h

WoeArena.zip (11.7 KB)
(gen vs project and compile)
It compiles no problem.

It “appears” to compile from editor with success, but the error still persists in VS and I can’t launch solution.

Rebuilding doesn’t help.

I will continue to fiddle with it and see what I can get working but it concerns me that I can’t launch from VS, as that is generally the preferred method.

EDIT

I am at this point able to compile and run solution from VS. I started from an empty project and added in the header, etc before running anything else just to see if it would. I have since added in the rest of my code and done error checks. It runs, however, the error “Can’t open InputActionValue.h” still shows. It may be just an intellisense issue, but it only shows up on my project, not the pre-builds.

For the moment, I will be using the old input system until Epic completely removes it.

1 Like

I had the same issue! I managed to fix it by doing the following steps:

  1. Close VS/UE
  2. Delete the /Binaries folder and the .sln file
  3. Right click on the .uproject file and generate VS project files
  4. Reboot VS and it should work.
7 Likes

i did just that, and now im getting this message
UdemyTotorial could not be compiled. Try rebuilding from source manually.

Right click you uproject file and regenerate project. Then run the generated sln file. Set the project to your WoeArena project and run with or without debugging.