Bug when adding ScrollViewer to another control, before adding parent control to AdvancedTexture


If the scroll viewer is added to a parent control before the parent control is added to the advanced texture, an error occurs:

TypeError: Cannot read property 'getScene' of undefined
    at e._attachWheel (babylon.gui.min.js:16)
    at e._link (babylon.gui.min.js:16)
    at e.addControl (babylon.gui.min.js:16)
    at createScene (eval at <anonymous> (index.js:556), <anonymous>:28:21)
    at eval (eval at <anonymous> (index.js:565), <anonymous>:1:9)
    at index.js:565
    at getRunCode (index.js:7)
    at compileAndRun (index.js:523)
    at XMLHttpRequest.xmlHttp.onreadystatechange (index.js:1128)

This error doesn’t occur if you add the scrollviewer directly to the advancedTexture, or adding the scrollviewer to the parent control after the parent control is added to the advancedtexture.

I am looking into it, you should have it later today.

It is in, it will be available in the next nightly