unity UniWebView适配屏幕宽度

需要外接浏览器显示公告等,出现了网页过宽,无法显示全部横向内容,解决方案如下

//设置Web视图是否以概览模式加载页面,即缩小内容以适应屏幕宽度。
uniWebView.SetUseWideViewPort(true);
//默认是false,仅仅是安卓端的
uniWebView.SetLoadWithOverviewMode(true);
//设置当Web内容超出Web视图边界时是否应显示水平滚动条。
uniWebView.SetHorizontalScrollBarEnabled(false);

猜你喜欢

转载自blog.csdn.net/u014481027/article/details/131600008