This Unity project demonstrates how to interact with web content in augmented reality using AR Foundation and Vuplex 3D WebView. It's a fork of the Unity AR Foundation Samples repo that adds a scene named ARWebViewDemoScene.
-
Download Unity 2020.3 or 2021.1
-
Open Unity and load the project at the root of the ar-foundation-webview-example repository.
-
Import Vuplex 3D WebView.
-
Select Android or iOS as the platform.
-
Build ARWebViewDemoScene and run it on your device.
-
Forked the Unity AR Foundation Samples repo (4.1 branch).
-
Imported Vuplex 3D WebView (.gitignore).
-
Made a copy of the Anchors scene named ARWebViewDemoScene.
-
Made the following modifications to the new ARWebViewDemoScene scene (e31b637):
- Changed the "Prefab" setting of the scene's AnchorCreator to a new prefab with a WebViewARAnchor.cs script that creates a WebViewPrefab and Keyboard.
- Added a Physics Raycaster to the AR Camera to enable touch interaction with the WebViewPrefab and Keyboard.
- Replaced the scene's StandaloneInputModule with InputSystemUIInputModule because the project uses the new Input System.