我用 RealityComposer 做了一个游戏。我如何在 Xcode 中使用这个文件?

问题描述 投票:0回答:0

我在 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) {}
}

它显示“范围内未找到经验”的错误。

ios swift swiftui augmented-reality arkit
© www.soinside.com 2019 - 2024. All rights reserved.