失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > unity api中文手册_unity 中文API之Display

unity api中文手册_unity 中文API之Display

时间:2021-05-20 01:48:56

相关推荐

unity api中文手册_unity 中文API之Display

Display 显示

Display

class in UnityEngine

Description 描述

Provides access to a display / screen for rendering operations.

提供显示器或者屏幕渲染操作的接口。

This feature is available for iPhone.

此功能可用于iPhone。

JavaScript:

void Start(){ // GUI is rendered with last camera. // As we want it to end up in the main screen, make sure main camera is the last one drawn. extCam.depth = camera.depth - 1; camera.SetTargetBuffers(Display.main.colorBuffer, Display.main.depthBuffer); extCam.enabled = false;} void Update(){ if(Display.displays.Length > 1 && !extCam.enabled) { Display.displays[1].SetRenderingResolution(256,256); extCam.SetTargetBuffers(Display.displays[1].colorBuffer, Display.displays[1].depthBuffer); } extCam.enabled = Display.displays.Length > 1;}

C#:

void Start(){ // GUI is rendered with last camera. // As we want it to end up in the main screen, make sure main camera is the last one drawn. extCam.depth = camera.depth - 1; camera.SetTargetBuffers(Display.main.colorBuffer, Display.main.depthBuffer); extCam.enabled = false;} void Update(){ if(Display.displays.Length > 1 && !extCam.enabled) { Display.displays[1].SetRenderingResolution(256,256); extCam.SetTargetBuffers(Display.displays[1].colorBuffer, Display.displays[1].depthBuffer); } extCam.enabled = Display.displays.Length > 1;}

Static Variables 静态变量

displays The list of currently connected Displays. Contains at least one (main) display.

当前连接的显示器的列表。至少包含一个主显示器。 main Main Display.

主显示器。

Variables 变量

colorBuffer Color RenderBuffer.

颜色缓冲。 depthBuffer Depth RenderBuffer.

深度缓冲。 renderingHeight Rendering Height.

渲染高度。 renderingWidth Rendering Width.

渲染宽度。 systemHeight System Height.

系统高度。 systemWidth System Width.

系统宽度。

Public Functions 公共函数

Activate Activate an external display. Eg. Secondary Monitors connected to the System.

激活外部显示。如:二级监控系统连接到该系统。 SetParams This Windows only function can be used to set Size and Position of the Screen when Multi-Display is enabled.

当Multi-Display启用时,该函数仅windows可用设置屏幕大小和位置。 SetRenderingResolution Sets Rendering resolution for the display.

设置显示器的渲染像素。

Static Functions 静态函数

RelativeMouseAt Query relative mouse coordinates.

查询相对的鼠标位置坐标。

如果觉得《unity api中文手册_unity 中文API之Display》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。