This Unity project demonstrates how to view and interact with web content on Apple Vision Pro using Vuplex 3D WebView with Unity's RealityKit app mode for visionOS. All you need to do is import 3D WebView for visionOS into the project and then build the VisionOSRealityKitWebViewExample scene, which demonstrates how to use the VisionOSWebView.CreateInWindow() API to open a webview in a native visionOS (SwiftUI) window.
- Created a new project with Unity 6 (6000.0.25) using the 3D URP project template.
- Opened the Unity Package Manager and did the following:
- Imported v2.0.4 of the com.unity.polyspatial.visionos package and its dependencies.
- On the page for the com.unity.polyspatial package, clicked on the "Samples" tab and clicked "Import" button for "Unity PolySpatial Samples".
- Made a copy of the Manipulation sample scene and named it VisionOSRealityKitWebViewExample.
- Added a VisionOSRealityKitWebViewExample.cs script that uses the VisionOSWebView.CreateInWindow() API to open a windowed webview.
- Removed unneeded objects from the VisionOSRealityKitWebViewExample scene.
- Updated the following project settings:
- "XR Plug-in Management": enabled the "Apple visionOS" XR plugin
- "XR Plug-in Management" -> "Apple visionOS":
- Changed the App Mode to "RealityKit"
- Added values for "Hand Tracking Usage Description" and "World Sensing Usage Description"
- Enabled "IL2CPP Large Exe Workaround"
- Player Settings:
- Disabled "Show Splash Screen"
- Changed "Color Space" to "Linear"