Hello all,
I’m new in PlayCanvas and didn’t use Javascript before.
I got problem when tried to create entities using code. I followed several tutorials and created script that should receive notifications and create entities with ‘plane’ model type.
I got this error “Uncaught TypeError: Cannot set property ‘scene’ of undefined” when trying to add new entity to root. Somehow, it says that my model is null. I spent 2 days trying to figure out what’s wrong with it. I searched for similar problem on forum, used debugger and console, but without success
I don’t know what’s wrong with it. Please, help me!
It would be great if someone could check test project here: https://playcanvas.com/editor/scene/535629
Problems are in Test.js file, trigger is a button with ‘Boost’ title (BoostButton.js).
Thanks in advance!