void AShooterAIController::Possess(APawn*InPawn)
{
Super::Possess(InPawn);
AShooterBot*Bot = Cast<AShooterBot>(InPawn);
//start behavior
if(Bot && Bot->BotBehavior)
{
BlackboardComp->InitializeBlackboard(Bot->BotBehavior->BlackboardAsset);
EnemyKeyID= BlackboardComp->GetKeyID("Enemy");
NeedAmmoKeyID= BlackboardComp->GetKeyID("NeedAmmo");
BehaviorComp->StartTree(Bot->BotBehavior);
}
}
this is UE4 c++ code AIcontoller Possess (this code is in shootergame project)
this AI is normal untill UE4.6
when I upgrade to 4.6 , compile error
this code have error
BehaviorComp->StartTree(Bot->BotBehavior);
any one know how to fix it?