- Home /
Question by
DigitalOranges · Jun 07, 2011 at 05:28 PM ·
shaderscolorprefabstint
Can't change colour of material on Prefab
Hello all,
I'm instantiating a prefab and trying to change it's tint colour, but I'm not having much success :
glow = (GameObject)Instantiate(MyGlowPrefab, Vector3.zero, Quaternion.identity);
glow.name = "My Glow";
glow.renderer.material.color = Color.magenta;
... but the prefab doesn't change colour. If I trace the material.name, it's the correct material, and if I disable the renderer for 'glow' it doesn't appear (so I'm referencing the correct renderer).
The shader is a particles/additive shader and all I'm trying to do is use the same glow png, just tinted for different conditions.
Can anyone help me out?
Comment