Search code examples
c++unreal-engine4

Error when make a build of the game in Uneral Engine


When I try to make a build, I'm getting error

Cannot open include file: 'Actions/PawnAction.h': No such file or directory

enter image description here

But I have this file in Visual Studio

enter image description here


Solution

  • You need to include AIModule in your module dependencies.

    Source: JamieDale from UE4 Q&A site:

    Right, so if your game was called "MyGame", then you'd have a file called "MyGame.Build.cs" inside the "Source\MyGame" folder.

    This file tells the UnrealBuildTool (UBT) what to do when building your game.

    In there you should see an array for PrivateDependencyModuleNames and/or PublicDependencyModuleNames - this tells UBT which modules need to be linked when building your game, so you'll need to add "AIModule" to one of those.