diff --git a/src/Arch/Core/Archetype.cs b/src/Arch/Core/Archetype.cs index 82ea7b5..d7036ba 100644 --- a/src/Arch/Core/Archetype.cs +++ b/src/Arch/Core/Archetype.cs @@ -547,6 +547,11 @@ public int CalculateEntitiesPerChunk(ComponentType[] types) [MethodImpl(MethodImplOptions.AggressiveInlining)] private void EnsureChunkCapacity(int newCapacity) { + if (ChunkCapacity >= newCapacity) + { + return; + } + // Increase chunk array size var newChunks = ArrayPool.Shared.Rent(newCapacity); Array.Copy(Chunks, newChunks, ChunkCapacity);