Open AldeRoberge opened 1 year ago
This happens when changing the Chunk Draw Distance at runtime (i.e. going from 4 then to 1)
_ChunkPoolSize = (settings.Chunk.DrawDistance + 2).CubedSize();
I changed the pool size to draw_distance + 2, So there will be more chunks active even a few far ones. This initialization happens in the constructor of the ChunkPool, even for other settings right now they can't be changed at runtime.
We can have a single source of settings and achieve runtime changes
We can have a single source of settings and achieve runtime changes
That's interesting. I think we should allow players to change their chunk render distance at runtime!
Seems like the scheduler never reclaims (unloads) faraway chunks, resulting in a loss of performance.