Quick answer: CSGShape3D is editor-only by default in exported builds - bake to MeshInstance3D before export.

If you are searching for how to fix godot csgshape3d meshing disappears at runtime, you are not alone. This is a recurring issue in Godot that comes up across many team projects. The behavior looks like a deep bug, but it usually traces back to a known interaction between two systems. Here is the full breakdown of the symptom, the cause, and a fix you can apply today.

The Symptom

Your CSG-based level looks correct in the editor preview and even in F5 'Play Project' tests, but after exporting the game the CSG meshes are missing entirely. Collision still works, but nothing renders.

Root Cause

CSGShape3D is documented as an editor-only prototyping tool. The boolean mesh is computed on the CPU at runtime, and the export process may strip it or fail to compute it in time depending on render priorities. Even when it works, performance is poor.

The Fix

Step 1: Select your CSGShape3D root, use the inspector context menu 'Bake Mesh Instance', save the resulting MeshInstance3D as a scene, and replace the CSG with it before export.

@tool
extends CSGShape3D

func _ready():
    if Engine.is_editor_hint():
        return
    var mesh = bake_static_mesh()
    var mi = MeshInstance3D.new()
    mi.mesh = mesh
    get_parent().add_child(mi)
    queue_free()

Step 2: If you need to keep CSG for level iteration, write an @tool script that auto-bakes on scene save. The shipped game then loads the baked mesh, not the CSG hierarchy.

# Editor: select CSG root → right-click → Bake Mesh
# Then save as .tscn and instance instead of CSG

Step 3: For collision-only use cases (invisible walls, triggers), keep the CSGShape3D but set use_collision = true and set visible = false - collision survives export.

Check the boundary; the bug lives between systems.