我通过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/