AdvancedDynamicTexture in NullEngine

Hey!

it seems that the NullEngine is trying to render AdvancedDynamicTextures - is this correct behaviour and should I work around this when running tests or should we do a PR when AdvancedDynamicTextures are ignored in NullEngine?

 console.error
      TypeError: Cannot set property 'font' of null
          at AdvancedDynamicTexture._render (.../@babylonjs/gui/2D/advancedDynamicTexture.js:626:21)
          at AdvancedDynamicTexture._checkUpdate (.../@babylonjs/gui/2D/advancedDynamicTexture.js:618:14)
          at Observer.callback (.../@babylonjs/gui/2D/advancedDynamicTexture.js:127:107)
          at Observable.notifyObservers (.../@babylonjs/core/Misc/observable.js:286:49)

Thanks

I think it’s expected behaviour for the null engine but I will let @Deltakosh or @sebavan say for sure.

I am totally not sure that ADT is null engine “friendly” as it works of a context 2d which is not available as well in node.

Okay so I should take care of this manually and check if the env is test.

Would it be a good idea to have BB take care of this automatically when using NullEngine thou? To me it seems logical that the ADT would be completely ignored.

This makes sense lets check with @Deltakosh what are his thoughts ?

I tend to agree but I would not want to bloat ADT code with a lot of not required tests

Do you think you could try to submit a PR with suggested changes?