Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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 Alturis2 · Dec 17, 2017 at 03:45 PM · uiunityeditordropdowndrawingordering

Dropdown List covering up mouse cursor

Have an interesting issue with my UI that I was looking to get some thoughts on if anyone has experienced this. In the game I am working on I keep a UI canvas active all the time in the "DoNotDestroyOnLoad" scene. Within there I handle the mouse cursor appearance manually with UI images synchronized to the actual mouse cursor position while the native cursor is set to be hidden.

What is happening is that when I click on a Unity.UI.Dropdown it creates the DropDown List child with all the parts of the dropdown interaction. This is drawing on top of my manual mouse cursor.

What is interesting, however, is that when running in the editor and I click away from the game screen at all and then bring the mouse back over the game view my manual mouse cursor image is once again on top of everything correctly.

Its almost as if the Dropdown component is doing something to force its new elements to be drawn on top of everything else when its created. Not sure I can explain why setting focus away from the game view then back again undoes this though.

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 Alturis2 · Dec 17, 2017 at 03:56 PM 0
Share

Also, I already have my cursor canvas sort order set to 999 while the other canvas that the Dropdown List is being created in is sort order 0

1 Reply

· Add your reply
  • Sort: 
avatar image
3
Best Answer

Answer by Alturis2 · Dec 17, 2017 at 04:08 PM

Figured this out but I think the DropDown system is a bit lame.

Turns out that the Dropdown system adds a Blocker canvas with sort order 29,999 (somewhat arbitrary it seems). This is so that the dropdown will show up on top of everything else.

That does leave just a little bit of room for something else to draw on top of it if you use any number 30,000 - 32,767.

32,767 is the sorting order I now use for the cursor and it works as expected.

Comment
Add comment · Show 1 · 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 jgarbeidi · Jul 27, 2021 at 02:40 AM 0
Share

Thank you ever so much! I've been struggling to create a virtual mouse cursor, and when I finally got it working the dropdowns were making a mess of things! Now it works flawlessly : D

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

122 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 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 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 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 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 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

dropdown list in editor of functions from linked script 0 Answers

Order Issues - How to order UI correctly - Canvas, Sprite, Panel with Background (Image) 0 Answers

Dropdown disable blocker 1 Answer

Show dropdown on object instantiation 0 Answers

when we double click any button this is error occurring, where is the error 2 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