Auto-fix for OBJECT_DUPLICATE_AABB — destroys every duplicate
SceneObject listed in context.duplicates, leaving the
canonical (issue.resourceId) one in place.
SceneObject.destroy() doesn't cascade-destroy meshes — meshes
left attached to a destroyed object would dangle. The fix
detaches each mesh first (obj.removeMesh), then destroys the
mesh (mesh.destroy refuses while attached), then destroys the
object. Geometries the duplicate referenced are not touched —
if they become unreferenced, the existing
unusedResources flow can clean them up on a
subsequent pass.
Idempotent: returns {fixed: false} when every listed
duplicate is already missing or destroyed.
Auto-fix for
OBJECT_DUPLICATE_AABB— destroys every duplicate SceneObject listed incontext.duplicates, leaving the canonical (issue.resourceId) one in place.SceneObject.destroy() doesn't cascade-destroy meshes — meshes left attached to a destroyed object would dangle. The fix detaches each mesh first (
obj.removeMesh), then destroys the mesh (mesh.destroyrefuses while attached), then destroys the object. Geometries the duplicate referenced are not touched — if they become unreferenced, the existing unusedResources flow can clean them up on a subsequent pass.Idempotent: returns
{fixed: false}when every listed duplicate is already missing or destroyed.