'How to use RealityKit's image AnchorEntity in SwiftUI?

I want to use RealityKit's AnchorEntity initialized with an Anchoring Component Target of type Image. Here is what I am trying to do:

let anchorEntity = AnchorEntity(.image(group: "AR Resources", 
                                        name: "imgAnchor"))

I have found zero documentation on how to use this.

Does anyone know the right way to do it?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source