public LazyChunkData(Vector3Int ID, Vector3Int chunkDimensions, VoxelTypeID[] initialData = null) : base(ID, chunkDimensions, initialData) { if (initialData != null) { storage = new StorageImplementation(); storage.InitialiseWithData(chunkDimensions, initialData); } else { storage = new LazyStorageImplementation <LazyChunkData <StorageImplementation>, VoxelTypeID>(this); } }
public LightChunkData(Vector3Int dimensions, LightValue[] initialData = null) { Dimensions = dimensions; if (initialData != null) { storage = new FlatArrayStorage <LightValue>(); storage.InitialiseWithData(dimensions, initialData); } else { //Lazy storage implementation for reduce memory usage storage = new LazyStorageImplementation <LightChunkData, LightValue>(this); } }