- Home /
I am still able to scroll even though scroll type is clamped?
My scroll rect's scroll-type is clamped but I can still move it with my mouse??
So here's the complete picture: I'm trying to auto-scroll until the end of my content then stop scrolling and some other stuff happens and then I add a couple of items to the end of my content and I wanna start auto-scrolling again, leading it to show the new items.
here's my code for auto-scrolling, MoveContent is called in Update when _move is true:
 void MoveContent()
         {
             _scrollRect.horizontalNormalizedPosition +=  Time.deltaTime * _speed;
 
             if (!gamePaused && _scrollRect.horizontalNormalizedPosition >= 0.98f)
             {
                 _move = false;
                 _scrollRect.movementType = ScrollRect.MovementType.Clamped;
                 _uiManager.ShowButtons(_1or2before); //heres where the other stuff happens
             }
         }
I also don't wanna be able to scroll when it's auto-scrolling so I have my scroll rect always on clamped. but I'm always able to scroll with my mouse whether it's auto-scrolling or not.
here's a picture of my panel(has the scroll rect component) 
Update: Taking off the horizontal tick in my scroll rect component fixed the fact that I was able to scroll with my mouse. I'm still working on stopping and then continuing to auto-scroll again.
Your answer
 
 
             Follow this Question
Related Questions
Nested Scroll Views: How can I pass drag control from an inner scroll view to its outer scroll view? 2 Answers
Scroll rect snaps everytime with drag 0 Answers
Smooth scrollbar movement on display release 0 Answers
Scrollview not showing scroll bar and not scrolling 1 Answer
Scroll view using Mesh 2 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
               
 
			 
                