I want a click of a button : enabled a button= true
and a second click : enabled the button = false
++++++++++++++++++++++++++++++++++++++++
i dont know english and i need to help u guys.
I want a click of a button : enabled a button= true
and a second click : enabled the button = false
++++++++++++++++++++++++++++++++++++++++
i dont know english and i need to help u guys.
What i understand is you want to enable and disable button on mouse click. for that you can do something like this
public Button myButton; // assign this button in the inspector
void Update ()
{
if(Input.GetMouseButtonDown(1))
{
myButton .enabled = !myButton .enabled;
}
}
you will need to drag the button from the hierarchy to the inspector. Hope it helps
@miladloveboth