Spatial widget is a new feature of visionos 26. I notice The system’s Photo app can add a Spatial Image in the widget. I wonder if third apps can use spatial image or any 3D content in it's widget? I try to use RealityView in widget and it run with a crash. So does spatial Image in widget only supported by the system Photo app, and not available to developers now?
Hey @tsia,
These new persistence and snapping features are not exclusive to widgets. You can create this functionality in your app by creating a new WindowGroup for your persistent spatial photo or scene. You can use these new RealityKit APIs within your app, and just like widgets, your scene will persist in the same location even after restart.
Additionally, you can use the surfaceSnappingInfo environment variable to determine if the user has snapped your scene to a surface.
You have full control over the presentation of your content, and with the new preferredWindowClippingMargins view modifier, you can requests additional space to render extra visual effects that enhance the impact of your app.
Does this help achieve your goal? Or were there additional features that you feel might be missing?
Thanks,
Michael