Search Unity

UI slider bug

Discussion in 'Unity 5 Pre-order Beta' started by Enrico Monese, Feb 13, 2015.

  1. I got the 5 beta some days ago to test my assets for the store, was messing around with my stuff and I came across a ui slider bug. Basically the slider fill bar and the handle have a strange offset. I tried to fix them by hand and it works for a while and the it goes back to its strange position.
    It also is a prefab, don't know if that may be the problem but it never behaved strangely before so I thought it may be something with the beta.

    Here are some screenshots
    Schermata 2015-02-13 alle 15.22.47.png
    Schermata 2015-02-13 alle 15.57.10.png
    Claytonious likes this.
  2. Claytonious


    Feb 16, 2009
    I've also struggled with this for many weeks. I haven't been able to reliably reproduce it so I haven't filed a bug report yet. If you have found a way to reliably make it happen then please file a bug report with your project attached!

    I've rebuilt my UI sliders at least 30 times on the same project because of this.
  3. Sadly neither I was able to reproduce it, I'll file it if I find out how to reproduce it!
  4. OK, maybe I got it!
    It seems that it happens when the slider is child of a inactive object that gets activated at play time, and the parent object is a prefab.
    Something like this, the panel is the one that gets activated at runtime.
    Schermata 2015-02-14 alle 18.40.53.png

    And this is the result I got.

    Schermata 2015-02-14 alle 18.43.30.png
    And after some other tests I got this.
    Schermata 2015-02-14 alle 18.45.40.png
  5. Yep, the problems begin when you hit Apply on the prefab.
  6. Vibs_appit


    Feb 16, 2014
    I had similar issue. I managed to solve it by moving the pivot of the slider area to left hand edge (assuming you have values incrementing from left to right).
  7. doukOmega


    Dec 31, 2014
    I am having the same issue and i cannot figure out a single way that it may be fixed from our side. It seems that the pivot points and and the anchors positions calculations reset internally when we hit apply to prefab on a parent object of the prefab. Thus that means that we cannot create any single multislider prefab.

    This though is way to much tedious to be done correctly. And if you have nearly 100 ui objects active on your scene at runtime this is not going to happen.

    Any unity technologies guy that can answer us if they are tracking the issue?
  8. LuxUnity


    Sep 29, 2010
    I have this issue too.