When a button is clicked, it can be set to call a public function of one of the components of an object given to it. This public function can also have one parameter, like an int, where when that function is selected in the inspector under the Button script, you must enter a parameter.
Is it possible to change that parameter or the function selected through a script? I know there is a button.onClick aspect of buttons when scripting, but how would I change the function that is called when a button is clicked, and, more importantly, how would I change the argument passed to that function when the button is clicked? By default, that argument passed is 0 for and int (which is what I would need to pass to the function I am calling).
Sorry about the confusing description, but it is the best I can do. I hope you can help ![]()