<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/ObjectCaptureSession/resetDetection()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "RealityKit",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:19_RealityKit_SwiftUI20ObjectCaptureSessionC14resetDetectionSbyF"
  },
  "title" : "resetDetection()"
}
-->

# resetDetection()

Moves the session state from `.detecting` back to `.ready` to reset the bounding box and prepare to select a new one
with a new call to `startDetecting()`.

```
@discardableResult @MainActor func resetDetection() -> Bool
```

## Discussion

If the session is not in `.detecting` state this will return false and have no effect.

This call allows the object selection process to be restarted from scratch by the user if the wrong object is automatically
selected or the user wants to discard manual bounding box edits and rerun the automatic selection process.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)