BABYLON.GUI.TextBlock.text

I think this has been brought up before, but the TextBlock text need to automatically assume the type of string or convert it inherently to one.

Passing a number to it will cause a whole scene to crash and that is dumb, when all we need to do is on the setter is add +"" to the input just automatically.

Is there any cons of doing this? If not then I will do the PR.

1 Like

Please go ahead

? I know this thread is kinda old but I was gonna post on how to set text block’s text to a variable.

The variable + "" works, but why? If I don’t then it crashes the playground.

because that cast your variable into a string (which is the expected type for the text property)

oh. Thanks for the explanation.