Assume you’re talking about a C++ function. You need to cast the actor to the actor class you’ve defined the function in. The cast will return null if the types are incompatible (if it’s not your actor class) so you can do something like this:
if (AMyActorClass* MyActor = Cast<AMyActorClass>(Actor))
{
// Do whatever your custom actor class lets you do
MyActor->MyAwesomeFunction();
}
else
{
// Actor is not an instance of MyActorClass
}