Hi guys,
In my game I want an object being turned off when a click is being pressed down, and then re-activated when mouse click is released… like the below
if (Input.GetMouseButtonDown (0)) {
centerPiece.SetActive (false);
}
if (Input.GetMouseButtonUp (0)) {
centerPiece.SetActive (true);
}
This part is okay but the problem is when I click my pause button it obviously turns on, and off the game object when I click the button, which I don’t wan’t to happen…
Any wiser alternatives to approaching this goal, or is there a function to differentiate a click on everywhere else, but the button?
The button was created on a Canvas and is a child of a canvas, not script built.
I’m still a noob so be patient and nice please ![]()