Calling SetActorLabel causes an actor's components to return to default states when called from a client accessing a listen server outside of main editor process.
Note: User posted code linked to spawn actor on linked URL. Code is located below:
ASpawner::ASpawner()
{ Spawned = nullptr; } void ASpawner::BeginPlay()
{
Spawned = GetWorld()->SpawnActor<AActor>(SpawnedClass);
for (UActorComponent* MeshActorComponent : Spawned->GetComponentsByClass(UStaticMeshComponent::StaticClass()))
PrintMeshMaterials();
Spawned->SetActorLabel(TEXT("Spawned Actor with Label"));
PrintMeshMaterials();
}
void ASpawner::PrintMeshMaterials()
{
for (UActorComponent* MeshActorComponent : Spawned->GetComponentsByClass(UStaticMeshComponent::StaticClass()))
}
1. Download and unzip attached zip file
2. Open Project in .zip file
3. Go to Play dropdown menu>Advanced settings.
4. Set Number of Players to 2
5. Uncheck Use Single Process
6. Set Editor Multiplayer Mode to Play as Listen Server
7. Press Play
Head over to the existing Questions & Answers thread and let us know what's up.