Your OnSenseUpdate function should look something like this:
OnSenseUpdate(TArray<AActor*> testActors)
{
// check each sensed actor
for (AActor* actor : testActors)
{
// Get all the stimuli
FActorPerceptionBlueprintInfo info;
GetAIPerceptionComponent()->GetActorsPerception(actor, info);
for (FAIStimulus stim : info.LastSensedStimuli)
{
// Sight or Hearing sense
}
}
}
This has shed a little bit more light on the problem, but I’m no closer to fixing the problem. Now, my On Screen logging returns Default_AISense_Sight and Invalid. If I switch the two configure sense lines above, then I have Default_AISense_Hearing and Invalid.
It really appears as if I can only parse through one sense.