Unity UniWebView adapts to the screen width

An external browser is required to display announcements, etc., and the webpage is too wide to display all horizontal content. The solution is as follows

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

Guess you like

Origin blog.csdn.net/u014481027/article/details/131600008