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 /
avatar image
0
Question by XenonSpher · Jun 29, 2016 at 07:19 AM · resolutionscreendisplaycallmultiple-monitors

unity Display.displays[].setParams Problem

I need to change the resolution of my 2nd Display screen. but with this script. it creates some kind of weird after shadow (just like windows xp file broswer lag...LOL check out the picture) alt text

and this is my demo. I've already change the width and height to 1000 and 500 respectively

alt text

this is my script

 using UnityEngine;
 using System.Collections;
 using UnityEngine.UI;
 
 public class DisplayScript : MonoBehaviour {
 
     // Use this for initialization
 
    public int width;
     public int height;
     public InputField widthInput;
     public InputField heightInput;
 
 
    public void changeResolution()
     {
         width = int.Parse(widthInput.text);
         height = int.Parse(heightInput.text);
         // Screen.SetResolution(width, height, false);
          Display.displays[1].SetParams(width, height,1,1);
     }
     
 
     
     void Start () 
     {
         for (int i = 0; i < Display.displays.Length; i++) 
            {
                Display.displays [i].Activate();
            }
 
     }
 }
 


notice the //Screen.SetResolution(width, height, false); its a great method as well, I actually prefer it but the problem is this will only change the resolution to my main interface(display 1) not the graphics part(display 2) I don't know how to call display 2 so I could use that that setScreenResolution only for Display 2

555.jpg (181.8 kB)
this.jpg (410.9 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 bvoloh · May 22, 2017 at 03:36 PM 0
Share

Bump. @XenonSpher Did you end up figuring out how to switch to the second monitor so you could use Screen.SetResolution? I'm developing an app for $$anonymous$$ac, so SetParams doesn't seem to be an option for me :

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by niwith · Feb 09, 2018 at 07:47 AM

Do you have a skybox or background that is visible tot he camera you are using to render you second display? Without it the camera won’t be have anything to draw over the top of the old frame so it ends up with the sort of visual artifacting you are describing.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Windows: Multi Display with two different resolutions 2 Answers

Pick sensible resolution for FullScreen Mac App 2 Answers

WebGL build has degraded resolution on zoomed-in browsers or systems 0 Answers

Get correct resolution 0 Answers

Maximize window mode and alt tab 0 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