I can't reproduce this on my end. I just tried a few of my projects and examples and they are working fine. If I add a print line to the make closure of RealityView, I only see it print once. When I inspect the entity graph I see what I expect to see. I'm using visionOS 26 Beta 5 and the latest Xcode.
Some other things to think about.
You can use a feature in Xcode to capture the entity hierarchy. When you do this, do you see duplicate entities in the same hierarchy or duplicate hierarchies?
https://www.gabrieluribe.me/blog/debugging-realitykit-apps-games-visionos
Is there anything higher up in your SwiftUI stack that could be causing your RealityView to be created more than once?
If you can post some example code showing the issue I may be able to provide more useful help
Topic:
Spatial Computing
SubTopic:
General
Tags: