<!--
{
  "availability" : [
    "macOS: 27.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "SpatialPreview",
  "identifier" : "/documentation/SpatialPreview/USDPreviewSession/start(endpoint:parameters:viewerOptions:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Spatial Preview",
      "USDKit"
    ],
    "preciseIdentifier" : "s:22_SpatialPreview_USDKit17USDPreviewSessionC5start8endpoint10parameters13viewerOptionsy0aB00aB8EndpointV_AC22OptimizationParametersOAC0a6ViewerJ0VtYaKF"
  },
  "title" : "start(endpoint:parameters:viewerOptions:)"
}
-->

# start(endpoint:parameters:viewerOptions:)

Connects to the specified endpoint and begins streaming the USD stage for spatial preview.

```
nonisolated(nonsending) final func start(endpoint: SpatialPreviewEndpoint, parameters: USDPreviewSession.OptimizationParameters = .processed([.optimized, .compressed]), viewerOptions: USDPreviewSession.SpatialViewerOptions = .default) async throws
```

## Parameters

`endpoint`

The destination endpoint representing the device to connect to.

`parameters`

The optimization strategy to apply to the stage before transmission.
Defaults to [`USDPreviewSession.OptimizationParameters.processed(_:)`](/documentation/SpatialPreview/USDPreviewSession/OptimizationParameters/processed(_:)) with both `.optimized` and
`.compressed` steps enabled.

`viewerOptions`

Interaction capabilities to enable in the remote viewer, such as export,
annotations, and per-object manipulation. Defaults to [`default`](/documentation/SpatialPreview/USDPreviewSession/SpatialViewerOptions/default).

## Discussion

The session automatically optimizes and compresses the `USDStage` to ensure it runs well on visionOS.
Pass [`USDPreviewSession.OptimizationParameters.unmodified`](/documentation/SpatialPreview/USDPreviewSession/OptimizationParameters/unmodified) to opt out of this feature.
Disabling optimization may cause the session to throw [`USDPreviewSession.Error.assetUnshareable`](/documentation/SpatialPreview/USDPreviewSession/Error/assetUnshareable).

> Throws: ``doc://com.apple.SpatialPreview/documentation/SpatialPreview/USDPreviewSession/Error/assetUnshareable`` if the stage complexity exceeds the capabilities of
> the session; or a ``doc://com.apple.SpatialPreview/documentation/SpatialPreview/SpatialPreviewSessionError`` if the connection cannot be established.

---

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)