Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by KaspianR · May 16, 2018 at 09:01 PM · uibuttonslider

Inverted scrollrect

Hi! I have a bunch of buttons that are being aranged by a GridLayoutGroup. Attactched to that parent object i have a scrollbar with a scrollrect. Everything works just fine, I can scroll it and the buttons move around just as I wanted them to. The only problem is that the scrolling is inverted. Drag the mouse up and the scrollbar moves down and move the mouse down and the scrollbar moves up. I've tried adjusting the sensitivity to a negative value but the sensitivity makes no difference to the direction and not even the speed! What am I doing wrong? Thanks in regards!

Btw, I cannot find any other topic than “Strange IOC”, I don’t even know what that means but I had to enter a topic...

Comment
Add comment · Show 11
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Harinezumi · May 17, 2018 at 07:09 AM 1
Share

I remember having similar behaviour, and I think I fixed it by changing the Direction of the Scrollbars to the opposite (e.g. changed "Left To Right" to "Right to Left"). Have you tried this?

avatar image KaspianR Harinezumi · May 17, 2018 at 07:40 AM 0
Share

Yes, I did try that but then the slider is at the bottom when the content is at the top. It feels kind of weird to have the content move in the opposite direction of the slider so I whould really like if it was possible to do it in another way...

avatar image Harinezumi KaspianR · May 17, 2018 at 07:55 AM 2
Share

O$$anonymous$$, I just checked this, and I think the problem you perceive is actually the correct behaviour.
Think about it: if you have a scrollbar with Top to Bottom direction, then when you view the top, it should be at the top, and similarly for the other way around. When you drag moving the mouse up, you drag the viewed content up to see more of the bottom - hence the scrollbar needs to move towards the bottom.
Does this make sense? And did I understand your problem correctly?

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by huulong · Dec 29, 2021 at 07:55 PM

I got this on UI Toolkit Scroller. The child Slider automatically set Inverted to true despite the scroller being Horizontal (Scroller.cs code constructor says it should only be Inverted when vertical). I don't know if that applies to your case, but I suspect some behaviours are common between UI and UI Toolkit.

EDIT after reading comments: to be clear, the behaviour was definitely wrong, as the scroller was Horizontal, not Vertical, and clicking on the left arrow moved the slider to the right, and vice-versa.

I have reported the bug for UI Toolkit (for Editor window).

In the meantime, my workaround is to set myScroller.slider.inverted = false manually after UI elements construction when the scroller is horizontal. Maybe it will work with your UI system too.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

84 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Call Functions On Player From Canvas Elements In a Multiplayer Game 1 Answer

Can I Simulate the "Submit" Event with Gamepad Buttons? 0 Answers

Buttons not Clickable inside of ScrollView 0 Answers

How to check if selectable is a button? 1 Answer

Is there a way to Instantiate a button prefab as a child of a Canvas? 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges