Go beyond the window with SwiftUI

RSS for tag

Discuss the WWDC23 Session Go beyond the window with SwiftUI

Posts under wwdc2023-10111 tag

2 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Why is a RealityView inside an ImmersiveSpace bound by what seems to be a Window?
I have an app that launches into an immersive space with a mixed immersion style. It appears like the Reality View has bounds that resemble a window. I would expect the bounds to not exist because it's an ImmersiveSpace. Why do they exist? And how can I remove these? This is the entire code: @main struct RealityKitDebugViewApp: App { var body: some Scene { ImmersiveSpace { ContentView() } } } struct ContentView: View { @State var logMessages = [String]() var body: some View { RealityView { content, attachements in let root = Entity() content.add(root) guard let debugView = attachements.entity(for: "entity_debug_view") else { return } debugView.position = [0, 0, 0] root.addChild(debugView) } update: { content, attachements in } attachments: { Color.blue .tag("entity_debug_view") } .onAppear(perform: { self.logMessages.append("Hello World") }) } }
3
0
1.1k
Jun ’24