|
I have an instantiated prefab object with multiple materials assigned. I'm able to easily change properties its instanced material like this:
and
So far, so good. That changes the color and the texture with no trouble. But... when I try to set the _SpecColor in the same way I'm setting _Color, nothing happens:
That does nothing. Why does the _Color property change just fine but _SpecColor doesn't? I feel like I'm missing something obvious. I'm using the Skin/Bumped Specular shader from the wiki. Here's the first part of that code:
The crazy part is that right before I change the SpecColor I have this:
and it prints the original color, then I do it again after I change the Spec and it prints the new result that I set. When I look at the object in the inspector or in game the spec color is not changed. I'm losing my mind perhaps?
(comments are locked)
|

Shouldn't you be using SetColor and GetColor rather than Vector?
I tried those first and had the same results.
Still, you should use Set/GetColor... it's probably safer ;)
I will if I can get either working, lol.
Bump -- I need to change Spec and Emissive color by script and I can't figure it out!!