Hi there,
I have an actor, let’s call it MyListener, that uses a UAIPerceptionComponent and configures a sense in PostInitializeComponents():
GetPerceptionComponent()->ConfigureSense(*this->SenseConfig_Ball);
Another actor, StimSource, uses UAIPerceptionStimuliSourceComponent and registers itself in PostInitializeComponents():
this->AIStimuliSource->RegisterForSense(UAISense_Ball::StaticClass());
Everything works so far. The only problem is that the configuring of the sense is called before the sense is registered. This leads to the UAIPerceptionSystem adding the MyListener to the Listeners. But creating the sense does not notify the sense of already existing listeners (UAIPerceptionSystem::RegisterSenseClass(TSubclassOf SenseClass).
Unfortunately, UAIPerceptionSystem::RegisterSenseClass(…) is not virtual, so I can’t add them myself upon sense creation…
Am I missing something?