I was wondering if someone know is it possible to load an AR object (.usdz for example from web url and place it in the AR view). I tried with this:
let fileUrl = NSURL(string: "https://developer.apple.com/augmented-reality/quick-look/models/drummertoy/toy_drummer.usdz")
cancellable = Entity.loadModelAsync(contentsOf: fileUrl! as URL)
.sink(receiveCompletion: { completion in
self.cancellable?.cancel()
}, receiveValue: { [self] (model: Entity) in
if let model = model as? ModelEntity {
let anchorEntity = AnchorEntity(anchor: anchor)
anchorEntity.addChild(model)
arView.scene.addAnchor(anchorEntity)
loadingView.isHidden = true
}
})
but it is not working and throwing error Failed to open scene 'https://developer.apple.com/augmented-reality/quick-look/models/drummertoy/toy_drummer.usdz'.
Do you if it is possible?