How to do it...

  1. Open up your .Build.cs file (in our case, Chapter_13.Build.cs) and add the following dependencies:
using UnrealBuildTool;public class Chapter_13 : ModuleRules{  public Chapter_13(ReadOnlyTargetRules Target) : base(Target)  {    PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;    PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "HeadMountedDisplay" });        PublicDependencyModuleNames.AddRange(new string[] { "AIModule", "GameplayTasks" });    }}
  1. Compile your code.
  2. From the Content Browser, select Add New | New C++ Class. At the Add C++ Class menu, check the Show All Classes option type in AIController, and then select the AIController class. Then, click on Next:
  1. When asked for a name ...

Get Unreal Engine 4.x Scripting with C++ Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.