Hi all. I tried to search for the answer to this, but I keep ending up with old GUI information rather than information about the new GUI here.
Here’s my issue. I have a lot of buttons. And I want them all to call the same single function in my code when pressed. But, I’d like to know in that function which button was clicked and called the function. So I would like to have each button assigned an ID and have it pass in that ID into the function. Then I know which button was pressed and can proceed accordingly.
Is there any way to get information about which button triggered the event? (I could put a script that assigns an ID to each button, and then use GetComponent to get that script if I can get the GameObject that triggered it… though that may not be the cleanest approach).
This may be a dumb question, but I’m quite inexperienced with this system as it stands.
Thanks in advance for your help.
Thanks but I don’t understand your explanation. And it doesn’t address my question about how to rewrite a line that worked fine in B20 so that it works in RC1. I think that when Unity makes changes in something as fundamental as this they should provide a bit more info than a listing of documentation pages without any code example.