Hi
I’m new to this so this may be a daft question. I have created a unique shader called Testshader with a color parameter called TestColor in it. I have applied this test shader to the material called TestMaterial. I have now written a very small Java script to change the value of the parameter TestColor but for some reason it throws up this error message when I try and run the game:
Assets/ShaderScript.js(5,10): BCE0019: ‘TestMaterial’ is not a member of ‘UnityEngine.Renderer’.
I have no idea what this means and I can’t find anything online about it (which makes me wonder if I’m doing something really stupid, LOL!)
Here’s the code I’m using in the Java script:
function Update () {
renderer.TestMaterial.SetColor(“_TestColor”, Color.red) = 0.5;
}
I’m hoping someone can help me out
Thankyou in advance
Immy
Bongoboo Games