Hi everybody,
I just want to count all my Gui objects to make them visible or not and i don’t know how to do that.
Could you help me ?
Thanks,
Boris
.
Hi everybody,
I just want to count all my Gui objects to make them visible or not and i don’t know how to do that.
Could you help me ?
Thanks,
Boris
.
Hey there, you can make all of your gui controls visible or invisible by setting isVisible on the root container, like below:
advancedTexture.rootContainer.isVisible = false;
Playground: https://playground.babylonjs.com/#4RTUCB#26
And if you want to iterate over all of your gui controls to determine and set their visibility one at a time you can call getDescendants() on the root container like below:
advancedTexture.rootContainer.getDescendants().forEach((control) => {
control.isVisible = false;
});
Playground: https://playground.babylonjs.com/#4RTUCB#27