RealityKit - Can I make a RealityKit Entity's material with SwiftUI View?

Viewed 141

Is it possible to augment SwiftUI view in AR World? I need a SwiftUI button view inside AR world. Is it possible to make material of a RealityKit Entity with SwiftUI View?

How can I get clickable SwiftUI button inside AR World?

(Not as a z index over ARViewContainer)

1 Answers

As far as I know there is no way to put a SwiftUI button into AR as it requires a totally different rendering system. If you want, you could create an AR ModelEntity (that looks like a SwiftUI button) and assign it an action when the user taps on it.

Related