- Home /
Need UI control buttons for a 2D android side scroller
Hi all.
I (a Unity beginner) am creating a 2D side scroller for android. I've got my controls working fine, but now I need to correlate the controls with the UI buttons. (Left) (Right) (Jump)
I would really appreciate a little guidance in this area. What scripts should I use, and how best do I make these work with my Canvas / Buttons?
Thanks much, guys!
[1]: /storage/temp/82704-sample.jpg
I think this is what you need : On$$anonymous$$ouseDown
Answer by nickkorage · Nov 23, 2016 at 11:44 AM
I found freepik to be very useful in terms of UI sprites and vectors. They have almost all designs for games, websites and apps. Check it out on http://www.freepik.com/index.php?goto=8&page=2&cat=buttons&type=vectores
You can also try open game art and search for available UI sprites on http://opengameart.org
Answer by Cloudbri · Nov 24, 2016 at 04:26 AM
Thanks for the suggestions. I actually already have the artwork for the buttons; I'm just having a little trouble with the c# scripts to make the buttons function.
I wonder if anyone can provide any insight in how to make the buttons function when pressed, so that when I press the android's (JUMP) button, the character jumps.
Thanks
DId you tried what i suggested, i.e., On$$anonymous$$ouseDown ? . That's exactly what you need.
Your answer
Follow this Question
Related Questions
Click UI button while Android keyboard visible 0 Answers
UI Button not working on Android 7 Answers
Material Design Menu 1 Answer
ScrollRect not working on mobile at certain resolution 0 Answers