I'm trying to load an image from the internet as an image texture for a material in RealityKit & running into trouble. I'm using code similar to the block below:
var material = SimpleMaterial(color: .white, roughness: 0.9, isMetallic: true)
let url = URL("https://example.com/image.png")
material.baseColor = try! .texture(.load(contentsOf: url))
Unfortunately this leads to an error, with the texture failing to load the image from the URL.
Is it possible to load an image from the web as the texture for a RealityKit material? Is there a possible workaround if not directly?
Post
Replies
Boosts
Views
Activity
Hi!
Opening any web-based QuickLook AR experience (e.g. https://developer.apple.com/augmented-reality/quick-look/) in an app that launches an In-App Browser (e.g. Slack, Discord) will result in only the "Object" tab being visible, the AR mode never loads despite the USDZ object loading just fine in the Object tab.
This is a breaking change from iOS 14 & one that I depend on.