Screen.SetResolution 设置分辨率

C# => public static void SetResolution(int width, int height, bool fullscreen);
C# => public static void SetResolution(int
width, int height, bool
fullscreen, int preferredRefreshRate = 0);

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.

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

On Android fullscreen controls the SYSTEM_UI_FLAG_LOW_PROFILE flag to
View.setSystemUiVisibility(), on devices running Honeycomb (OS 3.0 / API 11) or later.

在Android全屏是控制SYSTEM_UI_FLAG_LOW_PROFILE到View.setSystemUiVisibility(),在Android系统3.0或更高版本的设备。

On Windows Store Apps, switching to non-native resolution is only supported
starting from Windows 8.1 and newer.

在Windows Store Apps切换到非本地分辨率,仅支持Windows 8.1或更高版本。

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

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

	// Switch to 640 x 480 fullscreen 全屏模式

	Screen.SetResolution(640, 480, true);
	// Switch to 640 x 480 fullscreen at 60 hz 

	Screen.SetResolution (640, 480, true, 60);
	// Switch to 800 x 600 windowed 窗口模式

	Screen.SetResolution (800, 600, false);

Unity Screen Screen.SetResolution 设置分辨率的更多相关文章

  1. JS对象 屏幕分辨率的高和宽 window.screen 对象包含有关用户屏幕的信息。 1. screen.height 返回屏幕分辨率的高 2. screen.width 返回屏幕分辨率的宽

    屏幕分辨率的高和宽 window.screen 对象包含有关用户屏幕的信息. 1. screen.height 返回屏幕分辨率的高 2. screen.width 返回屏幕分辨率的宽 注意: 1.单位 ...

  2. linux 设置分辨率(转)

    linux 设置分辨率 如果你需要在linux上设置显示屏的分辨率,分两种情况:分辨率模式存在与分辨率模式不存在,具体如下. 1,分辨率模式已存在 1)如何查询是否存在: 图形界面:在System S ...

  3. unity,standalone下自定义分辨率不起作用的解法

    写一个Editor脚本AddMenu.cs:using UnityEditor; using UnityEngine; public class AddMenu : EditorWindow { [M ...

  4. AForge调用摄像头拍照时设置分辨率

    简单记录下AForge2.2.5.0版本调用摄像头拍照时设置分辨率的方法. FilterInfo info = _videoDevices[0];//获取第一个摄像头 _cameraDevice = ...

  5. ubuntu设置分辨率

    前言 装过ubuntu的虚拟机人应该都知道,刚刚装完系统时,分辨率小的令人发指,根本就不能愉快的使用,所以必须调整,但是有些分辨率ubuntu里面也没有,这就需要我们自己自定义. 自定义分辨率 1. ...

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

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

  7. Ubuntu 16.04 安装显卡驱动后循环登录和无法设置分辨率的一种解决方案

    1. 安装环境 电脑:MSI GP63 显卡:GeForce GTX 1070 系统:Ubuntu 16.04 驱动版本:NVIDIA 384.130 2. 循环登录 如果按照这篇文章 Ubuntu ...

  8. Unity抗锯齿的设置

    [Unity抗锯齿的设置] "Edit"->"Project Settings"->"Quality",可以质量设置Inspec ...

  9. ubuntu下如何查看和设置分辨率

    ubuntu下如何查看和设置分辨率 在ubuntu下可以使用xrandr来设置自己需要的分辨率.大致步骤如下:  www.2cto.com   1.使用xrandr命令查看屏幕分辨率,这里我使用的是显 ...

随机推荐

  1. 自定义select样式

    <!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8&quo ...

  2. [译]在Javascript中制造二维数列

    本文翻译youtube上的up主kudvenkat的javascript tutorial播放单 源地址在此: https://www.youtube.com/watch?v=PMsVM7rjupU& ...

  3. java 的exception throw try catch

    import java.util.*; public class MyException extends Exception { private static final Exception Exce ...

  4. DataGridView增加全选列

    最近的一个winform的项目中,碰到datagridview控件的第一列添加全选的功能,通常这个功能,有两种实现方式:1. 为控件添加DataGridViewCheckBoxColumn来实现,但是 ...

  5. JavaAppArguments示例

    本实验要求编写一个程序,此程序从命令行接收多个数字,求和之后输出结果.一大难点是命令行参数都是字符串,必须先将其转化为数字,才能相加. 中心想法就是将求和数字转换为整型并依次相加. 程序流程图: pu ...

  6. 写一个Android输入法02——候选窗、转换

    上一篇介绍了完成Android输入法的最小化步骤,它只能将按键对应的字符上屏.一般的东亚语言都有一个转换的过程,比如汉语输入拼音,需要由拼音转成汉字再上屏.本文将在前文基础上加入完成转换过程所必需的候 ...

  7. laravel安装[转https://laravelacademy.org/post/9528.html]

    Laravel 框架对PHP版本和扩展有一定要求,不过这些要求 Laravel Homestead 都已经满足了,不过如果你没有使用 Homestead 的话(那真是一件很遗憾的事情),有必要了解下这 ...

  8. mysql远程访问被禁止

    远程连接Mysql服务器的数据库,错误代码是1130,ERROR 1130: Host xxx.xxx.xxx.xxx  is not allowed to connect to this MySQL ...

  9. P2597 [ZJOI2012]灾难

    \(\color{#0066ff}{ 题目描述 }\) 阿米巴是小强的好朋友. 阿米巴和小强在草原上捉蚂蚱.小强突然想,如果蚂蚱被他们捉灭绝了,那么吃蚂蚱的小鸟就会饿死,而捕食小鸟的猛禽也会跟着灭绝, ...

  10. luogu1632 点的移动

    其实只需要开三重循环 根据OI中的一个重要的原理 给定一个序列a,求一个数x使得\(\sum |a_i-x|\)最小,那么这个数是序列a的中位数 证明略 然后既然是中位数,一定是数列中的数,类比到这题 ...