Building a voxel engine like Minecraft in Unity (2 of 2)
Part 2 of the voxel engine introduction: turning chunk data into renderable polygon meshes in Unity, one Mesh per chunk, and only drawing the faces that can actually be seen.
5 articles in the notebook
Part 2 of the voxel engine introduction: turning chunk data into renderable polygon meshes in Unity, one Mesh per chunk, and only drawing the faces that can actually be seen.
My Christmas vacation project: a basic introduction to voxel engines à la Minecraft. Part 1 covers what voxels are, polygon meshes, and how to represent a voxel world in memory without hitting limits.
Unity happily lets you write C# but not structure it. Four ways to share code between proper Visual Studio projects and Unity — so your libraries stay testable and your Unity project stops being a big ball of mud.
Unity's Vector2/3/4 and Quaternion lack IEquatable and have a poor GetHashCode, which quietly murders performance the moment you put them in lists or dictionaries. Measurements, explanation, and the fix I reported to Unity.
Unity hanging on the second Play press is a classic symptom with many causes — usually background threads. A walkthrough of my debugging process so you can diagnose your own hang.