Hello,
I’m showing objects visible when I click the button. However, if you click the button again to release it, the object is still visible. I want the object to be invisible when I release the button.
I use this below one(Interactable-Events), but I think i use scripts. Could you give some tips?

Two main ways to do this:
-
Write your own function in script that checks the current state of the object and then sets it to the opposite of that. Make your button call that function.
-
Make 2 buttons in the same place on the screen. The first button shows your object, hides itself, and shows the second button. The second button hides your object, hides itself, and shows the first button.
Do you mean you want the object to appear on mouse down, then disappear on mouse up? “Click” means down AND up, and is only fired when the button is released. If you want the button to be a trigger (appear on down, disappear on up), add Events: OnPointerDown, OnPointerUp.
1 Like
OnMouseDown = set active
OnMouseUp = set inactive
What you mean is that I have to press the button to see the object?
What do you want to happen when you click the button?