Search Unity

UI Character Select Screen

Discussion in 'UGUI & TextMesh Pro' started by Baskyn, Apr 12, 2015.

  1. Baskyn

    Baskyn

    Joined:
    Feb 17, 2013
    Posts:
    67
    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!
     
  2. SimonDarksideJ

    SimonDarksideJ

    Joined:
    Jul 3, 2012
    Posts:
    1,689
  3. Baskyn

    Baskyn

    Joined:
    Feb 17, 2013
    Posts:
    67
    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.
     
  4. SimonDarksideJ

    SimonDarksideJ

    Joined:
    Jul 3, 2012
    Posts:
    1,689
    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.
     
  5. gabriele-picco

    gabriele-picco

    Joined:
    Sep 9, 2015
    Posts:
    13