Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by Mark-Dawson · Jun 09, 2017 at 05:08 PM · unity 5uigraphicsscreen

Unity 5.6.1 Multi display - Second monitor shows as black

Hello all, I've got an issue which might be from me overlooking something simple and my searches bring up older versions of Unity, so any help would be really appreciated.

Trying to run a multi-display setup, two cameras targeted to two displays. Followed the manual, ran the .exe with the "-multidisplay" CMD argument and I still encounter the second screen being set to black rather than the camera's buffer.

Am I missing something here? Did this is a blank project with the code below and attached a project.

 public class CamScript : MonoBehaviour {
     public int tgtDisp = 0;
     void Start () {
 
         if (Display.displays.Length > 1)
         {
             Display.displays[1].Activate();
         }
 
         GetComponent<Camera>().targetDisplay = tgtDisp;
     }
 }


twocamera.zip (33.7 kB)
Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Mark-Dawson · Jun 05, 2017 at 10:12 AM 0
Share

A thought perhaps while I'm at work. Perhaps this was due to the main display being display 2?

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Propagant · Jun 09, 2017 at 05:11 PM

Check the Main Cameras Target Display to Display 1.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Mark-Dawson · Jun 09, 2017 at 06:40 PM 0
Share

In the example scene provided I've set the two cameras up to display 1 & 2 and inside Unity they appear fine. When I do a build and try to run it as as I said above it causes one black screen and one rendered screen.

avatar image schey · Aug 30, 2017 at 12:43 PM 0
Share

Hi, I am having a similar problem. I create a Camera from script and assign my second monitor as target display.

 mycam.targetDisplay = 1;                
 Display.displays[1].Activate();
 mycam.enabled = true;

When I run the build, the Appication will be renderd on my second screen, but there is an additional black window on my first monitor. I am starting the build from cmd, using comandline:

 start myUnityBuild.exe  -multidsiplay

Has anyone found a solution / workaround to fix this?

$$anonymous$$ind regards

[Unity version: 2017.1.0p4, 64bit]

avatar image
0

Answer by mich_mckellar · Jun 10, 2019 at 04:43 PM

Super old - but this is because the default screen in Unity is 0, not 1.

You need to set main camera to target screen 0, and the second camera to target screen 1. (0 index array basically!)

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Getting following error in outlog when I`d ran my game in Unity? 1 Answer

How do I dynamically update a rect scroll from a List? 0 Answers

Raycast against UI in world space 4 Answers

IndexOurOfRange: Array index out of range. 0 Answers

Why do i get these messages from Unity3D UI? 6 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges