Good morning
In my project I need small menu with Score and Time counter. I decided to use GUI Editor. Is it possible to update TextBlocks?
How to get text from TextBlock?
It’s my small example of GUI structure: https://gui.babylonjs.com/#3BJZ94#8
my code to get snippet:
let advancedTexture = AdvancedDynamicTexture.CreateFullscreenUI('GUI', true, this.scene);
let loadedGUI = advancedTexture.parseFromSnippetAsync('3BJZ94#8');
let scoreValue = advancedTexture.getControlByName('scoreValue');
You can use scoreValue.text to get and set the text, but you need to make sure that your GUI is finished loading first thou, e.g. using await like below.