Hello. So i am able to use on see pawn in blueprint and print string to check if its firing and it is, but i use UE_LOG in c++ in OnSeePawn method and its not firing. Here is the code.
I cant use TSubjectPtr because its deprecated. I was just following a tutorial because i wanted to do perception in c++ not blueprint. So i feel like the tutorial might be outdated. So i just wanna ask. Is this the best approach to this? Like create a class based on character and use it for AI or is there a better and more efficient way to do it(in c++) in unreal engine 4.21.
I have got it.
You have to writre binding code (PawnSensingComp->OnSeePawn.AddDynamic(this, &AFPSAIGuard::OnSeePawn) not in the Constructor, but in BeginPlay function.