public class NewBehaviourScript1 : MonoBehaviour {
public Texture2D buttonNormal;
public Texture2D buttonActive;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
//
ShowGUIButton(i);//xianshi
//
CheckTypeButtonActive(i);// hide or show
if( guiTexture.HitTest(Input.mousePosition)){
if(Input.GetMouseButtonDown(0)){
guiTexture.texture = buttonActive;
}
if(Input.GetMouseButtonUp(0)){
guiTexture.texture = buttonNormal;
//
CheckTypeButtonAction(i);//action
}
}else{
guiTexture.texture = buttonNormal;
}
}
}