Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: mrKaizen on January 21, 2014, 09:30:26 AM
-
Hi!
Since the last update 3.0.9f3 my Buttons that have, in NORMAL state, alpha = 0 didn't work anymore: no event is released, no color change, nothing. (so be clear: the buttons are invisible and if you go over with the mouse they should appear).
I tried to change the NORMAL STATE ALPHA to 1 (so near to invisible) and it works... maybe some count error?
Tks in advance for your support. ^_^
-
Have a look at your collider! If I'm not mistaken, since the last updates the alpha value influences the collider!
If the Alpha value is 0 the Collider automatically disables.
-
Have a look at your collider! If I'm not mistaken, since the last updates the alpha value influences the collider!
If the Alpha value is 0 the Collider automatically disables.
Oh, I missed this... really? And if I want a button that has the NORMAL state with alpha = 0 what should I do? Are you sure about this?
Btw my collider IS NOT disabled.. :\
A pic (the button is NOT the label):
(http://colossusescape.com/images/stories/imagesdwl/buttonalpha0.jpg)
-
If you have a widget and a collider on the same object, then the widget's alpha automatically makes the collider invalid for raycasts if its alpha is 0.
There are other ways to create an invisible area -- by using a UIWidget instead of a UISprite, for example.
UIWidget (Button targeting a child sprite, collider)
- UISprite (background, anchored to the widget)
- UILabel
-
If you have a widget and a collider on the same object, then the widget's alpha automatically makes the collider invalid for raycasts if its alpha is 0.
There are other ways to create an invisible area -- by using a UIWidget instead of a UISprite, for example.
UIWidget (Button targeting a child sprite, collider)
- UISprite (background, anchored to the widget)
- UILabel
Ooooh, perfect! Tks for the info. ^_^
I honestly don't like that approach but if there is anther (right) way to do it it's ok. ;)