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 zone

Discussion in 'Scripting' started by Aparty_, Jul 28, 2021.

  1. Aparty_

    Aparty_

    Joined:
    Apr 27, 2020
    Posts:
    41
    upload_2021-7-28_9-4-45.png
    Hello, there is a difficult problem with a clear answer, I can't find everything, I decided to turn here.
    Problem:
    it is necessary to determine that the red zone (shown in the picture) has been pressed or released or held down
     
  2. TheFunnySide

    TheFunnySide

    Joined:
    Nov 17, 2018
    Posts:
    192
    Attach a script implementing the different Handler interfaces.

    IPointerClickHandler
    IPointerEnterHandler,
    IPointerExitHandler,
    IPointerDownHandler
    ....


    Make sure the objects covering the red image are raycast target so that they dont let anything pass through.
     
  3. Aparty_

    Aparty_

    Joined:
    Apr 27, 2020
    Posts:
    41
    worked thanks