- Home /
How to set the view focus on a button in a Grid Layout Group.
Hi everyone.
I'm fairly new to Unity and am trying out the new GUI System. ( Adam Buckners tutorials have been very helpful.. :-) ) Anyway, my problem is this: In my UI I have a Grid Layout Group of Buttons in a (vertical) Scroll Rect. These Buttons can be created and deleted at runtime. And if the number exceeds the number that can be displayed on the screen I can scroll down. So far so good, this works fine.
Now what I would like is this: if the number of buttons exceeds the number of buttons that fit on the screen, and a new button is created, then I would like to have Unity automatically scroll down to the button that was created last.
Is there anyway to accomplish this. I can't for the life of me find anything in the Unity docs that helps me with this.
Your answer
