Changing the material of an object keeps the objects old texture as well as adding the new one?

I have the following code

 gameObject.renderer.material = mat;

But the object keeps it’s old texture as well as adding the new one, I don’t want this, I want to just have the new texture one object…

Here is an examplealt text

The texture of the sides before was a blue plain texture, after adding the new texture it keeps the old blue but also adds the new one on top? and the exact same with the top, that was a plain red texture before, and again it just added the new texture on top.

Can anyone help me with making it so only the new texture is on it please? :slight_smile:

Oh and by the way, it’s not a real cube, it’s 6 planes together like a cube so I can make the textures of each side different…

Thanks.

There aren’t two textures. You’re using Material.color when you don’t want it. Set it to white to yield the same effects as not multiplying by a color, or use a more appropriate shader.

Also, use six different materials on a cube instead of six planes.