<!--
{
  "availability" : [
    "visionOS: 26.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FoveatedStreaming",
  "identifier" : "/documentation/FoveatedStreaming/FoveatedStreamingSession/ImmersivePresentationBehaviors-swift.struct/automatic(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Foveated Streaming",
      "FoveatedStreaming"
    ],
    "preciseIdentifier" : "s:17FoveatedStreaming0aB7SessionC30ImmersivePresentationBehaviorsV9automaticyAE7SwiftUI04OpenD11SpaceActionV_AG07DismissdkL0VtFZ"
  },
  "title" : "automatic(_:_:)"
}
-->

# automatic(_:_:)

Opens the immersive space when the session connects or resumes
and dismisses the immersive space when the session pauses or disconnects.

```
static func automatic(_ open: OpenImmersiveSpaceAction, _ dismiss: DismissImmersiveSpaceAction) -> FoveatedStreamingSession.ImmersivePresentationBehaviors
```

## Parameters

`open`

The action that opens the immersive space.

`dismiss`

The action that dismisses the immersive space.

---

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)