Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 MolluskJesse · Mar 10, 2015 at 11:06 PM · 4.6cursor-customization

Strange behavior on Cursor

We are overriding the default windows cursor in our game, but have been noticing this behavior for a while.

The cursor change works 100% of the time when playing windowed mode.

The cursor change works 100% if you are playing in full screen at a monitors native resolution.

We are, however, encountering an issue when the user to change the resolution down from the native size. We maintain the native aspect ratio, but at smaller full-screen resolutions the cursor reverts to the native Windows cursor on the bottom and right hand sides of the screen. We were scratching our heads about this issue for a long while before I notice that this "boarder" where the mouse reverts seems to match the aspect ratio.

While I can not confirm this entirely, it appears that the cursor is reverting when it passes outside lower fullscreen resolution on the screen.

So, for example, please consider the following image. alt text

The red area represents a native resolution of a 1920x1080 monitor. The game itself is running at 1600x900, a step below the full native resolution. Now, the blue area represents where the game's cursor renders correctly. However, when the mouse enters the red boarder, it reverts to the Window's default cursor.

Fun additional fact, the blue area in this example is 1600x900 of the monitors native 1920x1080.

So, yeah, has anyone else experienced this issue? If so, do you know a work around or a way to fix it? We are currently running in Unity 4.6.0.

export.png (87.3 kB)
Comment
Add comment · Show 6
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 MolluskJesse · Mar 10, 2015 at 10:56 PM 0
Share

I also have an open bug for this issue. Number 676731.

avatar image Sir Keyzinburga · May 07, 2015 at 08:14 AM 0
Share

We are having the same issue and have no work around for it. Did you get any more info on the issue?

avatar image MolluskJesse · May 07, 2015 at 06:13 PM 0
Share

No, I've found no new information.

avatar image Tryggvienator · Jun 24, 2015 at 12:09 PM 0
Share

I'm also experiencing this issue. One ugly solution is to use cursor mode: force software. I find it slow and unresponsive, also it still displays the windows default cursor. I'm on unity 4.5

avatar image BookMoDee · Jun 29, 2015 at 02:17 PM 0
Share

Sorry to bother you, but we're have the same issue. I was wondering if you've found a solution or heard back from Unity.

Show more comments

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by pavlito · Sep 07, 2015 at 10:58 AM

Try forcing directX 9 in your project. You can set it up via editor or create a shortcut to your .exe with the " force-d3d9 " without quotes.

Note, this can hang your game when you alt+tab to desktop, but should fix the aspect ratio issue. We have a similar problem where the buttons "collider" is offset when playing full-screen non-native resolution and we have to click a little bit to the left of the actual image representation of the button.

Adding "-force-d3d9" to the shortcut fixed the issue.

Hope it helps. Good luck!

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
avatar image
0

Answer by AShenawy · Jul 28, 2020 at 08:07 AM

I know it's an old question, but I had the same issue recently while making a WebGL build. Because it's in browser, I don't believe the method @pavlito mentioned works for me.

After fiddling around, I finally found one solution. It had to do with the UI Canvas game object and its Canvas Scaler component. This is how it was originally set when I had the issue described by OP. It doesn't matter whether matching is by Width or Height.

Unity Canvas Scaler component. Screen Match Mode set to Match Width or Height


Here's what I changed it to, to keep the custom cursor image at the right and bottom edges of the screen.

Unity Canvas Scaler component. Screen Match Mode set to Expand
So, changing the Screen Match Mode property to Expand, instead of Match Width or Height, fixed the issue. But I don't know/understand why this is the cause in the first place.


canvas-b.jpg (14.7 kB)
canvas-a.jpg (18.6 kB)
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

Cursor.SetCursor() not working inside Start() 3 Answers

Default Cursor hourglass during app load 2 Answers

How can I make the text prettier in the new GUI system? 1 Answer

How to have no alignment 4.6 GUI 0 Answers

On Click paramaters disappear from button prefab? 5 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