Greetings fellow C++ students,
In the video “Accessing Object Names” a lot of new things are introduced.
The code used was this:
> void UPositionReport::BeginPlay()
{ Super::BeginPlay(); FString ObjectName = GetOwner()->GetName(); UE_LOG(LogTemp, Warning, TEXT("Position report for %s"), *ObjectName ); }
So basically what we did, is created a variable called “ObjectName”. It’s job is to find the name of an object through a pointer. That pointer is then referenced in the log via Format Operator which is taking the data of ObjectName and placing it into the string we want printed out.
That is my understanding, I feel like it’s valid from what I understand from code, but if I’m wrong, don’t hesitate to respond!