Different Way of Achieveing Transformers in C++

I accepted the challenge to go on ahead, and then I accidentally found a different way to reach the same results. Please tell me what I did and why it worked.

void UPositionReport::BeginPlay()

{
Super::BeginPlay();

FString ObjectName = GetOwner()->GetName();
FString ObjectPos = (GetOwner()->K2_GetActorLocation().ToString());
UE_LOG(LogTemp, Warning, TEXT("Name: %s \n Located at: %s"), *ObjectName, *ObjectPos);

}

Privacy & Terms