Search Issue Tracker

Fixed in 5.4.0

Votes

9

Found in

5.2.0f3

Issue ID

726231

Regression

No

Dropdown menu is not displayed when Time.timeScale is set to 0

UI

-

Steps to reproduce:

1. Open the attached project
2. Open and play 'Test Scene'
3. Click on the dropdown menu, notice it works as expected
4. Click the button, it changes Time.timeScale to 0
5. Click on the dropdown menu again, notice it works as expected the first time
6. Try clicking again, notice it does not display the menu (the items can still be selected though, see the attached gif)

Comments (7)

  1. DuckedAgain

    May 26, 2016 17:57

    Just came across this problem, thanks for the work around DAGGADA2, ya little lifesaver :)

  2. BlackCurtain

    Mar 23, 2016 13:41

    I have also been struggling with this problem. The dropdown menu completely loses all interactivity when timescale=0. The workaround script from DAGGADA2SEP worked though.

  3. PLYHIKE

    Oct 21, 2015 02:34

    @DAGGADA2 thanks!

  4. nomadic

    Oct 16, 2015 16:07

    @DAGGADA2 great fix

  5. Disastercake

    Oct 10, 2015 01:44

    Happening to me as well. Was not happening prior to 5.2.1p3. Thank you for the temporary fix, previous poster. =)

  6. daggada2

    Sep 27, 2015 12:48

    This served as a workaround for me, just drop this script on the below the Dropdown component on the gameobject:

    using UnityEngine;
    using UnityEngine.EventSystems;
    using UnityEngine.UI;
    using System.Collections;
    using System.Collections.Generic;

    // delete this when unity gui fixes timescale issue with dropdown widget
    class DropdownPausedFixer : MonoBehaviour
    {
    void Awake()
    {
    EventTrigger evtrig = gameObject.AddComponent<EventTrigger>();
    EventTrigger.TriggerEvent trigev = new EventTrigger.TriggerEvent();
    trigev.AddListener((eventData) => Fix(eventData));
    EventTrigger.Entry entry = new EventTrigger.Entry() { callback = trigev, eventID = EventTriggerType.Select };
    if (evtrig.triggers == null)
    evtrig.triggers = new List<EventTrigger.Entry>();
    evtrig.triggers.Add(entry);
    }

    public void Fix(BaseEventData eventData)
    {
    // If paused, remove the spawned dropdown
    if (Time.timeScale == 0f)
    {
    Transform tr = transform.Find("Dropdown List");
    if (tr)
    Destroy(tr.gameObject);
    }
    }
    }

  7. daggada2

    Sep 26, 2015 20:40

    Yes, also experiencing this. It seems their fade-in tween for the content area is not timescale independent. You can see the the spawned "Dropdown List" object's Canvas Group component's alpha remains 0 when timescale is 0. If you manual override it to 1, the list will appear.

    Might be able to temporarily work around with a click event trigger and forcing the Dropdown List's canvas group to alpha 1.

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.