unity3d web发布后全屏显示

1:

var screenHeight = parseInt(screen.height);

var screenWidth = parseInt(screen.width);

var config = 

{

width :   screenWidth,  

height: screenHeight,

params: { enableDebugging:"0" }

};

2:

var screenWidth = parseInt($(document).width());

var screenHeight = parseInt(screenWidth*0.88);

var config = 

{

 width: screenWidth,

 height: screenHeight,

 params: { enableDebugging:"0" }

 };

第1种将网页分辨率设置成当前屏幕的分辨率,而第2种是将网页的分辨率设置成当前浏览器窗口的分辨率。

你可能感兴趣的:(Web,unity,全屏显示)