멀티 디스플레이를 사용하면 최대 8개의 서로 다른 모니터에 애플리케이션의 서로 다른 카메라 뷰를 최대 8개까지 표시할 수 있습니다, 이 기능은 PC 게임, 아케이드 게임 기계 또는 공개 디스플레이 설치 등의 환경에 사용할 수 있습니다.
Unity는 다음 플랫폼에서 멀티 디스플레이를 지원합니다.
일부 기능은 일부 플랫폼에서만 작동합니다.호환성에 대한 자세한 내용은 디스플레이, 화면, FullScreenMode API를 참조하십시오.
Unity의 기본 디스플레이 모드는 하나의 모니터입니다. 애플리케이션을 실행할 때 Display.Activate()
를 사용하여 추가 디스플레이를 명시적으로 활성화할 수 있습니다. 디스플레이를 활성화하면 다시 비활성화할 수 없습니다.
추가 디스플레이는 애플리케이션이 새 씬을 만들 때 활성화하는 것이 좋습니다. 가장 좋은 방법은 스크립트 컴포넌트를 기본 카메라에 연결하는 것입니다. 시작하는 동안 Display.Activate()
를 한 번만 호출해야 합니다. 작은 초기 씬을 만들어 스크립트를 테스트해보는 것도 도움이 됩니다.
using UnityEngine;
using System.Collections;
public class ActivateAllDisplays : MonoBehaviour
{
void Start ()
{
Debug.Log ("displays connected: " + Display.displays.Length);
// Display.displays[0] is the primary, default display and is always ON, so start at index 1.
// Check if additional displays are available and activate each.
for (int i = 1; i < Display.displays.Length; i++)
{
Display.displays[i].Activate();
}
}
void Update()
{
}
}
다른 카메라 뷰를 미리 보려면 다음 절차를 따르십시오.
게임 뷰 안에 있는지 확인합니다.
왼쪽 상단 모서리의 Display 메뉴에서 미리 볼 Display 를 선택합니다.
Unity는 다음의 UnityEngine.Display API 메서드를 지원합니다.
메서드 | 설명 |
---|---|
public void Activate() |
현재 모니터의 너비와 높이에 특정 디스플레이를 활성화합니다. 이 호출은 새 씬을 시작할 때 한 번만 이루어져야 합니다. 새 씬의 카메라 또는 더미 게임 오브젝트 에 연결된 사용자 스크립트에서 호출할 수 있습니다. |
public void Activate(int width, int height, int refreshRate) |
Windows 전용입니다. 커스텀 너비 및 높이의 특정 디스플레이를 활성화합니다. Linux와 macOS X에서는 보조 디스플레이가 항상 디스플레이의 현재 해상도를 사용합니다(이용 가능한 경우). |
기본적으로 사용자의 컴퓨터는 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.