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
9
Question by Cube333 · Dec 23, 2014 at 11:35 AM · buttonimageclickthrough

UI - click through image

Hi, I've got this problem because between my mouse and button is image. So when i click on button they do nothing. I think i must make image non-blocking or something but i have no idea how to do that.

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 Cube333 · Dec 23, 2014 at 07:47 PM 0
Share

UI - Unity 4.6

2 Replies

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

Answer by Mmmpies · Dec 23, 2014 at 10:01 PM

You could set a CanvasGroup on the image and uncheck blocksRaycast and interactable.

Just select the image and click AddComponent -> CanvasGroup. (sorry no idea if you know how to do this already).

Should still be visible if the alpha = 1.

Comment
Add comment · Show 3 · 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 Cube333 · Dec 24, 2014 at 12:18 PM 0
Share

It's working! Thanks.

avatar image Orion · Jun 05, 2015 at 02:00 PM 0
Share

Brilliant!

avatar image farmerdwight · Mar 14, 2019 at 05:45 PM 0
Share

Perfect, thank you!

avatar image
16

Answer by Carlotes247 · Dec 21, 2015 at 02:58 AM

Hello, just to update it with Unity 5.3, you can deselect a boolean field in the Image component, called


captura-unity.jpg (21.2 kB)
Comment
Add comment · Show 3 · 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 Matti-Jokipii · Jan 12, 2016 at 01:01 PM 0
Share

This works in Unity 5

avatar image TharosTheDragon · Oct 29, 2017 at 01:39 AM 0
Share

Didn't work. Neither did setting the layer to "Ignore Raycast." Very curious.

avatar image unity_VvCODKknmBJQGw · Feb 16, 2021 at 06:55 AM 0
Share

First of all, thank you for your solution - I am using it 5 years later haha!

I am not quite sure how CanvasGroups work, but this solution has served me better:

I had an empty game object (let's call it Layer X), that I wanted to instantiate objects on - so that they are always first in the hierarchy. Since the CanvasGroup will affect all children of the object, it blocked interaction with the objects I have instantiated on LayerX.

For anyone having the same problem, just toggle the Raycast Target on the image off - you can also switch it back on in runtime so that's perfect for these kind of scenarios

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

10 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

Related Questions

Stop clicking through a GUI window 2 Answers

Cannot click on image multiple times 0 Answers

Change sprite images on button click 0 Answers

GUI Repeatbutton up? 1 Answer

Unity UI Button not working 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