멀티 디스플레이로 최대 8개의 서로 다른 모니터에 대해 애플리케이션의 8가지 카메라 뷰를 표시할 수 있습니다. PC 게임, 아케이드 게임 기기와 공용 디스플레이의 단순 설치에 활용할 수 있습니다.
멀티 디스플레이는 스탠드얼론 모드에서만 실행되며 Windows, Mac OS X 및 Linux에서 지원됩니다.
여러 모니터에서 디스플레이를 보려면:
인스펙터(Inspector)를 사용하여 각 카메라(Camera)를 특정 모니터에 표시하도록 설정합니다. 타겟 디스플레이(Target Display) 옵션에서 1–8개의 디스플레이 모니터를 지정할 수 있습니다.
그런 다음 뷰의 왼쪽 상단에 있는 디스플레이(Display) 드롭다운 메뉴를 사용하여 게임 뷰에서 각 디스플레이를 미리 볼 수 있습니다(그림 2 참조).
디폴트 디스플레이는 모니터가 하나이므로 애플리케이션을 실행할 때 Display.Activate 스크립트를 통해 추가 디스플레이를 명시적으로 활성화해야 합니다. 활성화된 이후에는 비활성화할 수 없습니다.
새 씬을 만들 때가 추가 디스플레이를 활성화하기에 가장 적합한 시간입니다. 가장 좋은 방법은 디폴트 카메라에 스크립트 컴포넌트를 연결합니다. 시작하는 동안 한 번만 __Display.Activate__를 호출해야 합니다. 이렇게 하면 작은 초기 씬을 만들어 테스트하는 데 유용합니다.
스크립트 예제
using UnityEngine;
using System.Collections;
public class DisplayScript : MonoBehaviour
{
// Use this for initialization
void Start()
{
Debug.Log("displays connected: " + Display.displays.Length);
// Display.displays[0] is the primary, default display and is always ON.
// Check if additional displays are available and activate each.
if (Display.displays.Length > 1)
Display.displays[1].Activate();
if (Display.displays.Length > 2)
Display.displays[2].Activate();
...
}
// Update is called once per frame
void Update()
{
}
}
다음과 같은 UnityEngine.Display API 함수가 지원됩니다.
public void Activate()
현재 모니터의 너비와 높이에 특정 디스플레이를 활성화합니다. 호출은 새 씬을 시작할 때 한 번만 실행해야 합니다. 새 씬의 카메라 또는 더미 __게임 오브젝트__에 연결된 사용자 스크립트에서 호출할 수 있습니다.
public void Activate(int width, int height, int refreshRate)
Windows만 해당: 커스텀 모니터 너비와 높이에 특정 디스플레이를 활성화합니다.
기본적으로 사용자의 컴퓨터는 X, Y 가상 데스크톱에 기반하여 디스플레이 모니터의 상대적 포지션을 정렬합니다. 이를 오버라이드해서 애플리케이션이 정렬 없이 디스플레이하게 만들려면 애플리케이션을 커맨드 라인에서 시작하고 커맨드 라인 플래그를 활용합니다.
-multidisplay
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.