Use the OnChunkBeforeCreate event to specify if a chunk can be rendered or not.
The following code produces an empty box centered at 0,100,0.
env.OnChunkBeforeCreate += (Vector3 chunkCenter, out bool overrideDefaultContents, Voxel[] voxels, out bool isAboveSurface) => { Bounds exclusionBox = new Bounds(); exclusionBox.center = new Vector3(0,100,0); exclusionBox.size = new Vector3(80,80,80); if (exclusionBox.Contains(chunkCenter)) { overrideDefaultContents = true; } else { overrideDefaultContents = false; } isAboveSurface = true; };
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article