- Home /
Curiously, Viewport seems to need an Image?
On a Unity.UI ScrollRect setup,
when you click to create a scroll view, the "Viewport" item which is created, has an Image
component
It does nothing - you can't actually see it or the color you set.
I've just noticed that if you turn off or delete that Image
component, all of the Content disappears - you can't see anything.
(Indeed, the "Content" item also has an Image
- however you can just delete it and usually do, since you inevitably have your table items or whatever in there covering the entire space.)
Has anyone else noticed this? I wonder why it would be that deleting it seems to blank the content??
Good one, I sent you reward points to say thanks
Answer by lassade · Jan 23, 2016 at 11:37 PM
I just try it right now with the 5.3.1f1 and indeed the contents disappears, but reapears when i hit play and stay that way even when i exit the play mode, after that disable or enable the Image component does not change any thing.
Reopen the scene will make the contents disapper again even with the image enabled.
I also tried it with 5.2.2
I only left the Viewport gameobject with an RectMask2D and every thing works fine.
Btw remove the $$anonymous$$ask (to see the UI$$anonymous$$ask sprite kind have a little bit of white in it) or replace it with Rect$$anonymous$$ask2D and you are good to go.
latest version. No, I had nothing else there, mask unrelated
Ciao, fascinating --- maybe we found a real bug. Good work
Your answer
Follow this Question
Related Questions
How to trigger OnValueChange(Vector 2) method from code? 1 Answer
Calculating normalized horizontal position based on container size with fixed item size 1 Answer
ScrollRect bahaving weirdly 1 Answer
Scroll view not scrolling when colliders are in the way 0 Answers
Scroll rect starting in the middle 3 Answers