Log actor name not returning the full name

Hi all, in the code following, I print the name of the actor that is overlapping the pressure plate, but the name is not the full name but a capital letter. Is it that I did something wrong?

for (AActor* Actor : OverlappingActors)
	{
		TotalMass += Actor->FindComponentByClass<UPrimitiveComponent>()->GetMass();
		UE_LOG(LogTemp, Warning, TEXT("%S is on the plate"), *Actor->GetName());
	}

LogTemp: Warning: C is on the plate

When I put the cube and cone on it, this is what is printed out for both cube and cone. When the BP_DefaultPawn is on it, it prints B is on the plate.

Thanks in advance!

It should be %s with a lowercase ‘s’

oh my. I didn’t notice that. Thanks so much! :rofl:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms