Author Topic: Button activates under sprite  (Read 1693 times)

Chad Goodson

  • Guest
Button activates under sprite
« on: August 15, 2013, 02:00:34 PM »
I have a simple setup where a button is setup with the ButtonPlayAnimation  attached. The script prompts a sprite with a label, to animate onto the screen thus covering the original button. The problem is that I can still interact with the original button through the sprite. The result is that the animation replays(an abrupt effect). How can I make it so the original button is no longer accessible once it has been covered by the sprite screen?
Thank you.

Narv

  • Guest
Re: Button activates under sprite
« Reply #1 on: August 15, 2013, 03:10:07 PM »
you can add a box collider to the sprite.  That is what I did when I had a popup in my settings menu.. so that you couldn't interact with the buttons behind it, I just put a collider box on the background sprite of the popup.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Button activates under sprite
« Reply #2 on: August 15, 2013, 06:06:10 PM »
Touches only interact with colliders. It doesn't matter how many labels or widgets are on top of it, if there's no collider blocking.