For example, calculator buttons (each of them appends a specific character to the string by the same way).
What is the common approach to implement it?
For example, in usual programming languages I create an enum which has different values for different buttons and just assign the same method to all the buttons.
As I understand It is hard to implement in unity:
-
A lot of extra duplicating info: Each OnClick event of each button requires a script and sender to be specified manually? Even if OnClick method is inside the script inside this button
-
If implemented as 1) then it requires much more time and it becomes hard to support such project