onDetach method
Called when this component is removed from a node.
Implementation
@override
void onDetach() {
controller.removeListener(_onCapture);
final meshComponent = _meshComponent;
if (meshComponent != null && meshComponent.isAttached) {
node.removeComponent(meshComponent);
_meshComponent = null;
}
}