Cannot convert AEnemy *const to const UObject &

Hello, I’ve finally started cleaning up the depreciated functions in 4.13.

One of them was UPathFollowingComponent->AbortMove in my enemy class, which now looks like this:

AbortMove(const UObject & Instigator, FPathFollowingResultFlags::Type AbortFlags);

I can’t figure out what to put in the instigator param. I tried using ‘this’, which resulted in the above error.
What can I pass in for a const UObject &?


Instigator is any object that has called the method. So you could put may be a GetWorld() ?

That didn’t work either.
cannot convert argument 1 from ‘UWorld *’ to 'const UObject &. Problem is I can’t figure out how to properly get that type.

Figured it out. I was thinking, & grabs the reference, which it can’t do if it’s already a pointer.

So I tried: AbortMove(*this), thinking it would de-pointer the pointer and fit into the & param… and it worked!
Didn’t think it would be that easy.

Leaving this here in case anyone else stumbles into the same problem.