UI Events - Make buttons do something - Unity 4.6 Tutorial
Why Stack Overflow recommends it
Stack Overflow users link it when someone's Unity button does nothing on click and they need to see how to assign the OnClick handler.
Recommended by 2 people across 2 different months, 2015 to 2017.
What it is
A short beginner tutorial from Brackeys on Unity 4.6's new UI system, showing how to wire up UI Events so that buttons call methods in a script. It walks through assigning an action to a button in the inspector.
What people said
Recommends mayo · 2015-09 · Stack Overflow · on “the onclick button function does not seem to call the randommath function”
Did you assign the action for the button? The name of your methods doesn't have any relationship with the name of the buttons, so you have to assign the related method by your own. See this video, 5:35 ;) [this video]
Recommends Thalthanas · 2017-10 · Stack Overflow · on “Want to Use Different Targets on different unity buttons”
If i understood your problem correctly, which is; **when you click a button some function will work.** If this is your case, I strongly suggest you to watch some tutorials about it if you havent any. One from Unity [LINK] . One from [this video] @PawandeepKaur
Cites ZurdoRod · 2017-07 · Stack Overflow · on “Virtual Button Functionality in AR Android”
About UI buttons, you can use OnGUI function to draw buttons, or use a Canvas instead. OnGUI [LINK] or Canvas [this video]