Chunk Class for Unity Voxel Engine (Example)


Here’s an example of a Chunk class i use in some variants of the engine. This one is a bit experimental but working OK so far.





A voxel engine in c# and Unity 3D. Written from the ground up it’s been a fun learning experience so far. I have a better understanding now of 3D engines that use chunks to store data. Unity’s single main thread makes it a bit difficult to update collision data as fast as i would like. ¬†Terrain generation and lighting can all be multi-threaded but the unity game object is a real bottle neck so far. I’ve had to limit the amount of work i let it do to keep the frame rate reasonable.