UI Toolkit Scroll View Pro

Links: Asset Store, Manual

It extends the default scroll view with lots of features like animated scrolling, inifinite scrolling, snapping, paging, …

https://vimeo.com/863610150

Links: Asset Store, Manual

Hope you like it :slight_smile:

2 Likes

Hello,
first of all, congratulations on this package that works very well. I was wondering if it is possible to have a visual element in the container that is not draggable. Meaning that when clicked and moving the pointer into it, it does not trigger scrolling.

1 Like

Hi, good question.

Here is a patch you can download:
https://kamgam.com/unity/UIToolkitScrollViewPro-v1.0.3-patch-ignore-drag.unitypackage

After import you can add a USS class to any element you wish to ignore. The USS class name is “svp-drag-ignore”, like this:

9625394--1366961--upload_2024-2-5_17-37-17.png

Hope this helps. Please let me know if it worked in your project. If yes then I will add it to the next release of the asset.

Hi, thank you very much for the quick response. It works perfectly fine, however, it seems that this feature is spreading to the children of the visual element with the class .svp-drag-ignore.
Is it possible not to apply this feature to children that do not have the class?

Hi, could you please elaborate a bit on what you want to achieve? I think I could introduce another uss class to re-enable dragging on children yet I would prefer understanding what you are trying to build as there might be a better solution.

In the Focus Snap Demo example scene, there’s a grid with several labels in it. I would like the grid scrolling to occur only if the user has pointed to a label in it, during the onPointerDown event. So in my case the scroll should not trigger when the user points between the labels.

Thanks, hm okay. I actually should not spread to children. I have done a quick test in the demo it works if I do this:

9626924--1367318--upload_2024-2-6_11-23-4.png

9626924--1367327--ScrollOnlyOnLabels.gif

Then it only drags on the labels (which is what I would expect since the only element with the ignore class is the grid).
What’s your setup? What element(s) did you add the ignore class to?

It works for me as well !
I was working on another scene where I had the VisualElementClickLogger script on the game object of my UIDocument, and it seems that something in the OnEnable method of this script is blocking scrolling for that case.

1 Like

Hi, How can I achieve snapping to the previous or next element using the mouse scroll wheel?

1 Like

Hi,
thanks for asking.

Automatic Mouse Wheel snapping will be part of the next update (v1.1.0).
I have already submitted it for review so it should be available to all in about a week.

I have also sent you the patch that enables mouse wheel snapping via PM so you can use it immedately. Please let me know if that patch works for you (it did in my test project but one never knows).

1 Like

@_geo1 Hi.
Im trying to upgrade my default unity scroll view to this but running into a problem. On the default scroll view I have added a selector so that I can customise the container to layout its elements in a grid which works fine but when I do the same to your scroll view elements layout correctly but I lose scrolling functionality. Help would be apprieciated.
Using Unity 6

Thanks Ryan

1 Like

Hi, Ryan. I am currently traveling so no access to my Pc to check. I may be able to take a look at this in the evening or (more likely) tomorrow. If you want you can send me your project to office@kamgam.com so I have an easy reproduction case once I am back. Or maybe just the USS and the layout would suffice. The more infos I have the better.

You mentioned Unity 6. Does it work in Unity 2022 or 2023?

Thank you for your patience.
Hope to get back to you soon :slight_smile:

Thanks _geo1 will send you project files

1 Like

Thanks, files received. I have sent you a patch for testing via email :slight_smile:

1 Like

For those who might be interested patch 1.3.0 fixed my issue :slightly_smiling_face:
Thanks _geo1

1 Like

Hello! Is it possible to make an infinite scroll view such that it keeps going infinitely? Than I can figure out if I want to cycle it myself based on some kind of indexing or IEnumerable :slight_smile:

Thank you!

Hi, I am not exactly sure what you mean. There is an infinite repeating scroll view demo included (repeating the same elements infinitely). That one is also shown in the video. What aspect of it do you want to control exactly?