Hello I want to make my gui Texture a button so to speak and call a function from my other javascript when clicked… Heres the code I have attacthed to the GUITexture help please and thank you!
var normalTex : Texture2D;
var hoverTex : Texture2D;
var script : PlayerRelativeControl;
function OnMouseEnter(){
guiTexture.texture = hoverTex;
}
function OnMouseExit() {
guiTexture.texture = normalTex;
}
function OnMouseDown(){
script = GetComponent("PlayerRelativeControl");
script.StopCoroutine("Slap");
script.StartCoroutine("Slap");
}