Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Loading your player character from a set of sprites?

Discussion in '2D' started by Temseii, Aug 23, 2016.

  1. Temseii

    Temseii

    Joined:
    Aug 23, 2016
    Posts:
    14
    Hello everybody!

    First post here, hope it's going in the right place.

    I'm creating a basic laser shooter game and got the idea of giving the player an option to choose the spaceship they want to use. I have 10 or so spaceship sprites that I have added to a scene where the player could ideally click the spaceship that they want to use, and that spaceship would be set as their default spaceship in the game.

    How could I go around doing this?
     
  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Welcome.
    What solutions have you considered or tried so far?
     
  3. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Make a menu (in a Canvas) using a Button for each sprite option. Then, the action event should invoke a method that assigns to the sprite property of the SpriteRenderer component on your player ship object.