Unity UI - Scroll Menu Pt 2: Vertical List - A scrolling, vertical list of buttons.

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 ก.ย. 2024

ความคิดเห็น • 112

  • @Paledomain
    @Paledomain 5 ปีที่แล้ว +47

    This is the only meaningful UI building tutorial I could find in 3 weeks bless you

  • @kivikall
    @kivikall 4 ปีที่แล้ว +5

    It's always hit and miss when searching tutorials from TH-cam. After watching multiple 15 min length videos and still not having answer I can only say that this video was different. I'm glad I found it and stayed till the end. Now going to watch part 3. Exactly what I'm looking for! Good job and well explained.

  • @Hurlu
    @Hurlu 5 ปีที่แล้ว +7

    For anyone having the same problem as at 13:22 , I managed to solve it by adding top (and bottom, once your list is full of content) padding to the Vertical Layout component. That's more of a workaround than anything, but so far it seems to work even while changing aspects ratios.

  • @zakrahman479
    @zakrahman479 5 ปีที่แล้ว +4

    A high-quality set of videos. In my opinion, the best concerning Scroll Menus and general UI issues. There's many pits to fall down as a beginner, but this video helped me get out of them.

  • @synthercat
    @synthercat 3 ปีที่แล้ว

    I was struggling with my dynamic UI panel so I fired up your video scrolled near the end, noticed the Content Size Filter that I have been missing. That was it! Thank you and kudos to you fellow developer, have a nice day.

  • @tOOballs
    @tOOballs 5 ปีที่แล้ว +4

    Hey man. Thanks. Worked out fine. Don't apologize, be more confident, we are all learning.

  • @AlexanderBurrows
    @AlexanderBurrows 6 ปีที่แล้ว +6

    This helped solve my problem as to why my scrollview was not scrolling. Thanks!

    • @c00pala
      @c00pala  6 ปีที่แล้ว +1

      No problems at all, happy I could help. =)

    • @ssj3mohan
      @ssj3mohan 6 ปีที่แล้ว

      I really say the samething. I was a lot bugged with scrol UI.

  • @censtimco5924
    @censtimco5924 6 ปีที่แล้ว +8

    Thanks a lot for this tutorial! I've had the same issue when setting the ButtonListContent Y Pivot value to 1. It all worked well after restarting unity :)

    • @ismysphic
      @ismysphic 4 ปีที่แล้ว

      Life saver! Thank you

  • @zombievirals
    @zombievirals 4 ปีที่แล้ว

    You have been a major help to me on a new inventory system(based on Fallout's inventory system). I've been using Unity for about a year but I'd never messed with the scrollbar to be honest, so I had no idea where to even start, I can't thank you enough!! Just this video alone was enough to get me on the right track!! Thanks!

  • @NStriker13
    @NStriker13 5 ปีที่แล้ว

    Only tutorial I could find to help fix my problem which I worked on without any success for 3 hours. Thanks!

  • @arutility
    @arutility 6 ปีที่แล้ว +1

    Thanks for the video! I spent a couple hours trying to get this to work last night and then finally came across your video and now have it working!

  • @XxBlackjackGamingxX
    @XxBlackjackGamingxX 4 ปีที่แล้ว

    Was able to use it this as a frame to make my own version of it which is slightly different but the idea. Thanks for the video im glad to see good tutorials

  • @AliImran-kq2sq
    @AliImran-kq2sq ปีที่แล้ว

    Thankyou very much man. Saved the day at work

  • @vargasxr421
    @vargasxr421 2 ปีที่แล้ว

    Straight and to the point! Thanks Man!

  • @MrPicklerwoof
    @MrPicklerwoof 5 ปีที่แล้ว +2

    I find it a lot easier to just use the default Scrollview UI option, which creates all those components for you. Then you can dive straight in and cater it your tastes.

  • @TostiGamer
    @TostiGamer 4 ปีที่แล้ว

    Thank you so much, i have been looking for this for hours... but you got the perfect tutorial! again thank you!!!

  • @matteomietton6786
    @matteomietton6786 4 ปีที่แล้ว +6

    When you realise that you've spent hours to create your own scroll script, and your own "display list", just to realise that unity already implement it in componant...
    Anyway, thx for the video :)

  • @serkantarakci1
    @serkantarakci1 4 ปีที่แล้ว

    setting pivot 1... saved my life :D thank you man

  • @lilboiUK
    @lilboiUK 2 ปีที่แล้ว

    Thanks, I needed this for a server list :)

  • @dimka_dev
    @dimka_dev ปีที่แล้ว

    Amazing tutorial, you are awesome man. Thank you for your help.

  • @MultiGingerface
    @MultiGingerface 3 ปีที่แล้ว

    Video is a godsend i'm beyond amazed

  • @idej637
    @idej637 4 ปีที่แล้ว

    Thank you so much man, I was going crazy over trying to do this scrolling behaviour from scratch

  • @MrZtapp
    @MrZtapp 2 ปีที่แล้ว

    Really good tutorial thanks

  • @CueQuestWordOfTheDay
    @CueQuestWordOfTheDay 4 ปีที่แล้ว

    Very helpful! Exactly what I needed!

  • @shinobize7730
    @shinobize7730 4 ปีที่แล้ว

    Great video! I'm already using my own scrollbar!

  • @ibrahimaltaha3186
    @ibrahimaltaha3186 5 ปีที่แล้ว +1

    your tutorial is much easier to follow ! why only 450 likes?

  • @indrajitadhikary6989
    @indrajitadhikary6989 4 ปีที่แล้ว +1

    Hi. You should've included the footages where you fixed the wired bugs instead of skipping. We usually face such issues while developing and unable to figure out where is the problem. So your footage would've helped us to know where to look first.

  • @darpsyxer
    @darpsyxer 2 ปีที่แล้ว

    thanx a lot man! very clear explanation :)

  • @mortezamohammadifard4124
    @mortezamohammadifard4124 5 ปีที่แล้ว +1

    thank you man it helped me a lot.
    good luck.

  • @dnedya
    @dnedya 5 ปีที่แล้ว

    Thanks man, this was the exact information I needed

  • @henryjones5935
    @henryjones5935 4 ปีที่แล้ว

    Great tutorial!

  • @dendimusiclyrics6668
    @dendimusiclyrics6668 6 ปีที่แล้ว +1

    Hi! Thank you, this video helped me a lot.

  • @LesusGames
    @LesusGames 5 ปีที่แล้ว

    Fantastic video. Thank you.

  • @kevinguiboche2359
    @kevinguiboche2359 6 ปีที่แล้ว +1

    fuck yes buddy, thanks a lot

    • @c00pala
      @c00pala  6 ปีที่แล้ว

      Neechi Man Gaming Ha, glad you like it, Mate.

  • @richardpatove4587
    @richardpatove4587 4 ปีที่แล้ว

    eye of the destroyer video

  • @ButterKing-28
    @ButterKing-28 ปีที่แล้ว +1

    Nice tutorial but I have an issue.
    When I scroll my items don't disappear when it reaches the top of the viewport. how do I fix it?
    Edit: OMG just realized i missed the "Mask" step at 4:25

  • @ninademirjian6250
    @ninademirjian6250 4 ปีที่แล้ว

    exactly what i needed!!!!!!!!!!!!

  • @demyanrudenko
    @demyanrudenko 4 ปีที่แล้ว +2

    I've got a slight issue - my items that are being scrolled don't disappear outside the viewport. Any suggestions ?

    • @ButterKing-28
      @ButterKing-28 ปีที่แล้ว +1

      I have the same issue

    • @ButterKing-28
      @ButterKing-28 ปีที่แล้ว +1

      I just found out (my) issue when I had the same problem as you, I missed the "Mask" step at 4:25

  • @shubhamtomar95
    @shubhamtomar95 4 ปีที่แล้ว +1

    Hi what happens if the 'Rect Transform' 'height' of the 'Button' Scroll List exceeds that of the canvas? Will the scrolling still work for the buttons that are outside the canvas? If not what is the solution to include the buttons in the scroll list that are outside ?

  • @sunalharbi
    @sunalharbi 4 ปีที่แล้ว

    best video, many thanks

  • @tizizzails6817
    @tizizzails6817 3 ปีที่แล้ว +1

    Oh yes, they scroll. And when you're down here... you'll scroll too.

  • @AngieYonaga
    @AngieYonaga 5 ปีที่แล้ว

    Thank you!

  • @kilthrall
    @kilthrall 4 ปีที่แล้ว +1

    Everything worked for me except for the scrollbar, for some reason it seems the scrollbar it's not detecting that there are many objects so it just doesn't change its size
    EDIT: for some reason, the first time I added the size fitter, unity said I shouldn't, but when I tried again after a lot of doing weird shit, it didn't, so adding the size fitter was my problem

  • @EsC-lt4ey
    @EsC-lt4ey 4 ปีที่แล้ว +1

    I followed this exactly, and everything seemed to work the same, except when I hit play, and I click the scroll bar, or use mouse wheel, it doesnt scroll?

  • @CTR_SimonMK7
    @CTR_SimonMK7 2 ปีที่แล้ว

    Is there a way to make a scroll menu without using Unity's event system? i swear, all i can find are videos of people using the eventsystem but no one seems to be making UI without using it.

  • @dlxinteractive
    @dlxinteractive 4 ปีที่แล้ว

    For those at 14:05 that press play and the scroll bar has disappeared duplicate the buttons and it should appear

  • @hell1972
    @hell1972 5 ปีที่แล้ว

    useful man.....bless u...

  • @Broockle
    @Broockle 6 ปีที่แล้ว +1

    Good Stuff
    Had a day worth of snags but it worked out I think.
    Not being able to just move buttons around freely is what I struggled with the most. It's so easy to mess it all up and start over again.
    I still don't really understand how the scrollmenu borders work. The back snaps seem arbitrary to me. You just gotta keep trying xD

    • @OlivierPons
      @OlivierPons 6 ปีที่แล้ว

      From my experience (I've been trying this so many times!) the *order* of adding UI and components is very important, and if you mess it you better start over again.

    • @c00pala
      @c00pala  6 ปีที่แล้ว

      Oh, I missed these interesting comments.
      I'd agree with both comments. I've spoken about it a few times but yeah, the UI system has always seemed a little buggy to me. Possibly that there's some hard to spot part of the process that's at fault - e.g. as suggested, the ordering the UI elements are created in, or configured - but I've never really been able to nail down when it's going to act weird and when it isn't.
      I was playing with another project last couple days that has a heap of scroll bars in it. My process is generally the same but I'm not always paying attention so I can't confidently say if I'm at fault or not, they just tend to act erratically, like, some were perfect, worked fine, no issues. Then a couple have just randomly been a bit weird, not positioned correctly, change position / size when game runs, etc.
      I can't reliably reproduce the problems so I haven't really been able to figure out why they happen.
      I also tend to just... keep trying till it works. =P

    • @OlivierPons
      @OlivierPons 6 ปีที่แล้ว

      100% agree with you. "I also tend to just... keep trying till it works." This is a major problem and you can't sell products to big companies: they want deadlines. And you can't say "I don't know when that will work, I'll eep trying till it works."
      My own company is called HQF = High Quality Foundations because I do *reliable* things. I've made a small demo for a big company I'm working right now. They were more than enthusiastic! They talked about a $60000 contract but I refused: the demo I made was unreliable (with problems like you explained). I only sell reliable and professional things. Thus I said "no" to that $60000. If the UI were much better with no bugs (or with less bugs) I would have said yes, of course!
      There are tons of bugs in the Unity editor. For example, select 4 objects made through 4 different prefabs. Add them a 3D Rigidbody component. Then modify it. Then click "apply for each prefab". No error, it seems ok. You think it works? Well it looks like it works, but it's like "one instance for 4 prefabs". And when you try to handle event you have erratic errors. Solution? Remove all Rigidbody components, and add one by one a Rigidbody component to each prefab instance. Then your code will work.
      And there are so many "small" but blocking bugs like that I can't sell the Unity solution for industrial companies. So much money to make. But I do only good stuff and I can't with Unity right now. Unity is just a huge playground to learn and play, but too far from industrial quality. Such a loss!

  • @ostensiblyaverage5576
    @ostensiblyaverage5576 3 ปีที่แล้ว

    Ok, so this video is very helpful and works really well, but I have one small problem, when I add more items to the list the list expands up and down, how can I make it so it only expands down?

  • @MrKiraBR
    @MrKiraBR 3 ปีที่แล้ว

    Thank yooooou!

  • @KeidyLotus
    @KeidyLotus 3 ปีที่แล้ว

    how to make the buttons duplicate/spawn to a different position? when i duplicate it adds the new object in the same position

  • @haystack7077
    @haystack7077 2 ปีที่แล้ว

    My vertical layout group wasn't working because the objects I wanted to instantiate dynamically at runtime inside didn't have a Rect Transform component, only a Transform.
    If anybody encounters the same issue, replace transform by Rect Transform.

  • @otpezdal
    @otpezdal 4 ปีที่แล้ว

    how to identify which button i pressed? I have a mass, and the buttons list. How to increment number in mass, when i pressed related button to the one of mass numbers?

  • @brossinger
    @brossinger 3 ปีที่แล้ว

    Hello. Could you help me? How create vertical list to all size of canvas and change object size by canvas.

  • @plumedemouton2085
    @plumedemouton2085 3 ปีที่แล้ว

    Great video ! Plus you sound cute :3

  • @westingtyler1
    @westingtyler1 5 ปีที่แล้ว

    Yes, but when I use the arrow or WASD keys to move the selection down the list, the view does not move with it. So if I scroll down using arrow keys, I quickly move out of view into oblivion. How to fix that?

  • @themeatynoob3886
    @themeatynoob3886 4 ปีที่แล้ว

    Do you use VSDC for this video, also thanks for the tutorial

  • @grbasmhmap9981
    @grbasmhmap9981 4 ปีที่แล้ว

    So I'm having a bit of an issue trying to display a list of results as GUI Buttons inside the content of a Scroll View object. I want to be able to type into a Input field "Appl" and have all the buttons with those characters to be displayed from top to bottom in alphabetical order inside the Scroll View. Kind of like thanks in advance

  • @TheVinnieFPS
    @TheVinnieFPS 4 ปีที่แล้ว

    thanks.

  • @Havie
    @Havie 4 ปีที่แล้ว

    Heyy, I followed this and its great, however, I have one issue.
    When dragging an item into an inventory slot, I made the slot grow larger as preview feedback to the user. However, since the UI seems to render things based on the scene hierarchy.. this results in all my items clipping eachother, literally only the last slot in the hierarchy produces the desired results. Any solutions?

  • @uyghurmananzar8764
    @uyghurmananzar8764 5 ปีที่แล้ว

    I have same problem just like you. But how did you corrected it back?

  • @ismailbaarka8740
    @ismailbaarka8740 4 ปีที่แล้ว

    thanks

  • @Nolli360Flip
    @Nolli360Flip 5 ปีที่แล้ว

    I cant scroll the view by just dragging items. Should I only scroll with the scrollbar or can I scroll also with just click and drag to top?

  • @starbuck3980
    @starbuck3980 ปีที่แล้ว

    When i move the scrollbar it bounces back, why it can be? i did the same as you using Unity 2021

    • @starbuck3980
      @starbuck3980 ปีที่แล้ว

      Just found why, just happens when i dont maximize the editor window, this is weird

  • @drusttaib607
    @drusttaib607 6 ปีที่แล้ว

    Thanks for the vid. My question is how to sort the list? for example, I want to show the name of the highest score on the top.

    • @c00pala
      @c00pala  6 ปีที่แล้ว

      Thanks for watching it. =)
      Sorting a list isn't too difficult if you understand how they work and know what you're trying to achieve. If you're still a bit new to working with lists, would recommend having a look at a few 'general' list tutorials, there's plenty around and they'll help you understand what's going on and let you do whatever you want with them a lot more easily.
      To sort by a highest or lowest value though, I'd suggest having a second list to store the sorted results in and go with a method where you check if there's anything in the first list and if so go through it with a foreach loop. You would create a temp variable before the loop starts to store the 'current highest value' and every time the value you check is > the temp variable, set it to = the list value. Keep doing this till you've checked all values in the list and when you finish the loop, the temp variable should be = the highest value found.
      Once you have the final highest value, you can add that value to the start of the second list (List.Insert instead of List.Add) and remove it from the original list (to ensure you don't capture it again). Then repeat the foreach loop. Keep doing this until the first list has no more values in it and you should have a second list that's sorted from highest (first element) to lowest (last element).

    • @c00pala
      @c00pala  6 ปีที่แล้ว

      There's also the Sort method for .NET, not sure if it works in Unity but a quick search seems to suggest it should:
      msdn.microsoft.com/en-us/library/8ce6t5ad(v=vs.110).aspx
      answers.unity.com/questions/677070/sorting-a-list-linq.html
      answers.unity.com/questions/144996/how-do-i-sort-a-list-of-classes-by-a-property.html

  • @mhyrobusan6758
    @mhyrobusan6758 6 ปีที่แล้ว

    When I click the last button, it keep turning back to top. How to go back to bottom when I click the last button? Please help.

    • @c00pala
      @c00pala  6 ปีที่แล้ว

      Hi Mhyr. When you say that it keeps turning back to top, do you mean that if you scroll down, when you click the button the scroll goes back to the top of the list?
      I cannot make this happen in a test project, so I'm not sure why it is doing this for you. It might be worth checking to make sure that the 'Movement Type' setting on the ScrollRect component attached to the ButtonScrollList object is set to 'Clamped' and not 'Elastic' as this might cause the scroll content to 'snap' back.
      Have you made the buttons do anything / do they run any code when clicked? If they're running some code that is changing the scroll content, this might cause this problem - say if you delete / add refresh the buttons?

  • @seebo1
    @seebo1 5 ปีที่แล้ว

    Can anybode please tell me how to disable infinite scrolling?

    • @chillerdude1
      @chillerdude1 4 ปีที่แล้ว

      Change the unrestricted component to clamped

  • @user-bj7sn4wr7r
    @user-bj7sn4wr7r 4 ปีที่แล้ว

    Great! Thanks! ㅇ ㅅㅇb

  • @MisterFresh022
    @MisterFresh022 2 ปีที่แล้ว

    Just share with us the goddam project 🤣

  • @SteffoSpieler
    @SteffoSpieler 6 ปีที่แล้ว

    After I linked my Scrollbar zu the ButtonScrollList, it wasn't visible anymore!

    • @c00pala
      @c00pala  6 ปีที่แล้ว

      Might be set to auto hide, check the Visibility setting on the Scroll Rect.

    • @SteffoSpieler
      @SteffoSpieler 6 ปีที่แล้ว

      nope, it was PERMANENT and it's not invisible I only can't see it

    • @c00pala
      @c00pala  6 ปีที่แล้ว

      Hmmm... could it be hidden behind anything? Is there a background or anything that it should be sitting on top of that would cover it if it were behind? Maybe move it somewhere else on the screen that has nothing on it and see if it appears - if so, it might be covered by something.
      When you say that it's not invisible but you can't see it, does that mean you can see it in the scene / editor but not the game?

    • @SteffoSpieler
      @SteffoSpieler 6 ปีที่แล้ว

      I can see it in the Hierarchy, but I cant see it in the scene! And its not behind something!

    • @c00pala
      @c00pala  6 ปีที่แล้ว

      The transform's position on the Scrollbar, is that ok?
      You said you 'linked' the bar to the list, just wondering, is this when it was made a child of the list - i.e. did you drag and drop the bar onto the list, or did you select the list and create the scrollbar on it? Either way is perfectly fine, I ask because if the object disappeared when it was dropped on the list, it might have moved it to be relative to the list and it could be somewhere off screen.
      If you click on the Scrollbar in the hierarchy and press the 'F' key to focus on it in the Scene view, does that do anything?

  • @РусланАсташенко
    @РусланАсташенко 6 ปีที่แล้ว

    Я не понял как он кнопку поставил на место, там где у него видос склеен!

  • @closeitdevlog2438
    @closeitdevlog2438 4 ปีที่แล้ว

    just use scrollview

  • @dream_catcher7725
    @dream_catcher7725 5 ปีที่แล้ว

    FOR GOD SAKE FOR GOD SAKE F O R G O D S! A! K! E! why nobody talk about keyboard/joystick navigation and menu control like old school games and consol games theres not only a mouse and toch control to play video games in this world !

    • @c00pala
      @c00pala  5 ปีที่แล้ว +3

      Ignoring your little entitled outburst, to answer the question you indirectly asked, the ability to navigate around UI elements via controls / gamepad (or any other configured input axis) is actually built into most of Unity's UI components already via the 'Navigation' property (look this up for more info) and works out of the box with only minimal configuration.
      As an example, if you had a vertical row of buttons, you'd set Navigation on each button to Automatic (or Vertical, if Automatic isn't working the way you want - use the 'Visualize' button to see in the editor how the elements are connected) and then when one is selected, you can use the gamepad or keyboard to move between them.
      In the buttons context, you'll also need to ensure a button is first selected / highlighted before it will allow you to navigate using controls. A rough example of this would be referencing the default / first button in the list in a script and when you open or display the menu, you'd call Select() on it.
      e.g. Button btn;
      void OpenMenu()
      {
      btn.Select();
      }

    • @dream_catcher7725
      @dream_catcher7725 5 ปีที่แล้ว

      @@c00pala hey sorry for the angry comment and thank you for your respond

    • @CAESAR_IS_GOD_mohammadisaloser
      @CAESAR_IS_GOD_mohammadisaloser ปีที่แล้ว

      ​@@c00pala Any way to do it with just text (no buttons) and the right joystick? just want to scroll some text on the right side in a menu wih the right joystick at the same time as using the left joystick to scroll buttons on the left side of the menu. Any quick thoughts or vids maybe?

  • @grigorytatarinov7751
    @grigorytatarinov7751 5 ปีที่แล้ว +1

    Hello man, this video is too long, it may be a lot faster to explain this shit, thx you anyway

    • @c00pala
      @c00pala  5 ปีที่แล้ว

      No problems and fair point. My videos do tend to be a bit long, I've always been the first to admit that.
      Still I'd rather you have more info than you need than not enough. ;)

  • @maxwell_edison
    @maxwell_edison 5 ปีที่แล้ว

    so.. make this thing uh.. 200 wide.. then uh.. *pause for 30 seconds*.. maybe this one 300? 350?"... sure.. uh, okay... then type in those numbers, right?... good.. good......