this._scene.getUniqueId is not a function error

I’m writing test for MeshBuilder.CreatePlane, when I run the test, it shows the error TypeError: this._scene.getUniqueId is not a function on line let mesh = MeshBuilder.CreatePlane(

Does anyone know more about this?

Double check that the third param passed is the scene. :slight_smile:

1 Like

Thank you, I changed that to a scene, it shows a new error TypeError: Cannot read property ‘getUniqueId’ of null on line let mesh = MeshBuilder.CreatePlane(

1 Like

If you’re passing a scene it shouldn’t say that. Try logging scene right before the call - maybe you haven’t created it yet or maybe you have a local variable with the same name? Also if you make a playground you might end up fixing it along the way, if not can help get it working. :slight_smile:

1 Like

@Blake nailed it, it really seems that you do not have a scene passed in. A repro in the playground would be a huge help.

1 Like