Count spawned walkers at begin play

This commit is contained in:
nsubiron 2017-05-24 11:49:14 +01:00
parent 795ec2e12e
commit 29178cced7
1 changed files with 5 additions and 1 deletions

View File

@ -86,9 +86,13 @@ void AWalkerSpawnerBase::BeginPlay()
}
if (bSpawnWalkers) {
uint32 Count = 0u;
for (auto i = 0; i < NumberOfWalkers; ++i) {
TryToSpawnWalkerAt(*BeginSpawnPoints[i % BeginSpawnPoints.Num()]);
if (TryToSpawnWalkerAt(*BeginSpawnPoints[i % BeginSpawnPoints.Num()])) {
++Count;
}
}
UE_LOG(LogCarla, Log, TEXT("Spawned %d walkers at begin play."), Count);
}
}