Search Unity

Increase Click Area

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

  1. MinsukCha

    MinsukCha

    Joined:
    Jun 9, 2014
    Posts:
    13
    Is it possible to increase a click area for button? I don't want to increase my button sprite image, but increase a clickable area like only scaling the collider attached.
    I have a button on the bottom right corner on the screen, and I want it to be clicked when a user touches a right-half screen. Please let me know if there is a way. Thank you~
     
  2. Melang

    Melang

    Joined:
    Mar 30, 2014
    Posts:
    166
    Remove the Image component from your button, then add a child Image GameObject to the button. Then use the child Image as a target Graphic for your button.
     
  3. MinsukCha

    MinsukCha

    Joined:
    Jun 9, 2014
    Posts:
    13
    Thank you Melang. It helped a lot. Additionally I just found out that the clicking area is relevant to button's children area. In other words, If Button has two children like Text and Image, each one has the own clickable area. So if Text component is deleted, only Image component area is clickable. I am not sure if it is intended or not.
    If it is a kind of bug, it should be fixed.