Screen.SetResolution 设置分辨率

static function SetResolution (width : int, height : int, fullscreen : bool, preferredRefreshRate : int = 0) : void

Description描述

Switches the screen resolution.

切换屏幕分辨率。

A width by height resolution will be used. If no matching resolution is supported, the closest one will be used.

一个有宽高的分辨率被使用,如果没有匹配的分辨率被支持,将使用最接近的分辨率。

If preferredRefreshRate is 0 (default) Unity will switch to the highest refresh rate supported by the monitor. If preferredRefreshRate is not 0 Unity will use it if the monitor supports it, otherwise will choose the highest supported one.

如果preferredRefreshRate为0(默认),Unity将切换到显示器支持的最高刷新率。如果preferredRefreshRate不是0,如果显示器支持,Unity将使用它,否则将选择支持的最高的一个。

In the web player you may only switch resolutions after the user has clicked on the content. The recommended way of doing it is to switch resolutions only when the user clicks on a designated button.

在网络播放器,你只可以在用户点击内容之后切换分辨率。推荐的方法是只在用户点击一个指定的按钮时切换分辨率。

A resolution switch does not happen immediately; it will actually happen when the current frame is finished.

全屏开关不会立即发生,它实际发生是在当前帧完成时。

  • C#
  • JavaScript
// Switch to 640 x 480 fullscreen
//切换到640 x 480全屏Screen.SetResolution (640, 480, true);

另一个例子:

  • C#
  • JavaScript
// Switch to 640 x 480 fullscreen at 60 hz
//切换到640 x 480全屏,刷新率为60赫兹Screen.SetResolution (640, 480, true, 60);

另一个例子:

  • C#
  • JavaScript
// Switch to 800 x 600 windowed
//切换到800 x 600窗口模式Screen.SetResolution (800, 600, false);

unity设置分辨率相关推荐

  1. Unity 设置分辨率(3600*1920)

    Unity Screen Screen.SetResolution 设置分辨率 Screen.SetResolution 设置分辨率 C# => public static void SetRe ...

  2. unity设置分辨率android,Unity Screen Screen.SetResolution 设置分辨率

    Switches the screen resolution. 切换屏幕分辨率. A width by height resolution will be used. If no matching r ...

  3. unity 启动选择分辨率_Unity发布exe去窗口设置分辨率

    前段时间做游戏pc端,要求exe运行去窗口,还要固定分辨率 unity有设置分辨率的API:Screen.SetResolution 但是使用这个会跟win32 api冲突 为了去窗口只有全部使用wi ...

  4. Unity游戏动态设置分辨率—— Dropdown 控件

    在Canvas下新建一个Dropdown . 然后创建脚本 SetScreenResolving using UnityEngine; using UnityEngine.UI; using Syst ...

  5. Screen.SetResolution 设置分辨率

    Screen.SetResolution 设置分辨率 JavaScript ⇒ public static function SetResolution(width: int, height: int ...

  6. 树莓派 自动设置分辨率

    通过shell脚本来设置屏幕的分辨率. 可以通过git工具下载脚本,并使用它来更改屏幕分辨率,步骤如下: 注意:请用"pi"用户登录,并根据此wiki绝对输入这些​​命令. 然后按 ...

  7. VMware ubuntu虚拟机怎么设置分辨率?(全屏显示、大屏显示)

    参考文章:ubuntu设置分辨率的两种方式

  8. 应用层为何不能设置分辨率

    以下内容源于朱有鹏<物联网大讲堂>课程的学习,如有侵权,请告知删除. 一.问题描述 试图在应用层设置分辨率失败了,原因何在? (1)定位问题:肯定是驱动的事儿 (2)进一步驱动中定位:应用 ...

  9. virtualbox安装android6.0并设置分辨率为1920x1080x32

    下载安装:https://www.cnblogs.com/wynn0123/p/6288344.html 这里我做的是下载android6.0-64bit,然后文件系统只支持ext4 安装完成之后我的 ...

最新文章

  1. SAP RETAIL 特征参数文件(Characteristic Profile) II
  2. 【MyBatis框架】MyBatis入门程序第一部分
  3. Win7环境下VS2010配置Cocos2d-x-2.1.4最新版本的开发环境(亲测)
  4. 【Jenkins】通过ANT构建JMeter任务时提示找不到jtl文件时的解决方法
  5. java bitset_Java BitSet or()方法与示例
  6. 【BAPC 2017】Hoarse Horses【欧拉平面图公式】
  7. JPA使用nativeQuery多参数查询注意点
  8. Mac下查看公网以及内网IP地址
  9. fatal: unsafe repository (‘/home/anji/gopath/src/gateway‘ is owned by someone else)
  10. iPhone8 和 iPhoneX 买哪个?听我的
  11. Unity Easy Save数据保存插件将数据保存到Android手机根目录
  12. Linux操作系统下复现github上的项目(一):下载项目、配置环境
  13. c++/c memcpy函数用法(拷贝数组的内容)
  14. 纪念一下毛星云这位年轻的先生
  15. zblogphp 广告联盟_天兴工作室:广告位大全插件(网站各种广告位集合效果)
  16. 以数据驱动的支付场景数字营销,能否成为下一个...
  17. 常用putty命令汇总
  18. 工业智能网关BL110应用之九十三: 实现西门子S7-1500 PLC接入OPC UA云平台
  19. 哈佛校长演讲:学会尊重不同意见,世界不会因为你是哈佛毕业生而善待你
  20. rnss和rdss的应用_北斗RNSS/RDSS多模手持终端设计与实现

热门文章

  1. 10部电影教你6大沟通术-泡妞MM
  2. html5 在线直播代码,用HTML5代码实现烘托直播间疯狂点赞动画氛围(附全部源码)...
  3. 良心安利饮品 饮料 酒水免抠摄影素材网站
  4. linux使用vim复制文件内容,Linux(Ubuntu)使用日记------vim复制内容到其他应用
  5. 关于access_log 日志文件以及ip、uv和pv的定义
  6. linux ubuntu 关闭防火墙命令,Linux下开启/关闭防火墙命令
  7. 顺序、链式结构的个人书籍管理系统(C++)
  8. invalid authentication data.Connection refused :connect
  9. python基础笔记(二)
  10. EasyRecovery软件最新版安装包V15版本数据恢复软件