Yo, I’m trying to set emissive color from my C# script to my custom shader made in shadergraph. This is how my HDR color variable is defined:
[ColorUsage(false, true)] // HDR color
public Color outlineColor;
and then Start() looks like this:
this.outlineImage?.material.SetColor("_EmissiveColor", outlineColor);
And shader graph’s blackboard contains this:
And “Color” is then directly plugged into “Emission” slot in my HDRP/Unlit master node. The problem is that if I change “outlineColor” in the inspector, the material emission color won’t change on game start. Only if I hardcode the color into the code like instead of using “outlineColor” I use “Color.green”.
Am I missing something or is this a bug?
Any help is much appreciated
L