having a problem with my code createdefaultsubobject because i keep getting no instance of overloaded function
.h #pragma once
#include "CoreMinimal.h"
#include "AIController.h"
#include "AI_Controller.generated.h"
/**
*
*/
UCLASS()
class PROJECTX_API AAI_Controller : public AAIController
{
GENERATED_BODY()
virtual void Possess(class APawn* InPawn) override;
UPROPERTY(transient)
class UBehaviorTreeComponent* BehaviorComp;
UPROPERTY(transient)
class UBlackboardComponent* BlackboardComp;
AAI_Controller();
};
.cpp
#include "AI_Controller.h"
#include "BehaviorTree/BehaviorTree.h"
#include "BehaviorTree/BehaviorTreeComponent.h"
#include "BehaviorTree/BlackboardComponent.h"
#include "AI_Character.h"
#include "UObject/UObjectGlobals.h"
void AAI_Controller::Possess(APawn * InPawn)
{
}
AAI_Controller::AAI_Controller()
{
BehaviorComp = CreateDefaultSubobject<UBehaviorTreeComponent>(this, TEXT("BehaviorComp"));
}