This post has been wikified, any user with enough reputation can edit it.
Question by
Valerius666 · Jan 27, 2016 at 12:36 PM ·
buttonhighlight
Button stays highlighted after click
Have a real pain with Button, set Navigation to None, as was recommended before. Button works normally in UnityEditor, but when I test it on iOS device after it was clicked it stays highlighted. Does anyone had the same problem? And if had, any ideas how to fix it?
Comment
Answer by pace15 · Feb 09, 2016 at 05:30 PM
I have the same pain than yours @Valerius666... By overriding Button class we are able to override OnPointerUp() and complete the base.OnPointerUp(eventData) operation to have something like that:
public override void OnPointerUp(PointerEventData aEventData)
{
base.OnPointerUp(aEventData);
OnDeselect(aEventData);
}
By doing this, it only solves half of the problem, the button get stuck in Highlighted state only the first time we click it... subsequent clicks have the good behavior.
If anyone knows how to fix/hack this, please tell us here!
thanks