I want to create a main menu in Unity3d for which I have taken a sprite as main menu window and many small sprites as buttons. I wish to write a script that I want to attach to my main menu and that will detect which button is clicked and what function to call. But I don't know how to do that. Can anybody help me?
I think the quickest option would be to display the sprites and add a "OnMouseDown()" script, you only need a collider on it.
More information: OnMouseDown()