Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: swilskey on June 01, 2014, 04:49:17 PM
-
I am having some problems with the Enabled Disabled sprites. The normal sprite always changes to the Disabled sprite. I am not sure exactly what is happening. I am using the newest NGUI. http://imgur.com/N3qq4Kf (http://imgur.com/N3qq4Kf)
-
Your collider is disabled. Disabled collider = disabled button.
-
The problem is that when I enable the button it doesn't switch to the Normal button sprite. It can be enabled but still be the disabled sprite.
-
You need to use UIButton.isEnabled instead of modifying the collider's state, and it will update the sprite.
-
Thanks that makes sense. I am however having trouble using the UIButton.isEnabled This is the current script I am using to get the info from player prefs and changing the collider. I am not sure what I need to change. (http://i.imgur.com/pZr8qWg.jpg)
-
Replace "collider.enabled = false;" with "GetComponent<UIButton>().isEnabled = false;"