Thank you so much!! I Just needed how to attach a method to the PressedButton event and I wasn't able to find no one decent tutorial in web pages... you video give me peace one more time haha
Thank you for the great explanation ❤ One question: why didn’t you attach the Skript to the Text but to the button instead? It would make the reference to the Text unnecessary. Is there any downside to that solution?
Good question. There would be no downside to attaching the script to the button. In fact, a pretty common way to do it would be creating an Empty object and rename the GameObject something like GameManager and attach the scripts to that object instead of the button or text.
I'm going freaking nuts here. I chanced across your video, because I Just - can - not - get - the - function - to - show - as an option. Got a script, have the function as a public void, attached the script as a component, slid it into the onclick event ... look in the function list: nothing, just "no function and monoscript. I've tried saving and shutting down/restarting the project, creating new buttons, using a manager instead, checked that nothing is disabled/inactive ... but this onclick just WILL NOT see anything inside the script. Like: nothing. I've even tried moving my code to new classes ... like ... ughhhhhhhhhhhhh