Why does this cast not compile

Hi,

You will need to go to your Build.cs file and add “AIModule” and “GameplayTasks” to PublicDependencyModuleNames.

Also make sure you have #include “AIController.h” to you cpp.