Hi there,
I am new to the forum and I work on the UI for a project. I basically want to implement a grid view with scrolling vertically - I dynamically load some objects for a shop into a canvas and I want to scroll vertically with a scrollbar.
So far, I created a canvas ‘scrollarea’ with the scroll rect and a ‘canvas_furniture’ as a child where the objects are created in (as children) at runtime. There is also a scrollbar inside the scrollarea. The scrollbar is set to top to bottom.
This is my hierarchy (only the scrollarea and children should be relevant):
This is the scrollarea:
And this is the look of my screen with runtime-objects and the non-working scrollbar (there are more objects below):
My problems are the following:
-
So far, only mouse wheel scrolling works. The scrollbar somehow is not interactable and the handle disappeared as soon as I dragged the scrollbar asset into the scroll rect vertical scrollbar.
-
I can scroll infinitely with my mouse, although I have a content size fitter on the scrollarea as well as on the content canvas with the objects - both set to vertically ‘preferred size’. I can also scroll up infinitely.
Can someone help me with figuring out why this is the case? I would like to scroll via clicking and dragging the scroll bar handle, but mouse wheel would be fine for now if only it would not scroll past the last object …
Thanks in advance everybody