AR let anchor = AnchorEntity(plane: .vertical)


Code Block
import SwiftUI
import RealityKit
import AVFoundation
...
let anchor = AnchorEntity(plane: .vertical)

Shows error for Xcode 12beta2 and 12beta3:

Extraneous argument label 'plane:' in call
Type 'AnchoringComponent.Target' has no member 'vertical'


What might be wrong?
Answered by andreyib in 624857022
I think I figured the problem here. I need to have the device connected otherwise Xcode shows errors even if I don't build anything. This is not clearly explained in the docs. hope it helps
Accepted Answer
I think I figured the problem here. I need to have the device connected otherwise Xcode shows errors even if I don't build anything. This is not clearly explained in the docs. hope it helps
Hello,

The issue is that the AnchorEntity initializer that you are using is not available on the Simulator. If you select "Any iOS Device" as your build destination, or an actual device as you've noted, you will be able to build. I recommend that you file an enhancement request for a more descriptive error message for this scenario using Feedback Assistant.

Thanks!
AR let anchor = AnchorEntity(plane: .vertical)
 
 
Q