Posts

Post not yet marked as solved
2 Replies
And in fact, the code copied straight from the WWDC section no longer builds, either: import SwiftUI import RealityKit struct MoonOrbit: View { var body: some View { RealityView { content, attachments in guard let earth = try? await Entity(named: "Earth") else { return } content.add(earth) if let earthAttachment = attachments.entity(for: "earth_label") { earthAttachment.position = [0, -0.15, 0] earth.addChild(earthAttachment) } } attachments: { Text("Earth").tag("earth_label") } } } This produces "'init(make:update:attachments:)' is unavailable in visionOS" on the RealityView declaration line.