Click the button to pop up the layer

I have a problem. Can someone help me?

Question: When I click on a button and a grid layer pops up, how do I make it hide the button from clicking again?

I have a problem. Can someone help me?

Question: When I click on a button and a grid layer pops up, how do I make it hide the button from clicking again

thanks in advance

powerBtn.isEnabled = false;

Example - https://playground.babylonjs.com/#JKDZKY#2

To hide completely use
powerBtn.isVisible = false;

Example - https://playground.babylonjs.com/#JKDZKY#3

2 Likes

Thank you very much. You solved my problem perfectly

1 Like