Hello everyone, I came across a problem about fullscreen in web player.
when I set “Screen.fullScreen = true”, webplayer print two logs as follow:
"web: set web resolution 1024 x 768, fs=1
web: set web resolution 1920 x 1080, fs=1"
but our scene is 1226 x 768, what the strange thing is ,
I have two public variables named:
public int screenHeight,
public int screenWidth
after logs print, my variables are changed to
screenHeight:768
screenWidth:1024
when we set to the fullscreen ,the engine changes varibles value in our own script,
How does it happen?
I have found a reason. Screen.SetResolution:
“A width by height resolution will be used. If no matching resolution is supported, the closest one will be used.”
My Web Player’s resolution is 1226x768, perhaps close to 1024
I got it. engin would print a log, when we call Screen.SetResolution, and param height and width is resolution value. Screen.fullScreen maybe call function Screen.SetResolution