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
3
Question by El-Deiablo · Jun 14, 2016 at 08:34 PM · scrollconstraints

Scroll Rect - Scrolling Limit

I have a how to play panel that the user can scroll through. The panel includes images and text. I have my scroll rect settings on unrestricted. I have tried the other setting including clamped and elastic. Elastic does not let me scroll very far (as seen in the video below) and clamped restricts any movement at all. With the unrestricted setting the user is able to scroll forever which does not look good in a final product. How can I make a scrolling constraint at the top and bottom of the panel?

I posted this video for another issue I was having (which is solved), but you can see my setup - https://www.youtube.com/watch?v=fKTfC7nGEP0

Comment
Add comment · Show 3
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 El-Deiablo · Jun 15, 2016 at 01:36 AM 0
Share

Thanks for getting back to me again! I have watched this tutorial. I have tried switching the movement type before I posted, but continued to run into this problem (https://youtu.be/WJ8qtlatsso). Setting the movement type to unrestricted allowed it to move the way I wanted, but now I can't get it to stop when the player reaches the end. Do I need to make all the sprites and text into one image?

avatar image wojtask12 El-Deiablo · Jun 15, 2016 at 11:32 AM 0
Share

And what about "clamped" movement type? does it work?

avatar image El-Deiablo wojtask12 · Jun 16, 2016 at 03:04 AM 0
Share

Clamped does not allow it to move at all. I do not have a content fitter, but if I tried to add it to the panel, and expand, it does not work.

7 Replies

· Add your reply
  • Sort: 
avatar image
22

Answer by DistulX2 · Apr 23, 2017 at 11:40 AM

I know this is a bit of an older post and that you've probably figured it out by now.

Problem: Clamped Movement Type doesn't scroll. Elastic Movement Type only scrolls to top.

Solution: Within the Content Size Fitter, set the axis you're scrolling on to Preferred size.

Comment
Add comment · Show 3 · 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 RSH1 · May 06, 2017 at 12:08 PM 1
Share

Thanks for providing an actual answer to the question ins$$anonymous$$d of a snarky remark about reading the tutorials like the other comment.

avatar image DistulX2 · May 07, 2017 at 11:10 PM 0
Share

Just a followup:

I am creating Photon network video tutorials, but the first video covers scrollview component and adding items.

https://youtu.be/EqW-4r7goaQ

avatar image Priato · Aug 08, 2017 at 01:03 PM 0
Share

Thanks to give a solution ins$$anonymous$$d of giving a link to documentation

avatar image
6

Answer by VodkaFR · Aug 23, 2017 at 03:48 PM

I have encountered today a similar problem.

If the elastic mode acts like unrestricted and clamp doesn't allow you to scroll. It's probably because you have setup the viewpor of the scrollRect to the wrong GameObject.

Since it took me hours to find out and I kept finding this post I post here the answer of my problem.

Comment
Add comment · Show 1 · 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 HTOE · Oct 20, 2021 at 08:41 AM 0
Share

Lifesaver!

avatar image
2

Answer by wojtask12 · Jun 14, 2016 at 08:43 PM

Oh come on. You should go through official manual/learn section/documentation BEFORE asking here. Believe me, you're gonna learn many valuable things there! https://unity3d.com/learn/tutorials/modules/beginner/ui/ui-scroll-rect it's covered at 2:30, but i highly reccomend you watching the whole video, and thengo through all the /learn/tutorials section.

Comment
Add comment · Show 3 · 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 Velketor · Aug 16, 2017 at 01:17 PM 0
Share

Watching this tutorial gave me the knowledge to solve this problem! Thank you for posting the link @wojtask12. Now I understand how to add an Image (Script) component in combination with a $$anonymous$$ask (Script) component to effectively limit the scrolling of my view-port to whatever the mask can see. It's perfect!

avatar image MarkHelsinki Velketor · Feb 14 at 09:15 AM 0
Share

And the problem you were having is different to the problem described by the OP. Your issue related to the Rect Mask, while this issue relates to the clamping or not of the Scroll Rect object.

avatar image MarkHelsinki · Feb 14 at 09:14 AM 0
Share

You're advice is correct, but it's the wrong advice in this instance, since even if you follow all steps, you do not always arrive to the correct clamp behaviour when using these components. I watched the 'whole' video, and the problem the OP describes is not covered.

avatar image
2

Answer by Lumpazy · Dec 04, 2020 at 01:45 PM

How it works and how it should work may not always be the same : After having used unity for over 2 Years and Scroll rects etc all implemented quite often with very different demands i still run into troubles like these !!

This time : The solution was to add a horizontal layout group (for horizontal scrolling) on the content. The problem seems to be that the scroll rect does not get the correct values from the content size fitter without the layout group ??? I do not remember what the tutorial has to say about this, but it does seem all weird. Somehow the logic of it all still eludes me, which means the components often do not behave like one would assume from the tutorials or the manual.

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 CringeItIn · May 26, 2021 at 04:52 PM

For me personally, the key was to understand that the content has to be larger than the root (viewport) Then, the desired effect could be achieved:) Hope this helps someone!

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
  • 1
  • 2
  • ›

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

55 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

Related Questions

Scroll intro text 5 Answers

Horizontal Scrollbar with swipe 0 Answers

Scrollbars 1 Answer

Slide GUITexture/GameObject into view? 1 Answer

How to set UI Rect Scroll for dynamically growing content? 12 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