When I spawn a pawn how do I change the material:
AMyPawn* pawn = GetWorld()->SpawnActor<AMyPawn>(PawnList[p], spawnLocation, spawnRotation);
for (TObjectIterator<UStaticMeshComponent> Itr(pawn->GetWorld()); Itr; ++Itr)
{
Itr->SetMaterial(0, PawnList[p].GetDefaultObject()->Materials[m]);
}
3dgo
(3dgo)
2
Maybe this one can help you.
Thank you 3dgo 
Is there a simpler way:
.h
UPROPERTY(EditAnywhere)
TArray<UMaterialInterface*> Materials;
.cpp
const TArray<UActorComponent*>& theComponents = pawn->GetComponents();
int32 componentCount = theComponents.Num();
for (int32 x = 0; x < componentCount; x++)
{
USkeletalMeshComponent* mesh = Cast<USkeletalMeshComponent>(theComponents[x]);
if (mesh)
{
mesh->SetMaterial(0, MyPawn.GetDefaultObject()->Materials[m]);
}
}