Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Button getting triggered when i dont click it

Discussion in 'Editor & General Support' started by NaveGCT, Aug 7, 2020.

  1. NaveGCT

    NaveGCT

    Joined:
    Dec 20, 2017
    Posts:
    5
    My button ("Pause/Unpause") Should only be trigged when it is clicked, and the mouse is over it, but it is getting clicked with other keys, even when the mouse isnt anywhere near it!!! (I attatched the code, inspector stuff, and a video of whats happening)

    Video: https://gofile.io/d/pT59W6 BtnInspector.PNG Capng.PNG Logboi.PNG Script.PNG
     
  2. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,892
    I'd guess your button is bigger than you think it is. Perhaps it's a panel that covers the entire screen? The button itself and the Target Graphic for the transition can be different objects. What other components are on the GameObject that has the Button on it? What are the extents of the RectTransform for the Button GameObject?