Skip to content

Support FullScreen

kou_yeung edited this page Jun 16, 2020 · 4 revisions

WebGLInput is auto inject a custom function for fullscreen.

document.makeFullscreen('element-name')

if you want to support fullscreen. you can edit the index.html after you build it.

for Unity2017 & Unity2018

change fullscreen function

<div class="fullscreen" onclick="gameInstance.SetFullscreen(1)"></div>

<div class="fullscreen" onclick="document.makeFullscreen('gameContainer')"></div>

for Unity2019

change fullscreen function

<div class="fullscreen" onclick="gameInstance.SetFullscreen(1)"></div>

<div class="fullscreen" onclick="document.makeFullscreen('unityContainer')"></div>

Clone this wiki locally