ios – Scene loaded from .rcproject file would not present up in .nonAR mode on actual iPhone machine

[ad_1]

I’m making an attempt to create a 3D scene for an iOS app utilizing an rcproject file output from RealityComposer.

I attempted to show a Scene loaded from a .rcproject file in ARView with .nonAR mode. The code is as follows.
I’ve confirmed that the simulators show the scene correctly.

However scene shouldn’t be displayed on my precise iPhone8 and iPhone12 mini (Each iOS 16.03).

I’m puzzled why scene loaded from .rcproject file doesn’t present up with my precise machine. If anybody has had the same expertise or has an thought of the trigger, I might respect it should you might assist me.

Thanks for taking the time to learn this put up.

struct ARViewContainer: UIViewRepresentable {

func makeUIView(context: Context) -> ARView {
 
    //  if cameramode is ".ar", work correctly
    let arview = ARView(body: .zero, cameraMode: .nonAR)

    Pattern.loadMySceneAsync { (consequence) in

        do {

            let myScene = strive consequence.get()

            arview.scene.anchors.append(myScene)

        } catch {

            print("Didn't load myScene")

        }

    }
    
    let digicam = PerspectiveCamera()

    let cameraAnchor = AnchorEntity(world: [0, 0.2, 0.5])

    cameraAnchor.addChild(digicam)

    arView.scene.addAnchor(cameraAnchor)

    return arview
}


func updateUIView(_ uiView: ARView, context: Context) {}
}

[ad_2]

Leave a Reply

Your email address will not be published. Required fields are marked *