Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
0
Question by homer_3 · Jun 02, 2016 at 04:11 AM · uiscrollbar

Scrollable area keeps resetting?

I'm trying to create a scrollable UI element and every time I do, when I go to scroll, the list scrolls down as I spin my mouse wheel, but as soon as I stop, it rubber bands back to its original position.

I have a canvas and under that I have panel1 with a mask and a scroll rect. Under that is another panel2 which is the content of the scroll rect and has a content size fitter with vertical fit set to preferred and a layout element to set the preferred height. Under that are a bunch of panels that I want to be scrollable.

Also, whenever I hook up my scrollbar to the scroll rect, the scrollbar handle fills the entire scrollbar even though there is content that extends past the scroll rect.

Can anyone explain what's going on here?

Comment
Add comment · Show 4
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 saud_ahmed020 · Jun 02, 2016 at 08:01 AM 1
Share

@homer_3 Can you show me the screenshots of Scroll rect and its child contents ?

avatar image homer_3 saud_ahmed020 · Jun 02, 2016 at 11:18 PM 0
Share

@saud_ahmed020 made a video of what I'm doing and seeing https://www.youtube.com/watch?v=Sfd4XkbLui$$anonymous$$

avatar image Aseemy · Jun 03, 2016 at 01:00 AM 0
Share

I had the same problem. The content size fitter was the culprit for me.

Once i removed this component and manually set the size of the content, the scroll rect worked for me.

Try that.

avatar image MagicStyle · Nov 06, 2017 at 01:58 PM 0
Share

Please always post screenshots, it is hard to visualise everything in the head.

2 Replies

· Add your reply
  • Sort: 
avatar image
3
Best Answer

Answer by KuR5 · Jun 04, 2016 at 03:58 PM

WRT your example, just add one more component named "Grid Layout Group" to panel2. In that component :

  • set Start Axis to Vertical

  • set Constraint to Fixed Column Size

  • set Constraint Count to 1

  • Set value of Cell Size with preferred width and height of child

Further remove "Layout Element" from all of the child of panel2.

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
avatar image
1

Answer by Lasutriv · Mar 02 at 09:52 PM

You can also add the "Content Size Fitter" component to your content and then if it's a vertical scroll then set the property "Vertical Fit" of "Content Size Fitter" to "Preferred Size" and likewise for the horizontal fit.

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

66 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

Related Questions

Check if visible in UI Mask 2 Answers

How can I create a Multi line Input Field with Scrollbar? 0 Answers

Smooth scroll snap? 3 Answers

Why is my scrollbar not working? 4 Answers

Making resizable window like a Microsoft Windows OS's folder window 0 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