- Home /
Question by
duplopt · Mar 25, 2013 at 12:46 PM ·
clickingmouseevent
I'm trying to change the GUI texture every time the user clicks on it
Hey there, so I'm trying to change the GUI texture every time the user clicks on it. At the moment I have this script:
var normalTex : Texture2D;
var secTex: Texture2D;
var tritex: Texture2D;
function OnMouseDown (){
guiTexture.texture = secTex;
guiTexture.texture = tritex;
}
I know I'm missing something but I don't know what !
Can some one help me please ?
Comment
Answer by duplopt · Mar 25, 2013 at 03:33 PM
thanks! I manage to find a way to do it with only if's :D thanks again!