Texture as a simple button

You wouldn’t believe the issues i had with it, and neither would I. I basically just wan’t to create a simple button, but instead of using the default unity guiskin i just want a start button texture, to make a function when clicked. If possible i’d like to avoid all this guiskin crap because i tried it and for some reason it didn’t even work. So i just need the simplest best method of just making a freaking texture that activates a function. I also want to note that it should be able to work on mobile.

  • Game Object > Create Other > GUI Texture
  • Drag and drop your texture on the ‘Texture’ variable
  • Adjust your pixel inset values for the size of your texture
  • Adjust the Transform position for the position of your texture.

As for function:

function OnMouseDown() {
    Debug.Log("I'm clicked");