Modifications that 2D WebView for WebGL makes for fullscreen

Unity's default WebGL template includes a fullscreen button that calls Unity's unityInstance.SetFullscreen() JavaScript API to make the app's <canvas> element go fullscreen. However, that approach of enabling fullscreen is not compatible with 2D WebView for WebGL because it prevents 2D WebView's <iframe> elements from being visible.

To resolve this issue, 2D WebView modifies the compiled project's index.html file at build time to replace instances of unityInstance.SetFullscreen(1) with window.vuplex.SetFullscreen(1), a JavaScript method that behaves identically except it makes the canvas element's parent go fullscreen instead so that 2D WebView's iframe elements remain visible. If your WebGL app links to an external JavaScript file that calls unityInstance.SetFullscreen(1), 2D WebView won't detect and replace it automatically, but you can manually replace it with window.vuplex.SetFullscreen(1) to make it compatible with 2D WebView. If you want to disable 2D WebView's behavior of replacing instances of unityInstance.SetFullscreen(1) at build time, you can do so by adding the scripting symbol VUPLEX_WEBGL_DISABLE_FULLSCREEN_OVERRIDE to the project.