public void CallCreateGridsFromPrefab(ParallelTasks.WorkData workData) { try { MyPrefabManager.Static.CreateGridsFromPrefab(m_results, m_prefabName, m_worldMatrix, m_spawnAtOrigin, m_ignoreMemoryLimits, m_factionId, m_callbacks); } finally { Interlocked.Decrement(ref PendingGrids); if (PendingGrids <= 0) { FinishedProcessingGrids.Set(); } } }
public void CallCreateGridsFromPrefab(ParallelTasks.WorkData workData) { try { MyEntityIdentifier.LazyInitPerThreadStorage(2048); MyPrefabManager.Static.CreateGridsFromPrefab(m_results, m_prefabName, m_worldMatrix, m_spawnAtOrigin, m_ignoreMemoryLimits, m_factionId, m_callbacks); } finally { m_resultIDs = new List <VRage.ModAPI.IMyEntity>(); MyEntityIdentifier.GetPerThreadEntities(m_resultIDs); MyEntityIdentifier.ClearPerThreadEntities(); Interlocked.Decrement(ref PendingGrids); if (PendingGrids <= 0) { FinishedProcessingGrids.Set(); } } }