UI Character Select Screen

Hello, I’m having an issue finding a solution to a Character selection screen for a mobile game. I’m trying to make a character selection screen similar to Crossy Roads and Subway Surfers. I know I need to use a scrollRect to get the scrolling. By default all the scrollRect does is slide whatever is in it(which is great), but I can’t seem to figure out how I would go about highlighting the character I want to play as/buy. Does anybody know how to go about this?

Thanks!

The short answer is that you want to use scroll rects with a layout group on the content GO for the scroll rect.
Try following @Adam-Buckner_1 s Scroll video here in the live training archive Recorded Video Training: Shop UI with Runtime Scroll Lists - Unity Learn
Or buy a good book :smile:.

I watched that and it is good info, but not quite what I need. I think I’m figuring out a way to do it, but I don’t think it’s the “Correct” way. I’m casting a ray from the camera and it “highlights” the character that it is touching.

Right, if highlighting is what you need, then simply apply the “Selectable” component to the characters.
This offers you the Transition options (like what you see on buttons), by default (color tint) you can have highlighting options, or you can use one of the other modes.

If you only want part of that, then look at the Selectable components source in the Public UI source and use only what you need.

Maybe my assets can serve you :wink: