ios - 无法在 Xcode 中查看 .dae 文件

标签 ios scenekit arkit maya

我通过Maya或3dMax导出.dae文件,将此.dae文件复制到xcode项目中,有时此文件无法查看,我必须删除此文件并导出另一个文件。 当点击错误文件时 -> xcode 显示警报

Unable to load file:///Users/MACBOOK/Desktop/AR/TestAR%202/TestAR/TestAR/3d.scnassets/__testFile/model.dae. (Error Domain=NSCocoaErrorDomain Code=259 "The document "model.dae" could not be opened." UserInfo={NSURL=file:///Users/MACBOOK/Desktop/AR/TestAR%202/TestAR/TestAR/3d.scnassets/__testFile/model.dae, NSLocalizedDescription=The document "model.dae" could not be opened., NSLocalizedRecoverySuggestion=The document does not have a scene. Please check that it has not been corrupted.})

有人知道为什么会发生这种情况以及如何解决吗?

最佳答案

我遇到了这个问题,我在我使用的 .dae 文件中发现了这个问题:

<scene>
  <instance_visual_scene url="#walk test 3ds 2020 export"/>
</scene>

我删除了空格以获取

<scene>
  <instance_visual_scene url="#walktest3ds2020export"/>
</scene>

并且还编辑了该字符串出现在文件中的其他位置,并且加载成功。所以这是一个可能需要检查的事情。

另请参阅此线程,这促使我查找无效字符:https://forums.autodesk.com/t5/fbx-forum/3d-artist/m-p/7294181/highlight/true#M8817

关于ios - 无法在 Xcode 中查看 .dae 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56872837/

相关文章:

ios - Xcode swift 失败,退出代码为 254

ios - 始终锁定 iPhone 应用程序方向

swift - ARKit:如何在 Storyboard 中向 ARView 添加按钮?

ios - Apple ARKit——从 CGImage 创建 ARFrame

ios - 导航栏颜色

ios - 在 UITableViewCell 中显示复杂数据

ios - UINavigationViewController 中的大量 SceneKit 场景需要很长时间才能解除分配

swift - 在 swift SceneKit 中绘制带有顶点的自定义节点的示例是什么?

swift - 使用PhysicsBody旋转SCNNode以匹配Thumbstick的弧度

ios - 如何在不卡住 ARSession 的情况下将 ARSCNView 放入 Tabview Controller 中?