I seriously looked all over the web for this simple question and can’t find an answer. I need to run a function in a script when a button is clicked. How would I do this?
If you are talking about a UI button, you can actually specify a function to be called in the OnClick () event attached to all button objects.