I am attempting to implement a basic behaviour tree in code using this tutorial as a base. From a Basic Code project I enable behavior tress from the experimental menu, add code to the project inherited from BTTask_BlackboardBase, then close the editor, go to Visual Studio and build the project without changing the new class, but I get this error:
Superclass BTTask_BlackboardBase of class MyBTTask_BlackboardBase not found
And from that, error MSB3073.
For reference, here’s the default derived class:
#pragma once
#include "BehaviorTree/Tasks/BTTask_BlackboardBase.h"
#include "MyBTTask_BlackboardBase.generated.h"
/**
*
*/
UCLASS()
class BEHAVIOURTREES_API UMyBTTask_BlackboardBase : public UBTTask_BlackboardBase
{
GENERATED_UCLASS_BODY()
};
Daft question but I’d rather learn in C++ rather than blueprints.
Looks like it should work. My only suggestion is that you made sure you have AIModule declared as your project’s dependency. This is done via YourProjectName.Build.cs file, it should be adding “AIModule” to PublicDependencyModuleNames.