我在 iOS 的 Reality Composer 中制作了一个游戏。现在我想要一个可以使用 Xcode 运行我的 AR 游戏的应用程序。 我该怎么做?
我尝试使用 Reality Kit 为 AR 生成 UI 并加载文件。
struct ARViewContainer: UIViewRepresentable {
func makeUIView(context: Context) -> ARView {
let arView = ARView(frame: .zero)
let anchor = try! Experience.Shoots()
arView.scene.anchors.append(anchor)
return arView
}
func updateUIView(_ uiView: ARView, context: Context) {}
}
它显示“范围内未找到经验”的错误。