There is yet one more problem. The last laggy piece of code is
toLoad.Sort(delegate (Vector4 first, Vector4 second) { return first.w.CompareTo(second.w); });
Is there a faster way to sort objects? This one line is generating 50% of my lag.
I tried and failed to find the definition of "toLoad" in your previous code. Any information about the Vector4 class would also be helpful.
Why is this sorting just Vector4s? How are they linked back to the actual objects you need to sort? My C# is still a little rusty - is there something I'm missing here?
The Vector4s are the position and distance of a chunk. Any chunk can be loaded using its position. Vector4s are default structs in Unity.