There are a couple of ways to add multiple webviews to a scene:
- Drag multiple WebViewPrefab or CanvasWebViewPrefab instances into the scene and set their "Initial URL" properties via the editor. 3D WebView's SimpleWebViewDemo and CanvasWebViewDemo scenes demonstrate this approach
- Create multiple instances at runtime using WebViewPrefab.Instantiate() or CanvasWebViewPrefab.Instantiate(). 3D WebView's AdvancedWebViewDemo demonstrates this approach.
3D WebView doesn't place a hard limit on the number of webviews that can be active at the same time, but performance may eventually degrade as the number of webviews is increased. On most platforms (Windows, macOS, Android), 3D WebView is able to handle multiple webviews efficiently without a loss of performance, and the performance overhead of each additional webview is akin to opening a new browser tab. However, on iOS and Universal Windows Platform (UWP), 3D WebView is not as performant when Native 2D Mode is disabled due to limitations of those platforms. As a result, creating additional 3D webviews on iOS and UWP has a greater performance impact. To provide a rough comparison: an application can usually have 10 active webviews on Windows, macOS, and Android without performance issues, but on iOS and UWP, performance can start to degrade after several webviews unless Native 2D Mode is used.