Hi Gurus!
I am using new engine in local es6 tree-shaking environment.
The app is a local equivalent to playground example
When I read GUI from a snippet server:
import { AdvancedDynamicTexture } from "@babylonjs/gui/2D/advancedDynamicTexture"
...
var advancedTexture = AdvancedDynamicTexture.CreateFullscreenUI("GUI", true, scene);
let loadedGUI = await advancedTexture.parseFromSnippetAsync("#J04Z3N");
...
I receive an error:
instantiationTools.js:32 Uncaught TypeError: Cannot read properties of undefined (reading 'GUI')
at Function.InstantiationTools.Instantiate (instantiationTools.js:32)
at Function.Tools.Instantiate (tools.js:160)
at Function.Control.Parse (control.js:2026)
at Container._parseFromContent (container.js:511)
at Function.Control.Parse (control.js:2029)
at AdvancedDynamicTexture.parseContent (advancedDynamicTexture.js:986)
at XMLHttpRequest.eval (advancedDynamicTexture.js:1013)
If I comment the line:
let loadedGUI = await advancedTexture.parseFromSnippetAsync("#J04Z3N");
then scene is successfully rendered.
Package.json:
"dependencies": {
"@babylonjs/core": "^5.0.0-alpha.60",
"@babylonjs/gui": "^5.0.0-alpha.60",
"@babylonjs/inspector": "^5.0.0-alpha.60",
"@babylonjs/loaders": "^5.0.0-alpha.60",
"@babylonjs/materials": "^5.0.0-alpha.60",
"@babylonjs/post-processes": "^5.0.0-alpha.60",
"@babylonjs/procedural-textures": "^5.0.0-alpha.60",
"@babylonjs/serializers": "^5.0.0-alpha.60"
}
Please share your ideas where to check?
Regards,
Roman