So basically I have a whole bunch of solid colour spheres and cubes. The colour they are is dependent on the colour of the of the colour the player chooses when joining a game. I have tried adding Color(0.1f, 0.1f, 0.1f) to Material.color but it throws errors at me (it seems I can only set a colour not increase or decrease values. I would be using shaders for highlighted out lines and cool stuff like that but I only have Unity free, not Pro. Can someone let me know how to actually do this please? I have been searching for a while now but nothing I find is of much help at all.
Kindest regards!
Scobbo
My Code:
oldColour = gameObject.renderer.material.color;
newColour = oldColour + Color(0.1f, 0.1f, 0.1f);
gameObject.renderer.material.color = newColour;
:EDIT:
I meant post processing, not shaders. DERP
Damn it! I meant Post processing. Do you know how to add a colour to another colour? I can't get it to work.
– ScobboThe code you have is fine, assuming "oldColour" and "newColour" are declared as Color variables.
– Eric5h5They are. The error I'm getting is: "Expression denotes a
– Scobbotype', where avariable',value' ormethod group' was expected"If you're using C#, you need "new Color".
– Eric5h5Of course! I always forget that with Vector3, didn't know I needed it for color. Thanks heaps!
– Scobbo