Cannot read property 'enabled' of null

Cannot read property ‘enabled’ of null
https://playcanvas.com/editor/scene/599211

There seems to be nothing in scene?

Look on script, on entity “ground”

Did you link to the correct project? This one is completely empty:

https://playcanvas.com/project/544730/overview/learn maybe this is valid link

Nope, it’s still an empty project. Can you post a screenshot of what you see please?

Maybe you open branch “Master”? my code in branch “test”!

Ah, interesting that you can’t link directly to a branch

Edit: I can’t access the branches from read only access. You will have to merge to master.

Looking at the code from the screenshot, it looks like you are trying to add a new model component to an existing entity.

You can only add a maximum one instance of each component type to an entity. The code you have shown looks like you are trying to add multiple model component instances to one entity.

Also, see here this tutorial on how to add components to an entity: https://developer.playcanvas.com/en/tutorials/programmatically-creating/

You may also find this section useful: https://developer.playcanvas.com/en/tutorials/?tags=procedural