<!--
{
  "availability" : [
    "macOS: 27.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "SpatialPreview",
  "identifier" : "/documentation/SpatialPreview/USDPreviewSession/updateUndoRedoCounts(undo:redo:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Spatial Preview",
      "USDKit",
      "_SpatialPreview_USDKit"
    ],
    "preciseIdentifier" : "s:22_SpatialPreview_USDKit17USDPreviewSessionC20updateUndoRedoCounts4undo4redoySu_SutYaKF"
  },
  "title" : "updateUndoRedoCounts(undo:redo:)"
}
-->

# updateUndoRedoCounts(undo:redo:)

Update the count of undoable and redoable actions in the USDPreviewSession which is reflected in the UI on visionOS.

```
final nonisolated(nonsending) func updateUndoRedoCounts(undo: UInt, redo: UInt) async throws
```

---

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)