Trying to implement AISightTargetInterface. C2259 Compling error

I am not much of a C++ programmer, and when trying to inherit from AISightTargetInterface to get my AI Perception up to snuff I keep getting a compiling error about not being able to instantiate an abstract class…

I’ve tried my best to follow the interface tutorials and the way to few topics on this specific, but in my mind crucial (for most games) interface but I’m stuck…

127203-acpp_415testcharactererror.png

What even is the _getUObject function?.. I have no idea what i would override it with and why do i even have to, apart from it being a pure virtual function. it’s not in the IAISightTargerInterface files as far as i can see…
I’ve been putting off asking cause i imagine it’s a C++ rookie mistake I’m making but after days of googling, trying to change the implementation, setting up new projects in other versions (this last one where the grabs are from in 4.15) i’m just stuck and am in need of help…

This is my latest attempt with a blank c++ top down template. Any help would be greatly appriciated.

Hi,

The _getUObject function is an implementation detail of the runtime reflection system. Code is generated for it when UnrealHeaderTool sees that your class is implementing a UINTERFACE. As this hasn’t happened, I’m guessing that UHT doesn’t realise your interface is a UINTERFACE.

Can you show your interface code, please?

Steve

Hey,

Do you have the AIModule in your project’s dependencies?

Cheers.

–mieszko

it was NOT, and adding it fixed it straight away! Thank you Mieszko!