New BABYLON.TransformNode('name') returns an error


After I updated to Babylonjs 4.0, I noticed that each line of code I wrote using:

new BABYLON.TransformNode('name')

throws an error like that:

Uncaught (in promise) TypeError: Cannot read property 'getUniqueId' of null
    at t.e (babylon.js:16)
    at new t (babylon.js:16)
    at new IslandsToPathConverter (IslandsToPathsConverter.ts:53)
    at GameLoop.<anonymous> (GameLoop.ts:249)
    at step (GameLoop.ts:45)
    at (GameLoop.ts:26)
    at fulfilled (GameLoop.ts:17)

This is corrected by adding the scene as an argument:

new BABYLON.TransformNode('name', scene)

Is that normal?

Hi @Nodragem
At first thought, possibly related to this issue; 'getEngine' of null when CreateFullscreenUI is called on different renderer · Issue #6264 · BabylonJS/Babylon.js · GitHub
(@Deltakosh made changes to Engine.LastCreatedScene )

But i’m unable to repro, stable 4.0.3 and alpha 4.1 are both working fine nomatter how many parameters i add or remove, it might be related to something within your own code,
do you have multiple engines or scenes? can you repro the issue in the PG or / ?

1 Like