Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func loadWorldAnchors() {
- let filePath = // use the same file path
- guard let filePath, FileManager.default.fileExists(atPath: filePath.path(percentEncoded: true)) else {
- return
- }
- do {
- let data = try Data(contentsOf: filePath)
- worldAnchors = try JSONDecoder().decode([UUID: String].self, from: data)
- } catch {
- print("Failed to restore the mapping from world anchors to persisted objects.")
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement