[Resolved] Problem with AI Perception Update

Hello.

I’m trying to set up an AI perception system, using C++, but I’ve run into an issue.

I got the perception system running, when I enable debug I can see the ai perception is able to detect other actors, the problem that I’m facing is that the code that’s suppsed to run, when the perception detects something, doesn’t seem to want to run.
I have put a stimulus source on the other actors.

I have tried several different things I’ve found through google, with no luck.

I’ve attached images of the AIController’s constructor, where I set up the perception system.
The function I’m trying to call, when perception is updated,
And Where I set up the stimulus source, in the actor’s constructor.

Thanks in advance.


Function to run on perception updated

Found a solution. Added UFUNCTION() to OnObjecttSensed().