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 EmperorCesar15 · Nov 12, 2014 at 11:14 PM · image4.6

UI 4.6 Image blocks Mouse Click

I have a Scroll Rect with a Mask. As a Child, I have an Image that I use for the content of the Scroll Rect. If you click on the image and drag the mouse, it behaves correctly. It slides up and down.

However, I need to add another Image on top of that to make it look better. I added a new image that is on top of the ScrollRect. The problem is that now I cannot use my mouse to select the contents of the ScrollRect because the new Image is on top of it.

Is there a way where I can have an Image that doesn't accept mouse clicks, so that I may click on Images underneath it instead?

Comment
Add comment
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

2 Replies

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

Answer by troien · Nov 13, 2014 at 02:33 PM

You can add a CanvasGroup component to your Image, and set the Interactible and Block RayCasts to false.

(Unity 4.6.0b20)

I assume that in the future you would be able to use layers and set the Graphic Raycaster Blocking Mask, but I think this is not implemented yet in this version of Unity. Since nothing seems to change when I change this value :p

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 Ilona · Dec 09, 2014 at 12:36 PM 0
Share

I tried this solution and it seemed to work fine at first, but later I noticed that sometimes the settings change and I don't know why.

I have a prefab that contains multiple UI-objects and for some of those I have added the CanvasGroup component with Interactable and Block Raycasts set to false. I add the prefab dynamically from the Resources folder. Sometimes Interactable and Block Raycasts is set to true again. I can't figure out why it happens.

I've had this happen in different prefabs. I noticed the Ignore Parent Groups but that has no effect whether it is on or off, also the parents don't have CanvasGroup added.

Do you have any idea what could be affecting the settings of the CanvasGroep component? Could this be a bug? Any help would be appreciated!

avatar image EmperorCesar15 · Mar 29, 2015 at 08:47 AM 0
Share

Okay, that works perfectly. Thanks.

avatar image Michael_Miller · Mar 29, 2015 at 08:49 AM 0
Share

This fixed my issue as well! Thank you very much!

avatar image
4

Answer by tarod-net · Feb 12, 2017 at 07:39 PM

In my project, it was enough to uncheck "Raycast Target", a Image property.

I didn't need to have a Canvas Group.

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 foureyes44 · May 07, 2018 at 11:49 PM 0
Share

Thank you so much.

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

[4.6 - UI] Accessing Text in Image inside Canvas via C# Script 3 Answers

9 Sliced Image Is Bleeding Edges 0 Answers

Help with 3 star reward system 2 Answers

Unity 4.6 beta: Can I use best fit with text on an image instead of a button? 0 Answers

[4.6] How can I make children images not stretch with the parents? where to place anchors? 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