レンダリング処理の際、ディスプレイ / 画面へのアクセスを提供します。
マルチディスプレイレンダリングはPC (Windows/Mac/Linux)、iOS、Androidで利用できます。
ディスプレイそれ自体で操作するためには、Display クラスを使い、個々のディスプレイにレンダリングするためにカメラを設定するには、Camera.targetDisplay を使用します。
See Also: Camera.targetDisplay, Canvas.targetDisplay.
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;
}
| active | Gets the state of the display and returns true if the display is active and false if otherwise. |
| colorBuffer | カラー RenderBuffer |
| depthBuffer | デプス RenderBuffer. |
| renderingHeight | ディスプレイがレンダリングする垂直方向 (縦方向) の解像度 |
| renderingWidth | ディスプレイがレンダリングする平行方向 (横方向) の解像度 |
| systemHeight | 垂直方向 (縦方向) のネイティブのディスプレイ解像度 |
| systemWidth | 平行方向 (横方向) のネイティブのディスプレイ解像度 |
| Activate | 拡張ディスプレイを有効にします。例えば、システムにセカンドディスプレイが接続されているような場合です。 |
| SetParams | 画面上のレンダリングのサイズと位置を設定します (Windows 専用)。 |
| SetRenderingResolution | ディスプレイのレンダリング解像度を設定します |
| RelativeMouseAt | 相対的マウス座標を探します。 |