I’m currently trying to make a character selection screen for 2D fighting game. Please help.
… … and how do you want it to work?
Add a canvas to your scene.
Either manually or in code add some buttons with images of your characters.
Set up click handlers for the buttons to handle your character choice logic.
If you need help with specifics you’ll need to provide more info.
I want it to look like this.

Hi,
Do you want clic or arrow choice ?
Clic choice : Create UI like Munchy2007 said.
Arrow Choice :
Create a script who catch arrow event (see : Unity - Scripting API: Input.GetKeyDown)
Catch up, left, right, bottom and enter.
With this basic script you can create interaction on your UI from your keyboard. (I don’t really know how …)
(I think you can create public attribute to interact with your UI)
Have a nice day,
Smile
Wow, I just took a print screen of my sprites to ask this exact question. Hope it’s okay I’m jumping onto this thread. No point in creating another one if this one is already up. I’ve got these characters, where one row of colors are one animation (they are sliced at 60 pixels width, and 17 pixels height each sprite.
Characters
Regarding character selection. Is there some nifty way I could move the sliced box to a position when the player chooses a character? In this case, the first red sprite there is at x position 0, and y position 391. Wouldn’t it potentially load a lot faster than to create (in my case) 8 different animations and hooking them up in Mecanim? And if this is possible, how do I go about this? ![]()
Clic choice is fine. How can I create a UI for it?
Look UI tutorial you will find all you need. You have images, so you’re ready to create awesome UI.
Look for panel, attached an image and button component.
Create à new script and make a link between your button component and the script.(script must be on a game object)
All about this is explain on UI tutorial.
Ok Thank you!
Hum… Nice question. But, why you don’t create a grey level of your character and define different color on your Sprite. In this case you can create 255255255 different color and just create 1 animation from an animator
It’s better than your solution, I think ;p
Edit : see from material etc (sorry I never make 2D games :s so I don’t know if it work with Sprite)
I have actually tried that, but the colors looked very … muddy? My characters follow the colors from the color wheel, and I had a hard time getting the colors correct when I tried that. Now keep in mind I tried that early in my development, so I really had no idea what I was doing. I should probably try again, but shouldn’t there also be some way to approach the problem the way I thought?
it just seems like a quick way to do it as well, and maaaybe easier in the longrun? I don’t know. ![]()
You can create palettes and swap them for your sprites, I don’t know how to do it exactly but there are solutions in the asset store that can help you with that, like this for example.
https://www.assetstore.unity3d.com/en/#!/content/8649
In that way your character only needs 1 texture spritesheet and the game will be more lightweight and will consume less ram.
