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
0
Question by LT23Live · May 01, 2015 at 12:57 AM · uiguibutton

UI Button is not Detecting Mouse Click

The title tells the tale. My UI Buttons are not detecting mouse click at all. Using unity 5. Yes the UI Button has a canvas as a parent. and yes it has a canvas renderer! Im stull new to this unity visual gui stuff. Please help!

Comment
Add comment · Show 2
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 BMRX · May 01, 2015 at 02:35 AM 0
Share

I don't really understand why a canvas is needed.

However, what is the script that you have associated with your UI?

avatar image Kiwasi · May 01, 2015 at 03:06 AM 1
Share

@bmrx a canvas is one of the components associated with the UI. If put together properly the UI doesn't need scripts, it just works.

1 Reply

· Add your reply
  • Sort: 
avatar image
5

Answer by DoTA_KAMIKADzE · May 01, 2015 at 01:08 AM

Do you have EventSystem in your Hierarchy view? If no then you should add it, if yes then provide us screenshots with settings of EventSystem, UI Canvas and Button itself.

P.S. Okay now that finally you have provided screens - change your Canvas GraphicRaycaster BlockingMask from Nothing to either Everything or UI(or whichever layer your button is).

P.P.S. Ok, I've quoted my last comment over here (if you believe that to be the final answer):

Your button seems fine to me. Does it have any visual effects? As for the click you've said it to enable queueRead - note that your button won't disable it afterwards (just in case you didn't know).

If it doesn't get clicked at all then there should be something in its parents, as I see you have HUD => HUD => QueueReader, so far I'm only sure that you have configured the first HUD if that was it on that screenshot before, so check the rest or provide their settings as well.

But still your choice of moving your button straight to main ui canvas - I'd not consider it as a solution, unless you need one of those 2 other parents to stop its child from receiving click event, and from the point to which we came it was pretty much obvious that one of those 2 causes that (that's why moving to reconfigured main UI canvas worked).
Comment
Add comment · Show 14 · 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 LT23Live · May 01, 2015 at 02:28 AM 0
Share

I do have an event system

avatar image LT23Live · May 01, 2015 at 02:42 AM 0
Share

it has problems adding screenshots

avatar image DoTA_KAMIKADzE · May 01, 2015 at 02:51 AM 0
Share

What problems? Upload your images anywhere and just add it here using Image button (Ctrl+G).

avatar image Kiwasi · May 01, 2015 at 03:05 AM 0
Share

You'll also need a GraphicsRaycaster attached to the Canvas. Unity normally does this by default, however its worth checking.

avatar image LT23Live · May 01, 2015 at 07:30 PM 0
Share

alt text

eventsystem.jpg (290.6 kB)
Show more comments

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

23 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

Related Questions

UI Button multiple parameters 6 Answers

Move gameobject to button in new 4.6? 0 Answers

Buttons not Clickable inside of ScrollView 0 Answers

Force Unity UI element to refresh/update? 4 Answers

Why isn't curved UI asset working? 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