# How to get a reference to the currently running instance of an AISense?

**URL:** <https://forums.unrealengine.com/t/how-to-get-a-reference-to-the-currently-running-instance-of-an-aisense/139461>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [March 7, 2020, 3:54pm UTC](https://forums.unrealengine.com/t/how-to-get-a-reference-to-the-currently-running-instance-of-an-aisense/139461 "2020-03-07T15:54:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alessandroTironi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@alessandroTironi](https://forums.unrealengine.com/u/alessandroTironi)\
**Post date:** [March 7, 2020, 3:54pm UTC](https://forums.unrealengine.com/t/how-to-get-a-reference-to-the-currently-running-instance-of-an-aisense/139461/1 "2020-03-07T15:54:11Z")

</div>

Hi, I am striving with this problem on the AIPerceptionSystem for which I believe there is a clean solution but I cannot tell if I am missing something.  
Basically, I am creating a new kind of UAISense class and, in certain moments of the game, I need to get a reference to the currently running instance of that class (the one which is invoking the Update() method, to be clear). However, the Unreal API does not seem to allow this apparently simple operation. I was wondering if there is a reason for that or if I am missing something.

I would rather avoid making the sense a singleton class with a public GetInstance() method, especially if there is a more “official” and clean way to do it.  
Looking forward to hear from you!
