Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct ImmersiveView: View {
- let session = ARKitSession()
- let worldTracking = WorldTrackingProvider()
- let rootEntity = Entity()
- var body: some View {
- RealityView { content in
- // Set up session
- try? await session.run([worldInfo])
- }
- .task {
- for await anchorUpdate in worldTracking.anchorUpdates {
- switch anchorUpdate.event {
- case .added:
- // Related code
- case .updated:
- // Related code
- case .removed:
- // Related code
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement