How does VoxelPlay decide which chunks to load?

Modified on Wed, 21 Oct 2020 at 07:15 PM

A chunk is loaded by Voxel Play when:


- Any API tries to access its contents, for example: GetVoxelIndex(position).

- When the chunk boundaries are within camera frustum (based on Chunk Visible Distance option in Voxel Play inspector).

- When the chunk is near the player (based on Force Chunk Distance value in Voxel Play inspector)

- When some observer requires it. An observer can be any gameobject that has the Voxel Play Behaviour script attached. Mobs should have a Voxel Play Behaviour script attached to ensure the immediate terrain around them is created.


Once a chunk is required, Voxel Play will invoke the terrain generator if it's new. If the chunk contents are ready but the mesh data is pending, it will add the chunk to the meshing queue and finally it will update its representation in the scene. Check the chunk lifecycle for more details.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article