I use CSG to create levels, but it really lags my game (low frames and tons of freeze-frames). I have a pretty decent desktop so that’s not an issue. Can someone explain how why it does that?
I deleted the scene before taking screenshots but the layout looked like this:
Node3D
CSG is basically doing procedual meshes all the time. You can not expect good runtime performance from that, especially when your CSG meshes and ops are numberous and/or complex.
CSG is not intended to replace your static mesh geometry in your level and there is a very clear documentation warning about using it like this.
What you are supposed to do with CSG after you are done with the prototype is to convert it to static meshes or export e.g. as gltf scene so you can turn your prototype into your actual level and something that is performance usable.
You can also use the get_meshes() function on the main CSG node in a script and save the returned static meshes to a resource with the ResourceSaver to be used with e.g. a MeshInstance3D.