---
title: "updateUndoRedoCounts(undo:redo:)"
framework: spatialpreview
role: symbol
role_heading: Instance Method
platforms: [macOS 27.0+]
path: "spatialpreview/usdpreviewsession/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.

## Declaration

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