Hi
I need help. I have a scene and in that scene i have around 14-15 btns and i am adding them on the go. I want to add on click event listener to them with argument, but the event listener doesn’t take a function with argument.
I don’t want to write 14-15 functions for the buttons cause there must be a way around. I also tried using delegates but they also don’t work. Please help me out on this. All i need is a way to write on single listener for all buttons and use that according to button click. My function for event listener is of the following form:
public void onbtnClick(int i)
{
...
//value of i will be passed on btn click for id purpose
...
}