Auto-fix for MATERIAL_UNUSED — destroys a SceneMaterial that
no SceneMesh references. The fix checks live mesh references by
object identity before destroying; this lets it clean up models
whose numMeshes counter was left stale by a replaced same-id
material pointer.
Idempotent: returns {fixed: false} when the material is
already destroyed or absent.
Auto-fix for
MATERIAL_UNUSED— destroys a SceneMaterial that no SceneMesh references. The fix checks live mesh references by object identity before destroying; this lets it clean up models whosenumMeshescounter was left stale by a replaced same-id material pointer.Idempotent: returns
{fixed: false}when the material is already destroyed or absent.