PG Does not work in v5.00 does in 4.2 ref Show a popup when the mouse touch a 3d object - #9 by ob1

This seems to be the cause:

by @flux159

The PG is bugged in the first place. It should not be:

butt1 = new BABYLON.GUI.Button.CreateSimpleButton("butt"+i, "");


butt1 = BABYLON.GUI.Button.CreateSimpleButton("butt"+i, "");

Javascript is forgiving and by chance it is (was) working, but you would have had an error with Typescript with the first syntax.


Yep, the reason I updated to this is because it works for subclasses of Buttons as well (ie the FocusableButton added) - updating to use the fix that @Evgeni_Popov suggested is the correct -

CreateSimpleButton is a static function of Button & shouldn’t use a new constructor.

@Evgeni_Popov had a pull request to change this back to Button at one point in Fix static helpers of the Button class by Popov72 · Pull Request #9516 · BabylonJS/Babylon.js · GitHub, but wasn’t landed.