Why not just use GUI Styles to make a button just a texture?
var Texture1 : GUIStyle;
var Texture2 : GUIStyle;
function OnGUI() {
if(GUI.Button(new Rect(10, 10, 100, 100), "", Texture1)) {
//Code Here
}
}
Then in the inspector go to your GUI Style and drag your texture in the box under "Normal". That's what I always do, it's really easy.
↧