Failed to compile after extending from UBTTask_* classes

Hey Peeps!

I am trying to create a new behavior tree task by extending from either UBTTask_BlueprintBase or UBTTask_BlackboardBase but when I do so from the Unreal Editor using File->Add Code to Project it results in the following error:

[2015.03.07-15.03.01:521][686]CompilerResultsLog:Error: Error /Users/anshul_goyal/Documents/Unreal Projects/ShotgunHades/Source/ShotgunHades/AI/BehaviorTrees/Tasks/BTTask_FindRandomPosition.h(11)  : Error: Superclass BTTask_BlackboardBase of class BTTask_FindRandomPosition not found

[2015.03.07-16.11.54:670][338]CompilerResultsLog:Error: Error /Users/anshul_goyal/Documents/Unreal Projects/ShotgunHades/Source/ShotgunHades/AI/BehaviorTrees/Tasks/BTTask_FindRandomPosition.h(11)  : Error: Superclass BTTask_BlueprintBase of class BTTask_FindRandomPosition not found

BTTask_FindRandomPosition is the name of the class that I trying to add. So after this I closed the editor and tried to compile from XCode directly, the build still failed with the attached log.

I looked at some of the BT Tasks that is already in the engine for eg: UBTTask_MoveTo and UBTTask_MoveDirectlyToward and try to mimic exactly what they are doing but still the project fails to compile.

I am on OSX Yosemite with UE4.7 running directly from the source.

Any help is much appreciated!

bttask-compilation-failed.log

Bumping up my question :slight_smile:

It seems you’re missing AIModule as your project’s dependency. Add the following line to your project’s *.Build.cs file:

PublicDependencyModuleNames.Add("AIModule");

We are aware of the issue and have a fix is coming soon.

Cheers,

–mieszko