Scrollbar handle disappears

Hello,
I use many scrollbars in my scene. Sometimes their handles disappear and i can’t find any reason. Everything is okay and when I run my project next day one of the handle disappears. Their rect transform parameter Top and Bottom are set to NaN. The only way to make it work is to remove scrollbar and create a new one.

Any ideas why this happens?

1 Like

I found that everytime I restart unity the scrollbar handles are disappeared

1 Like

I found out a workaround for this. For me, the reason the handle disappeared is due to I link these scrollbars to prefabs. Unlink them from the prefabs fix the problem, though I don’t know why :frowning:

In my project all scrollbars are link to prefabs and they doesn’t disappear afet each Unity reset, only sometimes ;p I think in my case is something different. Do you use Unity 4.6.1 ?

Same problem here. I’ve been struggling with it since 4.6 and now I’m running 4.6.1f1. Sometimes my On Click functions wont work either. This happens often, not every time I open some of my projects. So the issue seems not persistent, but very random. If this was indeed a bug in new UI I’d expect more reports on this issue, but this was the only thread.

I recently worked with patched Unity 4.6.1p2 and as I remember I did not run in to any problems regarding UI, but I had to downgrade back to 4.6.1f1 because patched versions does not support web player projects. Any way try installing patch from Download Archive . Maybe that will resolve the issue.

Update: I found out that the workaround is not working, they start to disappeared again /.\ Yeah I am using 4.6.1

Gonna try 4.6.1p4, will tell here if it works.

Btw, I know how to reset the scrollbar to original position.

When you click on the handle you will see the recttransform Top and Bottom of the handle is “NaN”, follow these steps:

  1. change the Anchor Preset to middle-center (red line cross in the center)
  2. change Pos Y “Nan” to 0
  3. change the Anchor Preset back to stretch-stretch (bottom right corner), make sure the top and bottom is now 0 0, you get back your scrollbar handle!

btw, this issue is also discussed here:

3 Likes

Update: I have tried 4.6.1p4, and the scrollbar is STILL DISAPPEARED

Unity, please help us.

I have the same problem and reported the bug a couple of weeks ago. Moreover, if that happens, my whole canvas is getting messed up (events not working anymore for example, so my tooltips go to hell) until i don’t deactivate the scroll bar. For me it seems to happen only when i change the canvas screen space only so far.

in my case i have multiple canvas object, some are screen space only but some are link to cameras. but all the scrollbars are inside canvas link with camera.

the scrollbar problems just messed up my scrollrects and make them cannot scroll properly (it feels like the handle is covered on the whole scrollrect).

Hello guys, any update on this issue?
Has anyone reported it? I could not find anything about this problem in the bug tracker.

Ahaha i just came to the forum to investigate about the same thing cause i realized that it happens sometimes also when i don’t even change the screen space of the canvas

i did report it already several weeks ago i think, maybe it’s fixed and ready for the next release

This other thread has some useful information about this bug… Something with the layout components. I’m having these issues to.

Just wanted to chime in that I am also having this issue. When the Scrollbar goes psychotic, the Handle of the Scrollbar seems to capture all my click events on my Canvas, preventing any UI from working. I could see this from watching the EventSystem while running my app.

It consistently caused me trouble today, and then magically stopped. Probably will again in the future.

This worked!!! Thanks so much. I don’t understand how this issue is still here 6 years later…

If you’re changing the size property of the scrollbar in script, make sure it’s a valid float. In my case I wasn’t accounting for a division by zero; so setting the size gave the handle a NaN position, which would persist even after the size was set to a valid number.