How to print content of TArray using UELog?

You need to add the index of the array for the printout…

UE_LOG(LogClass, Log, TEXT(“Names: %s”), *sockets[b].ToString());

hope that helps =)

I am trying to debug a function that includes a TArray and I would like to print to the UELog what is inside of it. This is what I’m trying but it won’t compile.

.H

	UPROPERTY()
	TArray<FName> sockets;

.CPP

	sockets = WeaponMeshComp->GetAllSocketNames();
	for (int32 b = 0; b < sockets.Num(); b++)
	{
		UE_LOG(LogClass, Log, TEXT("Names: %s"), *sockets.ToString()); 
	}

This is the error I get: http://i.imgur.com/4H0V9nc.png