Updated loadAll check to set to false if previous entities already spawned on ticket

This commit is contained in:
sconel
2021-05-19 08:58:12 -07:00
parent 4769664e9e
commit 31e5a312b4
@@ -260,7 +260,16 @@ namespace AzFramework
spawnedEntityIndices.push_back(i);
}
ticket.m_loadAll = true;
// loadAll is true if every entity has been spawned only once
if (spawnedEntities.size() == entitiesToSpawnSize)
{
ticket.m_loadAll = true;
}
else
{
// Case where there were already spawns from a previous request
ticket.m_loadAll = false;
}
// Let other systems know about newly spawned entities for any pre-processing before adding to the scene/game context.
if (request.m_preInsertionCallback)