bool Trace = World->LineTraceMultiByChannel(Hits,PlayerLocation,PlayerRoation.Vector()*Gun->GetMaxRange(),ECollisionChannel::ECC_Visibility,FCollisionQueryParams(FName(""), false, this));
this is my loop
if (Trace)
{
for (auto result : Hits)
{
FString name = result.GetActor()->GetName();
UE_LOG(LogTemp, Warning, TEXT("%s"), *name);
}
}
When I try to print everything out in a for-each loop the engine crashes