Ornaments not showing when using ViewAttachmentEntity

If I attach my swiftui view via an ViewAttachmentEntity it will show the view but any ornaments defined are not showing up at all. When I use Xcode preview on the swiftui view the ornaments show up correctly. I am using visionOS beta 3 and the problem easy to reproduce.

Are ornaments on views supported if the view is displayed via an ViewAttachmentEntity?

Answered by Vision Pro Engineer in 796139022

This sounds unexpected, please file a bug on Feedback Assistant. In the meantime, you can work around this by adding the ornament directly on your RealityView instead of inside the Attachment, the result should be the same.

Accepted Answer

This sounds unexpected, please file a bug on Feedback Assistant. In the meantime, you can work around this by adding the ornament directly on your RealityView instead of inside the Attachment, the result should be the same.

Thanks, I will report it even though it actually says that ornaments are not supported in immersive views as a red log row in Xcode.

Since I reported this I already made my own system that attaches child views to the main view to simulate ornaments which gives me some freedom to place them a bit more strategic too.

Thanks for answering so quickly

Ornaments not showing when using ViewAttachmentEntity
 
 
Q