Scroll View in Unity - 2021 Tutorial

Поділитися
Вставка
  • Опубліковано 1 січ 2025

КОМЕНТАРІ •

  • @barsz3
    @barsz3 Рік тому +25

    Great! No intros, no begging for likes, just straight to the point. Exactly what I was looking for. Thank you.

  • @KingJames586
    @KingJames586 2 роки тому +9

    I've watched a half dozen videos and your is, by far, the best explained (and up-to-date, compared to Brackey's!) Thank you!

  • @alperencan4939
    @alperencan4939 Рік тому +17

    For the ones who are new in Unity, if you want to group these 9 objects under "component", select all objects then press ctrl+shift+G

  • @B4NTO
    @B4NTO 4 місяці тому +4

    Great tutorial as always :D 04:29 was highly needed more my solo project :) thanks!

  • @svyat1003
    @svyat1003 Рік тому

    Maaan, u saved my graduate work. I make an educational game and could not figure out how to create a table to display data from a database. ChatGPT gave me half working code without explaining how does it work. But your video showed me step by step how to do it on simple example.

  • @armin1888
    @armin1888 8 місяців тому +1

    Thanks! This tutorial was great, got me right back into the components I forgot how to use. One thing to add the Content size fitter shouldn't be on the same object as the layout group according to Unity. I fixed it by adding it to the parent (Object with Scroll Rect component)

  • @affenkratzer
    @affenkratzer Рік тому +1

    this makes my shop look much better thank you

  • @_sIash
    @_sIash 6 місяців тому

    I always end up finding the solution to almost anything on this channel, bravo taro 👍

  • @bunggo9914
    @bunggo9914 2 роки тому +27

    disable show mask graphics in the mask component, it will hide the mask image so you will never need to reduce the alpha to 1.

    • @Tarodev
      @Tarodev  2 роки тому +6

      Oh wow... Thank you

  • @pixitales5017
    @pixitales5017 2 роки тому +26

    Nice tutorial! You missed one thing. You know how your scroll view always show at the center of the viewport? You can change that by moving the pivot point all the way on left. Then your view port starts on the left side.

    • @proximacentauri9509
      @proximacentauri9509 2 роки тому +1

      Mate i tried your method but it doesn't work to show the images in the center of the view port, do you have a tutorial for that please ?

    • @klajdimyftari4691
      @klajdimyftari4691 2 роки тому +3

      @@proximacentauri9509 if you are using windows keep the alt key while you select left side on RectTransform panel. If you are using a Mac keep the Cmd key pressed instead

    • @proximacentauri9509
      @proximacentauri9509 2 роки тому

      @@klajdimyftari4691 Thank's mate!

    • @therandom446
      @therandom446 2 роки тому

      Holy shit you are a god thank you

    • @callergaming2575
      @callergaming2575 Рік тому

      Thanks alot

  • @jpalz1
    @jpalz1 2 роки тому +3

    I had been struggling with this for quite a bit, and your tutorial helped me immensely. Thanks a bunch! :D

  • @JianqiuChen
    @JianqiuChen 3 роки тому +3

    super cool stuff to learn on the weekend lol, will watch the entire playlist.

  • @calippooo.x
    @calippooo.x 4 місяці тому

    Great video, clear explanation directly to the point thanks

  • @phineasfacingforward3460
    @phineasfacingforward3460 3 роки тому +1

    The best tutorial on ScrollRects ive seen

    • @Tarodev
      @Tarodev  3 роки тому

      This was my VERY first tutorial 😊

  • @michelmilek2891
    @michelmilek2891 2 роки тому +4

    Great tutorial, directly to the point. Thank you very much!

  • @kameliajamaati9662
    @kameliajamaati9662 Рік тому +2

    Very concise, clear and helpful. Thank you so much

  • @Xarma007
    @Xarma007 2 роки тому +2

    This some top notch tutorial, nice and short, thank you!

  • @공대아름이-n2e
    @공대아름이-n2e 2 роки тому

    I just started to watch your tutorials.
    It's pretty helpful. Thanks. 괜찮은 튜토리얼 같아요~~ 땡큐~ ㅎㅎㅎㅎㅎ

  • @AlexGorskov
    @AlexGorskov 2 роки тому +2

    Great tutorial, thank you, Tarodev!

  • @nwotyzarc
    @nwotyzarc Рік тому +1

    I always come back here when I set up a scroll rect :D

    • @Tarodev
      @Tarodev  Рік тому

      Sometimes the brain just cannot retain certain information 😂

  • @alvarofrederico3719
    @alvarofrederico3719 3 роки тому +1

    you just had the right answer all the time, thank you S2

  • @Community-Compute
    @Community-Compute Рік тому

    Thanks, super helpful! Came here to brush up on this component before implementing a new quest journal UI. I'm ready now.

  • @ScarletSnake
    @ScarletSnake Рік тому +1

    Instant sub, this is great! Thank you! 👏👏👏

  • @Aryazaky
    @Aryazaky Рік тому +1

    If you can't scroll anything even tho you have an event system, make sure that your contents doesn't have an EventTrigger component. Because for some unknown reason it will catch the pointer events and prevent the parent which has ScrollRect (Who needs pointer events) from catching the events. As a workaround, implement the IPointer interfaces directly instead of through an EventTrigger

  • @hdggfhjb6768
    @hdggfhjb6768 3 роки тому +1

    Great. This is best tutorial for scroll in untiy.

  • @Mushe94
    @Mushe94 3 роки тому +4

    Show mask graphic on the Mask component avoids having to change the alpha

  • @djpierreb
    @djpierreb 2 роки тому

    You saved my life for the second time ! Great job

  • @arjunmehta2853
    @arjunmehta2853 6 місяців тому

    Hey! In the part where you were talking about masking, when you add the Mask component, there is an option to untick "Show Mask Graphic" in order to remove the white part, which is the better method to use. Hope this helps!

  • @Fuudo_123
    @Fuudo_123 2 роки тому

    I wanted to make a questing system, and since I'm having a lot of quests eventually I would need a vertical one, thought I would have to code it out then I noticed scrollview and that brought me here haha, very easy to follow

  • @kyleme9697
    @kyleme9697 2 роки тому

    Be my first subscriber ... Are you saying at the end this was your first video? Its just over 14 months later and you've got over 28K subscribers now. Good job !! I personally love the short n sweet videos so I'm going thru all of yours now. Thanks !!

    • @Tarodev
      @Tarodev  2 роки тому

      Yessss, I had zero subs at this stage and was excitedly waiting for my first 😊
      Thanks for enjoying my content!

  • @aussie_bay_flpz4166
    @aussie_bay_flpz4166 3 роки тому +1

    Great tutorial ! You have a new sub

  • @eliorubenmc
    @eliorubenmc 2 роки тому

    every time I see this channel I say in my head: "En Taro Adun" and think the icon isn't right ha ha ha, but not everybody is an StarCraft fan... anyway, Good video, thanks!

  • @jasondotjson34
    @jasondotjson34 2 роки тому +1

    Thank you for the tutorial I just needed that!! :)

  • @blackwhalestudio
    @blackwhalestudio 8 місяців тому

    Excellent tutorial, thanks a lot!

  • @Sacred_Games
    @Sacred_Games 3 роки тому

    Ty for the tutorial, you explain my problem with the content size and give a direct answer (ContentSizeFitter) and why, ty

  • @ioannapanali7576
    @ioannapanali7576 2 роки тому +1

    Thank you for this tutorial!

  • @luiginicastro1101
    @luiginicastro1101 3 роки тому +6

    Would you be able to create a carousel effect for the UI so it's constantly looping when you scroll?

  • @Vulcagon
    @Vulcagon Рік тому +1

    at 2:27 the easyest way to make the viewport transparent is to just untick "Show Mask Graphic" in the "Mask" window

  • @graig2558
    @graig2558 2 роки тому +1

    Perfect video as always. One thing I would love to see is how to scroll using gamepad/keyboard etc?

  • @ExoticElephantStudios
    @ExoticElephantStudios 2 роки тому +1

    Thanks Tarodev, very cool

  • @AkashKumar-gu7jc
    @AkashKumar-gu7jc 2 роки тому +2

    Hey, Take This!⭐
    Great Tutorial!

    • @Tarodev
      @Tarodev  2 роки тому

      Ohhh, a gold star 😊

    • @AkashKumar-gu7jc
      @AkashKumar-gu7jc 2 роки тому

      ​@@Tarodev Yes... I made it the same quality as your videos 😃
      I have one request, if you will, Do you know how to build a Popup which closes on outside click.
      I'm struggling with it!
      I tried using OnDeselect, OnPointerEnter, OnPointerExit.
      And inside OnEnable()
      {
      EventSystem.current.SetSelectedGameObject(gameObject);
      }
      But, that solution doesn't work for nested Panels. (eg Button on Panel --> (opens another) ---> Button on Panel
      Can you please recommend a solution/resources for that?
      Also, my understanding of IPointerClickHandler IPointerDownHandler IPointerEnterHandler IPointerExitHandler IPointerUpHandler is very meagre. If possible please recommend some resources.
      Looking for your kind help...

  • @TrentTheTraveler
    @TrentTheTraveler 2 роки тому +2

    Does anyone know how to clamp scroll to each object within the "scroll view"? So in your case, It would stop at each character and in order to go to the next character, you would have to scroll again. Sort of like swiping through images on your phone?

    • @turquoise7817
      @turquoise7817 5 місяців тому

      i would recommend using the "simple scroll snap" asset (free). i'm currently trying to use it and i am running into issues (mostly to do with my own usage) but it overall seems really helpful

  • @klausbdl
    @klausbdl 2 роки тому +2

    if you cant move your list, dont forget to add the Event System... I forgot about that and I was banging my head for ages trying to figure out the problem

  • @Stuka1NCOMING
    @Stuka1NCOMING 5 місяців тому

    Great Video! Thank you

  • @KJholm
    @KJholm Рік тому +1

    I'm lost right at the start as the item "Content" I have no idea what that is...a empty gameobject? a panel? You refer to it as a container, but I don't know what that is.

    • @lionliing.gamedev
      @lionliing.gamedev 3 місяці тому

      Content is a gameobject with rect transform, Horizontal layout group, content size filter

  • @mani_mincraft
    @mani_mincraft Рік тому

    thanks for the great tutorial!

  • @alperdogru1745
    @alperdogru1745 3 роки тому +1

    You are great. Thank you for tutorial !

  • @kim1234kim
    @kim1234kim Рік тому +1

    hi, great video!! How would you get the list to start over at the end? After the sword, the smiley face is there again without having to scroll in the opposite way

  • @luan_leme
    @luan_leme 3 роки тому +1

    Thanks for the help!

  • @w_ldan
    @w_ldan 11 місяців тому

    Absolutely come in clutch thanx😂

  • @bissash103
    @bissash103 2 роки тому

    This was a really helpful tutorial!

  • @tomas.menniti
    @tomas.menniti Рік тому

    thanks a lot for sharing, you are amazing!

  • @unitynocode
    @unitynocode Рік тому +1

    Thank you so much ! No code is always cool 😊

  • @IlanPerez
    @IlanPerez 7 місяців тому

    Thanks very helpful

  • @apemant
    @apemant Рік тому

    Perfect, thank you!
    Typical Unity thing that's unintuitive. Anyway, I put the Mask on a direct parent of the "Scroll" object which also worked out fine, so there was no need for the "View" object for my purposes.

  • @arunross
    @arunross Рік тому +1

    Thank You...

  • @reydion1648
    @reydion1648 2 роки тому +5

    Excellent tutorial!
    I only have one issue. When I add the "Content Size Fitter" component onto Contents, I lose the ability to scroll. It's like the size Content becomes 0 and I can't scroll past the centre of the the screen.

    • @IcieJuicy
      @IcieJuicy 2 роки тому +5

      I ran into this same issue and noticed that he had a horizontal layout component added to the content container. I added it and that resolved my issue. Hope it helps :)

    • @Duros360
      @Duros360 2 роки тому

      @@IcieJuicy Im having this same issue, Which object has the "horizontal layout component"? The Panel, the View or the Contents?

    • @murielbullot5632
      @murielbullot5632 2 роки тому

      @@Duros360 the Content

    • @alenogales4073
      @alenogales4073 6 місяців тому

      @@IcieJuicy thank you so much for this comment, you just saved me, lol

    • @Stuka1NCOMING
      @Stuka1NCOMING 5 місяців тому

      Thanky you!

  • @heavensfield494
    @heavensfield494 Рік тому

    If the content size fitter just makes the content holder width turn to 0, Is it because you have use an empty gameobject as the content, just fix them by making the size of the empty gameobject bigger

  • @pransukatiyar9536
    @pransukatiyar9536 2 роки тому

    Thanks for this tutorial

  • @galigapiya
    @galigapiya 2 роки тому

    Perrrrfect tutorial. Thanks!

  • @ЯрославЧерватюк-л5ц

    Thank you so much. You sooooo good!!!

  • @duyha2454
    @duyha2454 Рік тому +1

    thank you

  • @molcho9286
    @molcho9286 Рік тому

    I have a problem, my scroll rect onty scrolls if I touch outside my buttons, and if I try to scroll putting my finger on a button it selects it, how can I fix it?

  • @iprg8406
    @iprg8406 Рік тому

    when i do this all of the objects snap back to position after i move them

  • @AnandMishere
    @AnandMishere 10 місяців тому

    Particles are not visible inside the scroll view, even the visible inside mask is enabled in renderer

  • @Liqvidniy
    @Liqvidniy 2 роки тому +1

    Thank you!

  • @karbashevsky
    @karbashevsky Рік тому

    I came looking for copper and I found gold. Thank you so much!!! Also is that possible to use mouse scroll for scrolling but not mouse drag?

  • @StrawberryDeveloper
    @StrawberryDeveloper 11 місяців тому

    Lets say i only have one item, how can i make it stick to the left or right, instead of the center(Building a dynamic inventory system)

    • @Tarodev
      @Tarodev  11 місяців тому +1

      You could create a wrapper object around your item. The wrapper can be full width and the item can be left aligned within

  • @abdullahshafqat772
    @abdullahshafqat772 Рік тому

    Hey great tutorial as usual. Could you help out with one thing though I followed along your 3D objects in UI tutorial and then wished to create a scrollable view with those but doing this does not seem to mask the 3D objects

    • @Tarodev
      @Tarodev  Рік тому +1

      Indeed, it won't work with 3d as scroll view is a canvas specific utility. You'd need to either use a camera with bounds limited to the scroll area, or a Shader which cuts it off

  • @adhocdropoffs
    @adhocdropoffs 3 роки тому +1

    I know it's been almost a year but if you're still around: When I follow these steps, I can't see the items on the far left unless I pull them into view with elasticity and then they bounce back out of view. So my steps are to make a new scroll view with the default scrollbars etc. Increase the height of the scroll view > Make the content a vertical layout group > Make 7 child objects with layout element components (I also added a child image to each of these so I can see them) > Set their Rect transform height to 100 > Play. Items at the top of the list dont stay visible.

    • @adhocdropoffs
      @adhocdropoffs 3 роки тому +1

      Figured this out but for anyone hitting the same issue: I had to make sure that my Content's height was much bigger, and went outside the viewport and then the vertical layout group on my Content had padding on the top and bottom (200, -200) that kept things in the right place

    • @Tarodev
      @Tarodev  3 роки тому

      @@adhocdropoffs You could also check out "content size fitter" to dynamically resize it to fit the content.

  • @mr_crapto
    @mr_crapto 4 місяці тому

    how is your unity editor start fast when you press Play ??!

    • @Tarodev
      @Tarodev  4 місяці тому +1

      Enjoy: ua-cam.com/video/P7cYVg5fAvY/v-deo.html

    • @mr_crapto
      @mr_crapto 4 місяці тому +1

      @@Tarodev You are life saver thanks !

  • @radamantiun1994
    @radamantiun1994 2 роки тому

    How can i achive this result, without UI items

  • @adtitanbite
    @adtitanbite 10 місяців тому

    thanks a lot !

  • @nmhero4824
    @nmhero4824 2 роки тому

    This wont work for me for some reason, I have followed multiple tutorials and even used the built in object but nothing will scroll

  • @paellarusa
    @paellarusa Рік тому

    Im surprised by how nobody asked about how you copy+pasted the images and they stuck one after other? 4:49 Doesn't work for me.
    Okay I found it. By Layout Group. Thanks

  • @ЯПалатка
    @ЯПалатка 2 роки тому

    Can i figure out somehow is object in scroll viewport (visible) or not?
    I found a Unity component "ScrollView" that has a "visible" property but I can't figure out how to access "ScrollView", only I can find is a "ScrollRect"

  • @mendoncagamer6021
    @mendoncagamer6021 11 місяців тому

    Hello, I'm from Brazil and I'm using Google translate to communicate, can you clear up my doubts? I would like to do it using the horizontal scroll bar, but I don't know how to make it active, because every time I play the scene the horizontal bar turns off, I've tried several options but it keeps turning off by itself when I play, do you know what it could be?

  • @mariusst09
    @mariusst09 Рік тому

    Thenks bro ❤

  • @dfilitto
    @dfilitto 7 місяців тому

    Thanks!!!!!

  • @nocelebrity6042
    @nocelebrity6042 Рік тому

    The "mask" effect of this does not happen for me when I follow this to the letter. When Unity's default ScrollView is added using the GameObject menu, that maps most of the arrangement discussed in the tutorial, and yet, when settings are adjusted to match what this tutorial says to the letter, the "mask" effect still does not happen. Another thing that never happens no matter how much content is added is the scroll **stopping where the user lets go of it** after the user releases the mouse button. Instead, the scroll view's content bounces right back to wherever it started.

    • @Tarodev
      @Tarodev  Рік тому

      Look into the content size fitter. What's happening is the content is bigger than the actual content rect, so it flings back to where it actually fits into the scroll, even if the content is overflowing

  • @deivid-01
    @deivid-01 2 роки тому

    Thanks a lot !

  • @kotraner
    @kotraner 2 роки тому +1

    Hello ! :) I joined your Patreon :) and I become Tarobro!
    but it doesn't have image that this tutorial show~ , any way that I can get it to follow your tutorial?

    • @Tarodev
      @Tarodev  2 роки тому +1

      This video was looooong before my patreon, but message me on patreon and we can work something out!

    • @kotraner
      @kotraner 2 роки тому

      @@Tarodev Ok I just sent you message on Patreon :)

  • @NairatAhmad
    @NairatAhmad 2 роки тому

    Is there a way to scroll a step-by-step? like .. I created something by putting arrows to the left and right, and scrolling my panel by Image width on click, this way it jumps one picture/image on a time.
    Is there an easy/simple way to do it with the default scrollbar the way you've shown us?
    Great video BTW :)

  • @Hamentsios10
    @Hamentsios10 Рік тому +1

    amazign tut

  • @makingtechfriendly
    @makingtechfriendly Рік тому

    Thanks

  • @許哲綱-q5d
    @許哲綱-q5d 2 роки тому

    thank you good

  • @Hakkology
    @Hakkology 8 місяців тому

    Scrollview actually took my 2 days and i still haven't figured out the solution.
    Elastic component automatically returns to original position after dragging.
    Such a nasty component...

  • @charithnirmal5823
    @charithnirmal5823 2 роки тому

    Brilliant

  • @rafaelbrustolin4687
    @rafaelbrustolin4687 Рік тому

    thanks love u

  • @shanjohnkj6851
    @shanjohnkj6851 2 роки тому

    Life Saver

  • @temp-not.of.thatkind
    @temp-not.of.thatkind 3 місяці тому

    nice

  • @ВладГалкин-р2б
    @ВладГалкин-р2б 2 роки тому

    ty

  • @TylerLarson
    @TylerLarson 3 роки тому

    Very first subscriber..... Hmm.

  • @MagnusRazer
    @MagnusRazer Рік тому

    Bastante util

  • @yahsaikol6279
    @yahsaikol6279 Рік тому

    hmmm, it's not working g:(

  • @lionliing.gamedev
    @lionliing.gamedev 3 місяці тому

    🎉🎉🎉

  • @napoleonbonerfarte6739
    @napoleonbonerfarte6739 Місяць тому

    Losing my fucking mind whenever i try to move my scrollable container itj ust snaps back into place im sure ill figure it out once i've had some sleep but christ on earth

    • @napoleonbonerfarte6739
      @napoleonbonerfarte6739 Місяць тому

      Basically it's due to how my UI components were structured, make them and set them up to be centred right before making them a child of another UI component.

    • @napoleonbonerfarte6739
      @napoleonbonerfarte6739 Місяць тому

      AND ITS NOT A FUCKING PANEL ITS A FUCKING IMAGE ARGHHHHHHHHHHHHHHHHHHHHH

  • @_mirai
    @_mirai Рік тому

    goood

  • @BenjaminWidawski-vi1hl
    @BenjaminWidawski-vi1hl Рік тому

    Thanks!

  • @cwdgamedev1017
    @cwdgamedev1017 Рік тому

    Thank you!