Search Issue Tracker

Not Reproducible

Votes

21

Found in

5.5.1p1

Issue ID

877022

Regression

No

When a button's interactability is re-enabled, it's "Highlighted" trigger is called instead of "Normal"

uGUI

-

Steps to reproduce:
1. Download and open the attached project
2. Enter playmode
3. Press any button
4. Press any other button

Expected result: all buttons except the last pressed are set to Normal
Actual result: previously pressed buttons are set to Highlighted

Reproduced on 5.3.7p2, 5.4.4p1. 5.5.1p2, 5.6.0b6
Not reproduced in 2019.1.0a10

notes:
-Hovering over and out of the button resets is to "Normal" again

  1. Resolution Note (2019.1.X):

    The addition of the selectable "Selected" state in 2019.1 solves this issue

Comments (15)

  1. TooManySugar

    Nov 01, 2018 16:50

    This is NOT FIXED, nor in 2018.2 nor in 2018.3 betas tested up to b8

  2. SimRuJ

    Jul 24, 2018 14:27

    This didn't get fixed in Unity 5.6.0f3, I'm using 2017.3.1f1 and it's still happening!

  3. Malkalypse

    Jun 21, 2018 06:12

    No, this is not fixed. This is still happening in June 2018...

  4. nkcowmaster

    Jan 22, 2018 03:21

    This bug still persists as of 1/21/2018

  5. ainsbot

    Nov 18, 2017 17:03

    bug is not fixed

  6. jmiguelhdez

    Oct 21, 2017 00:29

    this is still an open issue, why it says fixed?
    should we create a new bug report?

  7. zorkwarrior

    Sep 25, 2017 07:57

    Read this hack on the forum (short and sweet) :

    https://forum.unity.com/threads/clicking-a-button-leaves-it-in-mouseover-state.285167/

    button.enabled = false;
    button.enabled = true;

    Who knows what side effects this may have, but it works without a huge workaround.

    Another way would be to create a new class that inherits from Button and override the OnSelect() method as such:

    public override void OnSelect (BaseEventData eventData)
    {
    print (this.gameObject.name + " selected!");
    InstantClearState();
    }

    ...though I don't know if I'm eliminating any crucial behaviours. It does still call the method on attached to my onClick event.

  8. zorkwarrior

    Sep 25, 2017 06:47

    Using 2017.1.1f1 Personal and this is still happening. Granted, I'm new to programming but this seems incredibly odd as a default behaviour. There seems to be some workarounds, but apparently this hasn't actually been addressed despite the big green bar at the top of this page that says "Fixed in Unity 5.6.0".

    "Mission Accomplished" guys?

  9. adamjoyce

    Jun 11, 2017 14:07

    Not fixed in Unity 5.6.1f1 Personal 64bit as of 11/06/2017.

    I agree with THEWANDERINGBEN's comment above - this is a common problem that occurs in multiple beginner tutorials such as the TicTacToe UI tutorial. Beginners are likely to have significantly difficulty implementing a work-around.

  10. mcaulish

    May 06, 2017 13:43

    This bug isn't solved. It still occurs in Unity 5.6.0f3 (64-bit).
    (You can reproduce it just by doing the 9/16/2016 Live training "Polishing your main menu" by Matthew Schell)

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.