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
2
Question by Ikeruga · Oct 05, 2016 at 04:11 PM · resolutionmouse input

Weird Resolution Problems; Virtual and Desktop resolutions don't match, offset Mouse Cursor

Hello,

Running a Unity 5.2.2p2 game, I get the following output in the output_log file:

 <RI> Initializing input.
 <RI> Input initialized.
 desktop: 3840x2160 60Hz; virtual: 1920x1080 at 0,0
 <RI> Initialized touch support.

This is causing issues while playing because the mouse cursor coordinates act strangely. The custom mouse cursor and input recognition only occurs in the top left quadrant of the screen. Everywhere else, the default Windows cursor shows up and no UI or game interaction can take place.

The computer's screen is natively 1920x1080 and Windows is configured to run at this resolution. Nvidia's 4k Downsampling is disabled in the control panel, so I'm unsure how Unity is detecting this resolution. Older Unity games don't have this problem, I haven't tried newer.

Any clue as to how to fix this?

Thanks!

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 pslattery · Jun 06, 2017 at 09:45 PM 0
Share

I'm having a similar, related issue. We want our game to run at the desktop resolution, but its getting scaled down to fit within the virtual resolution.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by pslattery · Jun 09, 2017 at 08:59 PM

I know this is a bit of an older question but I have been running into an issue surrounding this problem for days now and I finally found a solution.

So for anyone reading this in the future: If you look in a Unity Log file, you will see the line @Ikeruga put above:

 desktop: 3840x2160 60Hz; virtual: 1920x1080 at 0,0

'desktop' refers the to the actual output resolution Windows is sending the display 'virtual' refers to the total desktop area, which is defined by the smallest square which circumscribes all desktops. When defining this size, Windows takes into account the Scaling of each window.

And that is the part that was tripping us up: Windows scaling displays the reverse of the operation it describes. So instead of scaling UP the text, icons etc by 200%, it appears that it is actually scaling down the window by 50%.

So if you have a 3840x2160 resolution desktop but it is scaled to 200%, your virtual desktop will come out to 1920x1080.

What this means in Unity, is that if you have any scaling on any scaling >100% on any of your monitors, and you try and set one or more of your displays to show at what you think is the native resolution, Unity will silently just scale down the display. I think this is the part that any Unity Engineers reading this should take into account. I don't care that this is expected behaviour, I just wish it weren't silent.

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

How can I scale webgl canvas without losing input position? 0 Answers

How to calculate unity screen resolution in maya? 1 Answer

Should texture assets be created for 300dpi? 0 Answers

Why is lightmap resolution different across certain objects? 0 Answers

Learning with low system specs? 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