I can't get full screen playing in the webplayer to run at the native resolution of my screen, despite setting webplayer build to exactly the screen resolution. But more annoying, regardless what I set the webplayer resolution, I get aspect ratio stretching when going to full screen, AND it's playing full screen at a clearly lower resolution (blocky pixels) than the in browser setup.
How do I force fullscreen webplayer to a specific resolution?
Which brings up another odd point, after a little time the webplayer frame rate degrades horribly, to well below 30 frames per second, at which point nothing brings it back up. I can refresh the page/reload the game, but the frame rate remains low. However if I rebuild, without changing anything other than the filename, it goes back up until the degradation occurs again.
I've watched memory and cpu usage during this degradation and gameplay, it doesn't change throughout.
Fullscreen play is not hampered by this framerate degradation.
What browsers/OSs have you tested this on? And on what browsers/OSs are you seeing this behavior?
Setting the web player window resolution to your screen resolution can't work, because you always have window borders and stuff around the window. The web player will never go higher than the native resolution when switched to full-screen, so set the screen resolution (not the web player window resolution) to something like 9000 x 9000.
It worked for me as you reference my question, Eric5h5 is right set it to a higher res than what you actually want. Regards your issue with perf degradation, I had the same one test machine using vista, the first time I launched the app ( not web tho, exe), I was having sky high framerate, unbelievably fast, then I relaunched and was back to normal... very odd never could get it back to be that fast therafter.
@dissidently: There are several tabs in the player settings for web, stand-alone, etc. When you click on the web tab it says "Settings for Web Player", and when you click on the stand-alone tab it's also labeled appropriately. It's perhaps a little confusing that the stand-alone screen settings would apply to the web player in full-screen mode, but you can basically consider the web player full-screen mode to be "stand-alone"-ish.
When switching to fullscreen, I'm getting better and more predictable results with:
Screen.SetResolution (9000, 9000, true);
vs.
Screen.fullScreen = true;
...than by depending on the project settings of the standalone & webplayer. Particularly when running in the webplayer, the first approach takes care of the resolution problem.
Where do I add that code. What do I attatch that script to?
In Unity 4.5 you need to adjust the player settings for ‘PC, Mac & Linux’ - uncheck all the boxes for ‘Supported Aspect Ratios’, then you’ll get fullscreen web playback.
Beacause I do not know ahead of time the full screen resolution for the webplayer, I set the standalone res to 9000x9000
When I go full screen the aspect ratio seems correct but the res is not 1900x1600
Use Direct3D 9 instead of 11 => boom, it works! (at least for me) And I have no glitches with D3D9, whereas with D3D11 my windows are a bit messed up once I leave fullscreen mode in my web player game.
It’s true though that the desktop resolution settings corresponds (roughly) to the web player fullscreen resolution setting, but only with D3D9.
What browsers/OSs have you tested this on? And on what browsers/OSs are you seeing this behavior?
– j_y_k