Author Topic: SetProceduralColor / Vector in Unity - unexpected behaviour  (Read 1930 times)

I'm pretty much stumped. I have 2 Properties in a Substance Designer Graph, one is a MultiSwitch, which is controled by an integer I called "switch_1".
One is a color with the identifier "color_1" in substance.
I can't change their values in Unity from script. In the inspector, no problem.
My Code is:
Code: [Select]
public ProceduralMaterial mat; // I dragged the material here in the inspector
public void setMaterial()
print("resulting material color: color_1" + mat.GetProceduralVector("color_1"));

// and

print("resulting material color: color_1" mat.GetProceduralColor("color_1"));
I tried both . In both cases the color should be 0,1,0,1 But the print statement returns 0,0,0,1, which is the test color I set in the inspector and also the color I see on my model. There is nothing in between those two lines, so I cannot figure out what is going wrong.
Last Edit: August 05, 2015, 03:19:11 pm

OK, solved it, I did not clear the cache...

Hi frederik.steinmetz,

Glad you were able to fix it :)