[SOLVED] Cannot read properties of null (reading 'resource')

I wanted to ad a toon shader to my game, but then i ran into a problem. It says “Cannot read properties of null (reading ‘resource’)”
How can i fix it?

Link to my game:

You haven’t assigned an asset to the ramp attribute in the Editor:

So when it tries to access the resource of the asset here:

var ramp = this.ramp.resource;

As this.ramp is null, it will throw an exception

Now it says “Cannot read properties of undefined (reading ‘model’)”

Hi @Tibor_te_Walvaart! You are using the new render component on your player entity, instead of the legacy model component. You can replace the render component with the model component or update the script.

Thank you very much, @Albertos

1 Like