Search Unity

Auto Fullscreen

Discussion in 'Formats & External Tools' started by SymphonicYT, Jan 27, 2019.

  1. SymphonicYT

    SymphonicYT

    Joined:
    Jan 20, 2019
    Posts:
    12
    So basically just started using unity (it's fun but difficult, i like it tho) and i want my game, (tutorial roll a ball game) which is hosted on my website to auto fullscreen. Not really good with HTML, but i did figure out that this:
    Code (HTML):
    1. gameInstance.SetFullscreen(1)
    when the fullscreen button is clicked, runs. I have tried various ways of getting this snippet of code to run on page load, but ELI5 what i need to adjust in my index.html to make this auto fullscreen on page load.

    Edit: the game is in WebGL
     
  2. SymphonicYT

    SymphonicYT

    Joined:
    Jan 20, 2019
    Posts:
    12