enhancedinputcomponent.h not found when adding first person content to new project

Hello I’m trying to add the first person content pack to a project for looking at my landscapes from the perspective of an actual character. Just want a quick fps character to walk around in the world I’m making. When I add it though using add new → add features or content pack → c++ → first person it won’t compile. It says it can’t open EnhancedInputComponent.h, EnhancedInputSubsystems.h or InputActionValue.h. I found the exact file path for these but when replacing include “EnhancedInputComponent.h” with include “D:\UE_5.3\Engine\Plugins\EnhancedInput\Source\EnhancedInput\Public\EnhancedInputComponent.h” and so on for the other two I get a bunch of other error messages.

This is the exact same code that’s used if you create a project using the fps template. It works fine in the template project. I’ve added the blueprint version of the fps content pack for now since I plan on making my own character classes when I actually get to that point. But now I’m curious as to why this didn’t work. My assumption is that there’s something different in the way the environment is set up when you make a project using the fps template. Either in visual studio or in unreal itself. Not sure if this is correct though. I looked through the included directories from the project settings in Visual Studio. I didn’t notice any differences but I only glanced. Also checked the plugins in my editor and the default classes in the input section of my project settings. The enhanced input is turned on in the plugins and the default is set to enhanced player input in my project. I also tried deleting .vs, binaries etc and regenerating vs project files when I saw the errors that the generated files couldn’t be opened. I figured this wouldn’t work cause it’s not a generated file of one of my project files but of an engine file. This didn’t work either. So I’m not sure what the issue is at this point. Wondering if anyone has any ideas.

1 Like

EnhancedInput wasn’t in my c# build file for some reason. I included it and it’s working now.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.