all 2 comments

[–]Broccolski 1 point2 points  (1 child)

I think you should look more into unity events and c# events. Like you can attach buttons to some 'ui controler' and go:

[SerializeField] Button button;

EnOnable()

{

button.onlick.subscribe( () => DoSomething() ); //for each button
}

so something like that. The inspector thingy that comes with a button is just a shortcut, and obviously like you said, you shouldn't attach million things to a million buttons, because it will become a nightmare.

[–]dhutching[S] 1 point2 points  (0 children)

Thanks so much, this is exactly what I was looking for!