Another PR for you to look at if you are interested 👀
An SdfWorld and all its chunks exist on a single GameObject
Chunks are not being created per modification, but work as intended and are networked. Modifications are not their own GameObjects, as 1) gameobject iteration is a major pain point in scene right now for performance and 2) it would be overkill for something like Grubs anyway
Codegen for Broadcast functions seems to be failing for classes with a bunch of generics in the header (didn't really test this extensively) so I created a separate component instead
SdfChunk uses SceneObject + PhysicsShape instead of components. IMO this is cleaner and more closely mimics the old behaviour anyway. I found I was having a hard time offsetting the chunks with ModelRenderer, as it is written to follow the transform of the parent GameObject. Pol works around this by manually offsetting the vertices.
Another PR for you to look at if you are interested 👀
https://github.com/Facepunch/sbox-sdf/assets/57276947/508475b7-722e-48df-b86a-8575391c9ebb