Search Unity

Use Collision2D to increase touch area

Discussion in 'General Discussion' started by OtakuEmperor, Oct 18, 2019.

  1. OtakuEmperor

    OtakuEmperor

    Joined:
    Dec 13, 2017
    Posts:
    1
    In our project, we need the click zone bigger than the button icon on UI.

    In normal cases, put the button as a parent of the image and make it larger than the the image.

    But our colleague wants to use Collision2D to do this because this solution can implement this in one component, not two, he thinks this can decrease the prefab size.

    We have many Clickable buttons on the UI.
    I don't know which solution is better for the performance.
    Thanks.

    Seems I post the question on the wrong site, I should post the question at the Answers, not Forums
     
    Last edited: Oct 18, 2019