I'm trying to make a voxel terrain generator in DOTS. I divided my world into a grid of 16x16x16 chunks. Each chunk is represented by an entity with the "Chunk" component.
For each chunk, I want an array that stores the data of the 4096 voxels in the chunk (depth value, what kind of block is stored there, etc...). I thought it'd be a good idea to use buffers so I made the following:
[InternalBufferCapacity(16 * 16 * 16)]
public struct Voxel : IBufferElementData
{
public float depth;
}
But looks like I can't store this much data on one entity: ArgumentException: System.InvalidOperationException: Entity archetype component data is too large
Does anyone know a better solution?