TouchScrollBehavior, elasticity, elasticAnimationInterval, scrollDecelerationRate. All these worked fine in UGUI. When this will be fixed? Also how to make vertical/horizontalPageSize work? I’m setting it to crazy high values but scroller still moves very slow when holding keyboard arrows.
UGUI works perfectly. You just wrote a bug/didn’t connect it properly.
Time to start debugging!!! Here is how you can begin your exciting new debugging adventures!
Debugging can allow you to get all the information you need to discover what the problem is. Once you actually know the problem, only then will you be able to create a solution…
The most coming issue that happens is one of the following:
- the code you think is running isn’t
- the code is running sooner or later than you think
- the code is running less or more often than you think
- the code is running somewhere else than you think it is
- you haven’t look at the previous errors or warnings in the console
To help gain more insight into your problem, I recommend literally sprinkling Debug.Log() statements everywhere near the source of the problem to display all the information in realtime.
“When in doubt, Debug.log it out!"
Hello! Are you trying these out in the Builder preview or in Playmode? If it’s through the preview, you’ll need to save unfortunately to see the changes. Otherwise, could you post your code/UXML for me to see how these attributes are set?
Also, for the page size, it unfortunately seems like a bug where it only takes effect when clicking on the arrows by mouse, not using the keyboard arrows. Could you report this? Thank you!
Hi! I’m setting scrollView attributes inside ListView in the code. I was wrong about TouchScrollBehavior it’s working though somewhat buggy. I’ve recorded a video to illustrate this Watch ListViewBindingTest2 | Streamable Other attributes doesn’t seem to work at all.
Here’s my code
[UxmlElement]
public partial class MainWindowView : VisualElement
{
public MainWindowView() { }
public MainWindowView(VisualTreeAsset viewTemplate, MainWindowViewModel viewModel)
{
this.StretchToParentSize();
dataSource = viewModel;
VisualElement view = viewTemplate.Instantiate().Children().First();
Add(view);
this.Q<ScrollView>().style.backgroundColor = Color.red;
this.Q<ScrollView>().touchScrollBehavior = ScrollView.TouchScrollBehavior.Elastic;
this.Q<ScrollView>().elasticity = 100.0f;
this.Q<ScrollView>().elasticAnimationIntervalMs = 8;
this.Q<ScrollView>().scrollDecelerationRate = 1.0f;
}
}
I’m on 6000.0.26f1
I’m mostly interested in elasticAnimationIntervalMs and scrollDecelerationRate to make scrollView very smooth.
Yeah I see it on my end too, it looks fine using the touch pad, which is what I was testing with earlier, but it’s not great with the wheel. Can you please report this bug inside Unity via the menu “Help > Report a bug” ?
Thank you so much!
Ok I’ve reported a couple of bugs I’ve find with scrollView IN-89891, IN-89895, IN-89892, IN-89894