Print name of Actor C++

Hi, I’m having some trouble converting an actor reference to an FString so it can be printed with AddOnScreenDebug, how do I convert the Actor ref to an FString?

Try this:

AActor* MyActor = /* Your actor reference */;
FString ActorName = MyActor->GetName();