• 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 allenwp · Jul 28, 2015 at 07:21 PM · monitor

How to change mointor/desktop resolution in 4.5.3 and higher

As of unity 4.5.3, Screen.SetResolution and the Unity Resolution Display Dialog, by default, no longer change the monitor/desktop resolution. Instead, it only changes the render target resolution for the game. This means that if you run a 1024x768 resolution on a widescreen monitor, your cursor can travel into the letterboxed area, outside of the window bounds, even when running in full screen mode. This is not the desired behaviour for our game.

This was described in the Unity 4.5.3 release notes:

"Windows Player: The default full-screen mode no longer changes the desktop resolution, so things like IME text input work."

I would like to actually change the desktop resolution. The change log suggests there is some non-default full-screen mode that will actually change the desktop resolution... How do I do this?

EDIT: I just updated to Unity 4.6.7f1 and have noticed that the default behaviour has changed: Now there is no more letterboxing in full screen, so now the cursor does stay in the window bounds at least. But now the aspect ratio is no longer respected: a 1024x768 "resolution" will be stretched, by Unity, to fill the entire existing resolution, regardless of aspect ratio differences.

Comment
Add comment · Show 3
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 DerpMerf · Jul 28, 2015 at 07:52 PM 0
Share

You'd like to change the desktop resolution through Unity? Why? What is the purpose of that? Any OS that does not support changing resolutions is not an OS that you should be using, and is not an OS that Unity supports (excluding consoles, which are a separate matter). You can also confine your cursor to the screen, as stated here: http://answers.unity3d.com/questions/62440/how-to-stop-mouse-going-out-of-the-screen-.html in the second answer. Not only that, I would never want to play a game that changes my monitor resolution when I change the resolution of the game. I just wouldn't be able to play it. You're creating a workaround for something that would be easier to do than the workaround. Have you heard how many games confine the cursor to the screen? Practically all of the them. If I had to switch back to my normal resolution immediately after playing a game, I wouldn't play it. In addition, that wouldn't actually work. The resolution system works on a scale basis, not on an exclusion basis. This means that if you change the resolution, the window just gets smaller. Please just confine the cursor to the screen. It's really the only good way to do what you're trying to do, and it works well enough. Not only that, it's sort of pointless to even try to lock it in windowed mode. $$anonymous$$oving the cursor out of the game doesn't break anyone's immersion, as it's not something they would do without will. Anyone really lacking in that immersive experience can switch to fullscreen mode. In windowed mode, even with a locked cursor, someone can Alt + Tab, which switches them to a different application. This is not something you can limit, as it is an inherent feature of Windows. If it is absolutely necessary, simply lock your cursor via the code posted above. Thank you and have a nice day.

avatar image _dns_ · Jul 28, 2015 at 08:49 PM 0
Share

Hi, I don't have 4.5.3 installed but I think they introduced new settings while doing this modification. Is there some options in the player settings for mac, d3d9 and dx11 fullscreenmode (fullscreen window or exclusive mode). Exclusive mode would be the "old" fullscreen mode.

avatar image allenwp · Jul 28, 2015 at 09:30 PM 0
Share

Hmmm... I've tried forcing Exclusive $$anonymous$$ode, but this doesn't make any difference. (well, it does cause the screen to flicker black, but the monitor/desktop resolution does not change)

0 Replies

· Add your reply
  • Sort: 

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

22 People are following this question.

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

Related Questions

Extend game to 2 monitors 1 Answer

Strange behaviors with extended desktop and multiple displays 1 Answer

Scaling GUI correctly according to game window resolution? 1 Answer

How to figure out display # chosen in Display Resolution Dialog? 0 Answers

Get available refresh rates 1 Answer


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