I have a GUI created using the GUI tool - https://gui.babylonjs.com/#MMWSUI#47
I load this in my playground using
var advancedTexture = BABYLON.GUI.AdvancedDynamicTexture.CreateFullscreenUI("UI", true, scene);
let loadedGUI = await advancedTexture.parseFromSnippetAsync("#MMWSUI#47");
let exitButton = advancedTexture.getControlByName("ExitButton");
const backgroundBox = advancedTexture.getControlByName("BackgroundBox");
backgroundBox.isVisible = false;
exitButton.onPointerClickObservable.add( () => {
console.log("Exit Button on Menu was clicked");
backgroundBox.isVisible = false;
});
I’d like to do something like
advancedTexture.modifyControlByName("DescriptionText", "Updated Text Goes Here!!!");
I can’t find anything like modifyControlByName - is there a way to achieve this?