UI Scrollview dissapearing in Build?
On my start menu I have a scroll view to display the levels in my game:
It works fine in the editor every time but acts weird in builds. As a windows 10 app the scroll bar isn't visible and there are no restraints on the scrolling (so you can keep scrolling until all of the content is off the screen) also sometimes it flashes and even disappears altogether. On WP 8.1 the scrollbar is there and the restraints work fine but sometimes when I load the start menu the backgrounds are merged in a weird way, the title disappears and when play is tapped the scroll view doesn't appear at all:
The problem is not with resolution as I have checked this in the editor and it works fine for all resolutions. How do I fix it?
No I haven't fixed it, ins$$anonymous$$d I ditched the scroll thingy completely and changed the way the start menu works to avoid the bug, sorry.
Having the same issue on Unity 5.4.1 I have a scrollview that will not show its content regardless of if I add items in the scene or during runtime. Will try adding the scrollview at runtime as prefab and see if it works better...
Did you report this as a bug?
Answer by robal1991 · Jun 28, 2017 at 09:49 AM
I've had similar issue. The problem was that Scroll bar mode "Auto hide and expand viewport" wasn't working on WebGL builds.
Answer by kuperto_pixel · Aug 30, 2016 at 09:10 AM
Got it!, You have to create the menu in run time to avoid this error, for some weird reason it does not create the content when you have it "Pre-loaded" in the editor, so either create the menu in real time or instantiate a prefab of the full menu, it worked for me that way.
Actually, it's not necessary to instantiate, if the component ScrollRect is disabled while building and then enabled during runtime it works fine. It looks like some bug for scrollrects that starts outside the canvas limits.
Answer by Mikael-H · Sep 19, 2016 at 03:05 PM
I've been fighting the same (or similar) issue. In my case it seems like the "Content size fitter" atteched to the content game object of the scrollview somehow screwed things up when building for desktop.
After creating a new scrollviews a few times I finally ended up with one that worked by adding one setting or component at a time. I am not sure what the illegal setting was that made the scrollview not work in the build and now that I have a working version I'm not touching it :)
Answer by Rinku2429 · May 14, 2018 at 07:34 AM
In Your Scroll Rect Component set the Visibility Permanent. It Should Work. :)
Thanks, this worked for me. $$anonymous$$y exact symptoms were that the Scroll View contents would be displayed if I played from the scene with the Scroll View, but if I started in another scene and went to that scene the Scroll View would be empty.