I noticed that when I change the canvas size in the index.html, the value gets changed to the ‘Player Settings’ default after the game finishes loading. I assume one of the js files overwrites the canvas size in index.html. Can I manually set the canvas size post load and if so, how?
Screen.SetResolution should work for this.
Hi,
i’am trying to set the canvas to fullscreen to make a website with WebGL.
Screen.SetResolution dont work. It sets the canvas size always to the default player settings(960,600).
I can’t overwrite the canvas size with javascript.
Is there a way like it was with the old WebPlayer as below?
var w = window.innerWidth;
var h = window.innerHeight;
var config = {
width: w,
height: h,
params: { enableDebugging:“0” }
};
var u = new UnityObject2(config);