usdz 文件的 SCNSceneSource 标识符为空

SCNSceneSource identifiers with usdz file are empty

我们正在使用 ARKit 2 + SceneKit 开发一个项目,iOS 12。 我们能够使用 .dae 个文件检索 CAAnimation 个实例,并在运行时控制它们。 现在,我们正在尝试 .usdz,但是可以使用 usdz 从 SCNSceneSource 中提取 类 的 none :

let source = SCNSceneSource(url: url, options: options)
let animationIdentifiers = source?.identifiersOfEntries(withClass: CAAnimation.self)

animationIdentifiers 始终为空。此函数 https://developer.apple.com/documentation/scenekit/scnscenesource/1523656-identifiersofentries

文档中列出的所有 类 也是如此

我们已经测试了我们自己的 usdz 创作以及来自 https://fusionar.app 的一些 usdz。

很难,在 iOS 或 Xcode 中查看文件时动画播放效果很好,我们可以访问动画和场景图设置:

但绝对不是来自运行时的代码,因此我们无法控制动画。

你遇到过这个问题吗?

对此有何见解?

SCNSceneSource 中检索条目仅适用于 Collada 文件。使用 USDZ 文件时,您必须遍历节点层次结构并使用 -animationPlayerForKey:.

从包含它的节点检索动画