Can't make a behavior tree work in 4.3. Crazy errors

Good day it is the first time I post something in the forums but I have been trying for hours to resolve this issue but I can’t find anything working. I want to create a behavior tree in unreal engine 4.3. So I have added AIModule to the project.build.cs file since before that it would state that the superclass did not exist. However after this I got a few errors and I don’t know what’s causing them.

Code:
#pragma once

#include "AIController.h"
#include "TutorialAIController.generated.h"

/**
 * 
 */
UCLASS(config = Game)
class AIPROJECT_API ATutorialAIController : public AAIController
{
	GENERATED_UCLASS_BODY()

	UPROPERTY(transient)
	TSubobjectPtr<class UBlackboardComponent> BlackboardComp;

	UPROPERTY(transient)
	TSubobjectPtr<class UBehaviorTreeComponent> BehaviorComp;

	virtual void Possess(class APawn* InPawn) override;
	virtual void BeginInactiveState() override;
	void SetEnemy(class APawn* InPawn);

	UFUNCTION(BlueprintCallable, Category = Behavior)
	void FindClosestEnemy();
	virtual void UpdateControlRotation(float DeltaTime, bool bUpdatePawn = true) override;

protected:
	int32 EnemyKeyID;
	int32 EnemyLocationID;

};

and I get these errors

Error 2 error C2439: ‘TSubobjectPtrConstructor::Object’ : member could not be initialized

Error 1 error C2440: ‘initializing’ : cannot convert from ‘UBlackboardComponent *’ to ‘UObject *’

Error 3 error : Failed to produce item

Please help me guys and gals, I am quite confused right now !

Try including headers for blackboard and behavior tree components.

Cheers,

–mieszko

alright I will try that ! As soon as I get home and work on that I will update my questions whether it is fixed or not Thank you Mieszko ! by the Way I love your tutorial page !

alright it finally worked ! Thank you ! I had some difficulty in making everything work together but after I added the headers and made sure all the function in the .h file were in the .cpp I got no errors !!! HUrray

I had to add these 3 headers before the generated header

#include “BehaviorTree/BlackboardComponent.h”
#include “BehaviorTree/BehaviorTreeComponent.h”
#include “BehaviorTree/BehaviorTree.h”