Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Click through images

Discussion in 'UGUI & TextMesh Pro' started by mrSaig, Aug 25, 2014.

  1. mrSaig

    mrSaig

    Joined:
    Jan 14, 2010
    Posts:
    68
    Hi there,
    is there a way in uGUI to have like a half transparent overlay image were i can click through (button directly behind it) ?
    In NGUI i just removed the collider ... but what is the workflow here?

    Cheers
     
  2. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,181
    Add a CanvasGroup to the image and deselect 'blocks raycasts'.
     
  3. Gigiwoo

    Gigiwoo

    Joined:
    Mar 16, 2011
    Posts:
    2,981
    I ran into issues with text fields eating click events if it was a SIBLING to a button. Ended up working around it by making it a child. Now I have a different way to solve it! Thanks Tim!

    Gigi
     
  4. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,181
    Yeah, we pass things UP the stack, not to siblings... that's why you are seeing this (normally we make labels children of the background so we don't need to worry)
     
    plapi likes this.
  5. mrSaig

    mrSaig

    Joined:
    Jan 14, 2010
    Posts:
    68
    Thanks! Very helpful guys!
     
  6. plapi

    plapi

    Joined:
    Apr 18, 2019
    Posts:
    6
    Man from the future says thank you ^^