We are using the RoomPlan API to capture data, which is stored in the 'CapturedRoom' variable in our code (referred to as 'finalResult'). We then attempt to save a USDZ file in the file manager. Sometimes it works, but other times, we encounter issues like the one below
Coding Error: in _IsValidPathForCreatingPrim at line 3338 of usd/stage.cpp -- Path must be an absolute path: <>
cannotCreateNode(path: "/9EE71ED0F8D6415496A7B9F0C3671DB0321")
This is that code we are using for shaving CapturedRoom data
func saveFileLocal() {
if let finalResult {
let fm = FileManager.default
let documentsURL = fm.urls(for: .documentDirectory, in: .userDomainMask).first!
//let documentsURL = URL.documentsDirectory
let fileName = "\(UUID().uuidString).usdz"
let fileURL = documentsURL.appendingPathComponent(fileName)
do {
try finalResult.export(to: fileURL)
} catch {
print(error)
}
}
}
Please help us.