Oh I get what you doing.
You trying to change the parameter of the main material.
You must create a dynamic material instance like this:
- you have a base material:

Then you create a dynamic material instance of it:
I also stored my material in a variable and assigned the material to a cube component
Then you can access the material variable and change the parameter like this:

Hope it helps ![]()
