I am loading toy-robot-vintage.usdz (to be sure, I've checked the other models too) from apple website into my project.
In the quick look you can play the animation for that robot. But after I load the model, and successfully placed it into the scene, I want to print the list of available animations with the button. It always prints an empty array
Forgive me for the force unwrap:
let robot = try! ModelEntity.load(named: "robot")
Then, I print the available animations (after the model was fully loaded).
@objc private func multipurposeButtonTapped() {
print(robot.availableAnimations)
print(robot.availableAnimations.count)
}
But the result is always the same:
I've checked Apple developer forum and found that question been asked a year ago, sadly with no response. The one annotation was to change .loadModel method to .load, but that did not solve the issue in my case.
What could be wrong here?
Thank you.