So, I have a procedural mesh generation system with chunks that load in and generate as the player walks into a nearby cell, and get removed when the player walks out. When each set of 9 cells is getting generated, this takes around 1500 ms. When they are being generated, the game thus freezes. Is there a way to make the game NOT freeze and allow the player to continue doing things in their current chunk while the area is being generated? Like having the terrain gen happening in the background? EDIT- From @DmGregory- the ob struct seems like it would work, but I am a bit confused as to whether or not I can include all of mymesh geneartion and update function in it,or if I need to find a way to pass out the mesh and verts from the job. What is the best way to do this?
Prevent mesh generation function from blocking other functions from running
Spaceguy99
- 27
- 7