Ok so I’ve got a GUI with multiple buttons, each to change an object to a different color.
The script works great, but if I select one color and then another Unity seems to combine both colors and creates a new color.
My code looks like this:
if (GUI.Button (Rect (490,785,80,20), GUIContent("White", "White"))){
for (var obj: GameObject in Roof){
obj.renderer.material.SetColor("_Color",activeColor); //Set Colour Option
}
}
I have a second button with a different color, once I press the next button it mixes the 2 colors.
Example: Button one is White,
Button two is dark blue
When I click button one, the white looks great, then I hit button two and instead of switching to blue, it creates a Light blue (teal) color (mixing the 2 colors)
Also have the same thing happen when I try switch the Texture (using a solid color png)