本文介绍了来自Reality Composer的文件无法切换iPhone 7上的场景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Reality Composer中创建了多场景文件.它们在该软件中可以正常工作,但是当我将它们导出到 reality 文件中,将它们加载到我的iPhone 7上,然后运行它们时,交互行为有效,但是当我单击按钮时改变场景,什么也没发生.

I've created multi-scene files in Reality Composer. They work fine within that software, but when I export them out to a reality file, load them onto my iPhone 7, and then run them, the interactive behaviors are working, but when I click on a button to change scenes, nothing happens.

这是已知错误,还是尚未实现的功能?

Is this a known bug, or a feature not implemented yet?

推荐答案

这不是错误.似乎您没有在移除包含A场景的先前锚点的同时,将持有B场景的锚点追加到锚点数组中.

It's not a bug. Seemingly you do not append anchor holding B scene to an array of anchors, while removing previous anchor containing A scene.

您可以阅读这篇文章(第二种方法),以了解如何实施所需的方法.

You can read this post (a second approach) to find out how to implement a desired methodology.

@IBAction func tappedButton(_ sender: UITapGestureRecognizer) {

    if (counter % 2) == 0 {
        arView.scene.anchors.removeAll()
        arView.scene.anchors.append(firstSceneAnchor!)
    } else {
        arView.scene.anchors.removeAll()
        arView.scene.anchors.append(secondSceneAnchor!)
    }
    counter += 1
}

这篇关于来自Reality Composer的文件无法切换iPhone 7上的场景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 07:41